UNPKG

astral-angular-annotate

Version:

AngularJS DI annotation pass for astral

83 lines (75 loc) 1.25 kB
/* * Simple AST structure to match against * ex: `angular.module('whatevs').controller( ... )` */ module.exports = [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "ngModule": true }, "property": { "type": "Identifier", "name": /^(constant|value)$/ } } }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "ngModule": true }, "property": { "type": "Identifier", "name": /^(controller|directive|filter|service|factory|decorator|provider)$/ } }, "arguments": [ {}, { "type": "FunctionExpression" } ] }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "ngModule": true }, "property": { "type": "Identifier", "name": "provider" } }, "arguments": [ {}, { "type": "ObjectExpression" } ] }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "ngModule": true }, "property": { "type": "Identifier", "name": /^(config|run)$/ } }, "arguments": [ { "type": "FunctionExpression" } ] } ];