Variable deco$$Const

deco$$: {
    alias: ((name: string | Record<string, string>, aliasTo?: string) => ((target: AbstractConstructor<object>) => void));
    effect: (<N>(...names: EffectNameDescriptor<N>[]) => ((target: any, field: string, descriptor: PropertyDescriptor) => void));
    hook: ((options: {
        flag: HookFlag;
    }) => ((target: any, propertyKey: string, descriptor: PropertyDescriptor) => void));
    inject: ((token: symbol, ...tokens: symbol[]) => ((...args: any[]) => void));
    injectable: ((config?: {
        provide: symbol;
        providedIn: "root";
    }) => ((target: AbstractConstructor<object>) => void));
    link: ((src: AbstractConstructor<object>, pairs: Record<string, string>) => ((dest: AbstractConstructor<object>) => void));
    mix: (<B>(b: Constructor<B>) => MixReturns);
    mixin: ((...features: MixConstructor[]) => ((to: any) => void));
    prop: ((...args: any[]) => any);
    provides: ((config: Record<symbol, ConfigProviderConfigValue>) => ((target: any) => void));
} = ...

Type declaration

  • alias: ((name: string | Record<string, string>, aliasTo?: string) => ((target: AbstractConstructor<object>) => void))
      • (name: string | Record<string, string>, aliasTo?: string): ((target: AbstractConstructor<object>) => void)
      • 为 class 设置别名 注意,只对方法成员有效

        Decorator

        Parameters

        • name: string | Record<string, string>
        • Optional aliasTo: string

        Returns ((target: AbstractConstructor<object>) => void)

  • effect: (<N>(...names: EffectNameDescriptor<N>[]) => ((target: any, field: string, descriptor: PropertyDescriptor) => void))
      • <N>(...names: EffectNameDescriptor<N>[]): ((target: any, field: string, descriptor: PropertyDescriptor) => void)
      • Type Parameters

        • N extends string = string

        Parameters

        Returns ((target: any, field: string, descriptor: PropertyDescriptor) => void)

          • (target: any, field: string, descriptor: PropertyDescriptor): void
          • Parameters

            • target: any
            • field: string
            • descriptor: PropertyDescriptor

            Returns void

  • hook: ((options: {
        flag: HookFlag;
    }) => ((target: any, propertyKey: string, descriptor: PropertyDescriptor) => void))
      • (options: {
            flag: HookFlag;
        }): ((target: any, propertyKey: string, descriptor: PropertyDescriptor) => void)
      • Parameters

        Returns ((target: any, propertyKey: string, descriptor: PropertyDescriptor) => void)

          • (target: any, propertyKey: string, descriptor: PropertyDescriptor): void
          • Parameters

            • target: any
            • propertyKey: string
            • descriptor: PropertyDescriptor

            Returns void

  • inject: ((token: symbol, ...tokens: symbol[]) => ((...args: any[]) => void))
      • (token: symbol, ...tokens: symbol[]): ((...args: any[]) => void)
      • inject a service according to the token, which binds with a constructor.

        Parameters

        • token: symbol
        • Rest ...tokens: symbol[]

        Returns ((...args: any[]) => void)

          • (...args: any[]): void
          • Parameters

            • Rest ...args: any[]

            Returns void

  • injectable: ((config?: {
        provide: symbol;
        providedIn: "root";
    }) => ((target: AbstractConstructor<object>) => void))
      • (config?: {
            provide: symbol;
            providedIn: "root";
        }): ((target: AbstractConstructor<object>) => void)
      • just mark a class as an injectable one.

        Parameters

        • Optional config: {
              provide: symbol;
              providedIn: "root";
          }
          • provide: symbol
          • providedIn: "root"

        Returns ((target: AbstractConstructor<object>) => void)

  • link: ((src: AbstractConstructor<object>, pairs: Record<string, string>) => ((dest: AbstractConstructor<object>) => void))
  • mix: (<B>(b: Constructor<B>) => MixReturns)
  • mixin: ((...features: MixConstructor[]) => ((to: any) => void))
      • (...features: MixConstructor[]): ((to: any) => void)
      • Decorator

        Warn! just mix own methods in.

        constructor IS excluded!

        Parameters

        Returns ((to: any) => void)

          • (to: any): void
          • Parameters

            • to: any

            Returns void

  • prop: ((...args: any[]) => any)
      • (...args: any[]): any
      • Don't give class-property default value.

        Example

        
        

        Prop

        name // or gives it a default value:

        Prop

        ('ronnie') name

        Parameters

        • Rest ...args: any[]

        Returns any

  • provides: ((config: Record<symbol, ConfigProviderConfigValue>) => ((target: any) => void))

Generated using TypeDoc