Options
All
  • Public
  • Public/Protected
  • All
Menu

injection

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Locale

Locale: string

ObjectIdentifier

ObjectIdentifier: string

Scope

Scope: "Singleton" | "Request" | "Prototype"

callback

callback: function

Type declaration

    • (node: Element): Promise<void>
    • Parameters

      • node: Element

      Returns Promise<void>

callbackSync

callbackSync: function

Type declaration

    • (node: Element): void
    • Parameters

      • node: Element

      Returns void

decoratorKey

decoratorKey: string | symbol

Variables

Const AMBIGUOUS_MATCH

AMBIGUOUS_MATCH: "Ambiguous match found for serviceIdentifier:" = "Ambiguous match found for serviceIdentifier:"

Const ARGUMENTS_LENGTH_MISMATCH_1

ARGUMENTS_LENGTH_MISMATCH_1: "The number of constructor arguments in the derived class " = "The number of constructor arguments in the derived class "

Const ARGUMENTS_LENGTH_MISMATCH_2

ARGUMENTS_LENGTH_MISMATCH_2: " must be >= than the number of constructor arguments of its base class." = " must be >= than the number of constructor arguments of its base class."

Const ARGUMENT_NAMES

ARGUMENT_NAMES: RegExp = /([^\s,]+)/g

Const CANNOT_UNBIND

CANNOT_UNBIND: "Could not unbind serviceIdentifier:" = "Could not unbind serviceIdentifier:"

Const CIRCULAR_DEPENDENCY

CIRCULAR_DEPENDENCY: "Circular dependency found:" = "Circular dependency found:"

Const CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE

CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE: string = 'Invalid Container option. Auto bind injectable must ' +'be a boolean'

Const CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE

CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE: string = 'Invalid Container option. Default scope must ' +'be a string (\'singleton\' or \'transient\').'

Const CONTAINER_OPTIONS_MUST_BE_AN_OBJECT

CONTAINER_OPTIONS_MUST_BE_AN_OBJECT: string = 'Invalid Container constructor argument. Container options ' +'must be an object.'

Let DOMParser

DOMParser: any = null

Const DUPLICATED_INJECTABLE_DECORATOR

DUPLICATED_INJECTABLE_DECORATOR: "Cannot apply @injectable decorator multiple times." = "Cannot apply @injectable decorator multiple times."

Const DUPLICATED_METADATA

DUPLICATED_METADATA: "Metadata key was used more than once in a parameter:" = "Metadata key was used more than once in a parameter:"

Const INJECT_TAG

INJECT_TAG: "inject" = "inject"

Const INVALID_BINDING_TYPE

INVALID_BINDING_TYPE: "Invalid binding type:" = "Invalid binding type:"

Const INVALID_DECORATOR_OPERATION

INVALID_DECORATOR_OPERATION: string = 'The @inject @multiInject @tagged and @named decorators ' +'must be applied to the parameters of a class constructor or a class property.'

Const INVALID_FUNCTION_BINDING

INVALID_FUNCTION_BINDING: "Value provided to function binding must be a function!" = "Value provided to function binding must be a function!"

Const INVALID_MIDDLEWARE_RETURN

INVALID_MIDDLEWARE_RETURN: "Invalid return type in middleware. Middleware must return!" = "Invalid return type in middleware. Middleware must return!"

Const INVALID_TO_SELF_VALUE

INVALID_TO_SELF_VALUE: string = 'The toSelf function can only be applied when a constructor is ' +'used as service identifier'

Const KEY_NOT_FOUND

KEY_NOT_FOUND: "Key Not Found" = "Key Not Found"

Const MISSING_INJECTABLE_ANNOTATION

MISSING_INJECTABLE_ANNOTATION: "Missing required @injectable annotation in:" = "Missing required @injectable annotation in:"

Const MISSING_INJECT_ANNOTATION

MISSING_INJECT_ANNOTATION: "Missing required @inject or @multiInject annotation in:" = "Missing required @inject or @multiInject annotation in:"

Const MULTIPLE_POST_CONSTRUCT_METHODS

