CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.1.2-dev (changelog, source)
Search

Module ServiceDefinitions

Provides classes for working with the definitions of AngularJS services.

Supports registration and lookup of AngularJS services:

  • dependency injection services, such as factory and provider
  • special AngularJS services, such as filter and controller

INTERNAL: Do not import this module directly, import AngularJS instead.

NOTE: The API of this library is not stable yet and may change in the future.

Import path

import semmle.javascript.frameworks.AngularJS.ServiceDefinitions

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

builtinServiceRef

Holds if ref is a reference to the builtin service with the name serviceName.

getBuiltinServiceOfKind

Gets a builtin service with a specific kind.

Classes

AnimationDefinition

An animation defined with module.animation or $animationProvider.register.

BuiltinServiceReference

A reference to a builtin service.

ComponentDefinition

A component defined with module.component or $compileProvider.component.

ConfigMethodDefinition

An AngularJS config method definition, that is, a method call of the form module.config(fun).

ConstantRecipeDefinition

An AngularJS constant recipe definition, that is, a method call of the form module.constant("name", "constant value").

ControllerDefinition

A controller defined with module.controller or $controllerProvider.register.

CustomServiceDefinition

A custom AngularJS service, defined through $provide.service, module.controller or a similar method.

CustomServiceReference

A reference to a custom service.

DecoratorRecipeDefinition

An AngularJS decorator recipe definition, that is, a method call of the form module.decorator("name", f).

DirectiveDefinition

A directive defined with module.directive or $compileProvider.directive.

FactoryRecipeDefinition

An AngularJS factory recipe definition, that is, a method call of the form module.factory("name", f).

FilterDefinition

A filter defined with module.filter or $filterProvider.register.

InjectableFunctionServiceRequest

A request for a service, in the form of a dependency-injected function.

ProviderRecipeDefinition

An AngularJS provider recipe definition, that is, a method call of the form module.provider("name", fun).

RecipeDefinition

A definition of a custom AngularJS dependency injection service using a “recipe”.

RunMethodDefinition

An AngularJS run method definition, that is, a method call of the form module.run(fun).

ScopeServiceReference

The $scope or $rootScope service.

ServiceRecipeDefinition

An AngularJS service recipe definition, that is, a method call of the form module.service("name", f).

ServiceReference

A reference to a service.

ServiceRequestNode

A request for one or more AngularJS services.

ValueRecipeDefinition

An AngularJS value recipe definition, that is, a method call of the form module.value("name", value).