MULTIPLE_POST_CONSTRUCT_METHODS: "Cannot apply @postConstruct decorator multiple times in the same class" = "Cannot apply @postConstruct decorator multiple times in the same class"

Const NAMED_TAG

NAMED_TAG: "named" = "named"

Const NOT_IMPLEMENTED

NOT_IMPLEMENTED: "Sorry, this feature is not fully implemented yet." = "Sorry, this feature is not fully implemented yet."

Const NOT_REGISTERED

NOT_REGISTERED: "No matching bindings found for serviceIdentifier:" = "No matching bindings found for serviceIdentifier:"

Const NO_MORE_SNAPSHOTS_AVAILABLE

NO_MORE_SNAPSHOTS_AVAILABLE: "No snapshot available to restore." = "No snapshot available to restore."

Const NULL_ARGUMENT

NULL_ARGUMENT: "NULL argument" = "NULL argument"

Const OBJ_DEF_CLS

OBJ_DEF_CLS: "injection:object_definition_class" = "injection:object_definition_class"

Const PREFIX

PREFIX: "_id_default_" = "_id_default_"

Const PRELOAD_MODULE_KEY

PRELOAD_MODULE_KEY: "INJECTION_PRELOAD_MODULE_KEY" = "INJECTION_PRELOAD_MODULE_KEY"

Const REQUEST_CTX_KEY

REQUEST_CTX_KEY: "ctx" = "ctx"

Const REQUEST_OBJ_CTX_KEY

REQUEST_OBJ_CTX_KEY: "_req_ctx" = "_req_ctx"

Const STACK_OVERFLOW

STACK_OVERFLOW: "Maximum call stack size exceeded" = "Maximum call stack size exceeded"

Const STRIP_COMMENTS

STRIP_COMMENTS: RegExp = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg

Const TAGGED

TAGGED: "injection:tagged" = "injection:tagged"

Const TAGGED_CLS

TAGGED_CLS: "injection:tagged_class" = "injection:tagged_class"

Const TAGGED_FUN

TAGGED_FUN: "injection:tagged_function" = "injection:tagged_function"

Const TAGGED_PROP

TAGGED_PROP: "injection:tagged_props" = "injection:tagged_props"

Const camelCase

camelCase: any = require('camelcase')

Const camelcase

camelcase: any = require('camelcase')

Const debug

debug: any = require('debug')('injection:context:obj_def')

Const functionPrototype

functionPrototype: any = Object.getPrototypeOf(Function)

Const graphviz

graphviz: any = require('graphviz')

Const is

is: any = require('is-type-of')

Const isArray

isArray: isArray = Array.isArray

Const manager

manager: DecoratorManager = new DecoratorManager()

Const uuidv1

uuidv1: any = require('uuid/v1')

Functions

Const CIRCULAR_DEPENDENCY_IN_FACTORY

  • CIRCULAR_DEPENDENCY_IN_FACTORY(...values: any[]): string

Const POST_CONSTRUCT_ERROR

  • POST_CONSTRUCT_ERROR(...values: any[]): string

_tagParameterOrProperty

  • _tagParameterOrProperty(metadataKey: string, annotationTarget: any, propertyName: string, metadata: TagPropsMetadata, parameterIndex?: number): void

async

  • async(): (Anonymous function)

attachClassMetadata

  • attachClassMetadata(decoratorNameKey: decoratorKey, data: any, target: any): void

attachMethodDataToClass

  • attachMethodDataToClass(decoratorNameKey: decoratorKey, data: any, target: any, method: any): void

attachMethodMetadata

  • attachMethodMetadata(decoratorNameKey: decoratorKey, data: any, target: any, method: any): void

attachObjectDefProps

  • attachObjectDefProps(target: any, options: any): any

attachPropertyDataToClass

  • attachPropertyDataToClass(decoratorNameKey: decoratorKey, data: any, target: any, propertyName: any): void

attachPropertyMetadata

  • attachPropertyMetadata(decoratorNameKey: decoratorKey, data: any, target: any, propertyName: any): void

autowire

  • autowire(isAutowire?: boolean): (Anonymous function)

clearAllModule

  • clearAllModule(): void

destroy

  • destroy(): (Anonymous function)

eachSubElement

  • eachSubElement(ele: Element, callback: any): Promise<void>
  • 异步遍历element子节点

    Parameters

    • ele: Element

      xml element节点

    • callback: any

      async function

    Returns Promise<void>

eachSubElementSync

  • eachSubElementSync(ele: Element, callbackSync: any): void
  • 同步遍历element子节点

    Parameters

    • ele: Element

      xml element节点

    • callbackSync: any

      function

    Returns void

firstCDATAText

  • firstCDATAText(ele: Element): string
  • 获取第一个cdata类型子节点

    Parameters

    • ele: Element

      xml element节点

    Returns string

firstSubElement

  • firstSubElement(ele: Element): Element
  • 获取第一个element类型子节点

    Parameters

    • ele: Element

      xml element节点

    Returns Element

getClassMetadata

  • getClassMetadata(decoratorNameKey: decoratorKey, target: any): any

getMethodDataFromClass

  • getMethodDataFromClass(decoratorNameKey: decoratorKey, target: any, method: any): any

getMethodMetadata

  • getMethodMetadata(decoratorNameKey: decoratorKey, target: any, method: any): any

getObjectDefinition

getParamNames

  • getParamNames(func: any): any

getPropertyDataFromClass

  • getPropertyDataFromClass(decoratorNameKey: decoratorKey, target: any, propertyName: any): any

getPropertyMetadata

  • getPropertyMetadata(decoratorNameKey: decoratorKey, target: any, propertyName: any): any

getProviderId

  • getProviderId(module: any): string

init

  • init(): (Anonymous function)

initOrGetObjectDefProps

inject

listMethodDataFromClass

  • listMethodDataFromClass(decoratorNameKey: decoratorKey, target: any): any[]

listModule

listPreloadModule

  • listPreloadModule(): Object[]

listPropertyDataFromClass

  • listPropertyDataFromClass(decoratorNameKey: decoratorKey, target: any): any[]

nodeAttr

  • nodeAttr(ele: Element, name: string): string

nodeHasAttr

  • nodeHasAttr(ele: Element, name: string): boolean

nodeName

  • nodeName(ele: Element): string

nodeNameEq

  • nodeNameEq(ele: Element, desiredName: string): boolean

nodeText

  • nodeText(ele: Element): string

ordinaryGetPrototypeOf

  • ordinaryGetPrototypeOf(O: any): any

provide

recursiveGetMetadata

  • recursiveGetMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): ReflectResult[]
  • get metadata value of a metadata key on the prototype chain of an object and property

    Parameters

    • metadataKey: any

      metadata's key

    • target: any

      the target of metadataKey

    • Optional propertyKey: string | symbol

    Returns ReflectResult[]

recursiveGetPrototypeOf

  • recursiveGetPrototypeOf(target: any): any[]
  • 以数组形式返回对象所有 property, 数组第一个元素是距离 o 最近的原型

    Parameters

    • target: any

      对象,class 或者 function

    Returns any[]

saveClassMetadata

  • saveClassMetadata(decoratorNameKey: decoratorKey, data: any, target: any): void

saveMethodDataToClass

  • saveMethodDataToClass(decoratorNameKey: decoratorKey, data: any, target: any, method: any): void

saveMethodMetadata

  • saveMethodMetadata(decoratorNameKey: decoratorKey, data: any, target: any, method: any): void

saveModule

  • saveModule(decoratorNameKey: decoratorKey, target: any): void

savePreloadModule

  • savePreloadModule(target: any): void

savePropertyDataToClass

  • savePropertyDataToClass(decoratorNameKey: decoratorKey, data: any, target: any, propertyName: any): void

savePropertyMetadata

  • savePropertyMetadata(decoratorNameKey: decoratorKey, data: any, target: any, propertyName: any): void

scope

  • scope(scope?: Scope): (Anonymous function)

tagParameter

  • tagParameter(annotationTarget: any, propertyName: string, parameterIndex: number, metadata: TagPropsMetadata): void

tagProperty

  • tagProperty(annotationTarget: any, propertyName: string, metadata: TagPropsMetadata): void

Object literals

Const ContextEvent

ContextEvent: object

ONREFRESH

ONREFRESH: string = "onRefresh"

READY

READY: string = "onReady"

START

START: string = "start"

STOP

STOP: string = "stop"

Const KEYS

KEYS: object

静态参数

AROUND_ELEMENT

AROUND_ELEMENT: string = "around"

ASPECT_ELEMENT

ASPECT_ELEMENT: string = "aspect"

ASYNC_ATTRIBUTE

ASYNC_ATTRIBUTE: string = "async"

AUTOWIRE_ATTRIBUTE

AUTOWIRE_ATTRIBUTE: string = "autowire"

CONFIGURATION_ELEMENT

CONFIGURATION_ELEMENT: string = "configuration"

CONSTRUCTORARG_ELEMENT

CONSTRUCTORARG_ELEMENT: string = "constructor-arg"

DIRECT_ATTRIBUTE

DIRECT_ATTRIBUTE: string = "direct"

ENTRY_ELEMENT

ENTRY_ELEMENT: string = "entry"

EXECUTE_ATTRIBUTE

EXECUTE_ATTRIBUTE: string = "execute"

EXPRESSION_ATTRIBUTE

EXPRESSION_ATTRIBUTE: string = "expression"

EXTERNAL_ATTRIBUTE

EXTERNAL_ATTRIBUTE: string = "external"

ID_ATTRIBUTE

ID_ATTRIBUTE: string = "id"

IMPORT_ELEMENT

IMPORT_ELEMENT: string = "import"

JSON_ELEMENT

JSON_ELEMENT: string = "json"

KEY_ATTRIBUTE

KEY_ATTRIBUTE: string = "key"

LIST_ELEMENT

LIST_ELEMENT: string = "list"

MAP_ELEMENT

MAP_ELEMENT: string = "map"

NAME_ATTRIBUTE

NAME_ATTRIBUTE: string = "name"

OBJECTS_ELEMENT

OBJECTS_ELEMENT: string = "objects"

OBJECT_ATTRIBUTE

OBJECT_ATTRIBUTE: string = "object"

OBJECT_ELEMENT

OBJECT_ELEMENT: string = "object"

PATH_ATTRIBUTE

PATH_ATTRIBUTE: string = "path"

PROPERTY_ELEMENT

PROPERTY_ELEMENT: string = "property"

PROPS_ELEMENT

PROPS_ELEMENT: string = "props"

PROP_ELEMENT

PROP_ELEMENT: string = "prop"

REF_ATTRIBUTE

REF_ATTRIBUTE: string = "ref"

REF_ELEMENT

REF_ELEMENT: string = "ref"

RESOURCE_ATTRIBUTE

RESOURCE_ATTRIBUTE: string = "resource"

SCOPE_ATTRIBUTE

SCOPE_ATTRIBUTE: string = "scope"

SET_ELEMENT

SET_ELEMENT: string = "set"

TYPE_ATTRIBUTE

TYPE_ATTRIBUTE: string = "type"

VALUE_ATTRIBUTE

VALUE_ATTRIBUTE: string = "value"

VALUE_ELEMENT

VALUE_ELEMENT: string = "value"

Const NODE_TYPE

NODE_TYPE: object

ATTRIBUTE

ATTRIBUTE: number = 2

CDATA

CDATA: number = 4

ELEMENT

ELEMENT: number = 1

TEXT

TEXT: number = 3

Const VALUE_TYPE

VALUE_TYPE: object

BOOLEAN

BOOLEAN: string = "boolean"

DATE

DATE: string = "date"

INTEGER

INTEGER: string = "int"

MANAGED

MANAGED: string = "managed"

NUMBER

NUMBER: string = "number"

OBJECT

OBJECT: string = "object"

STRING

STRING: string = "string"

TEMPLATE

TEMPLATE: string = "template"