UNPKG

vue-di-container

Version:
25 lines (24 loc) 1.01 kB
import { ArgKeys, Key, PropertyKeys } from './providers'; import { Reflection } from './reflection'; import { Ctor, Func } from './util'; declare const PARAMETER_INJECTIONS: unique symbol; declare const PROPERTY_INJECTIONS: unique symbol; interface NullablePropertyKeys { [name: string]: Key<any> | null; } interface DecoratedFunction extends Func<any> { [PARAMETER_INJECTIONS]?: ArgKeys; } interface DecoratedClass extends Ctor<any> { [PARAMETER_INJECTIONS]?: ArgKeys; [PROPERTY_INJECTIONS]?: NullablePropertyKeys; } export declare class Metadata { private reflection; constructor(reflection: Reflection); getParameterKeys(fun: DecoratedFunction | DecoratedClass, explicitKeys?: ArgKeys): ArgKeys; setParameterKey(fun: DecoratedFunction | DecoratedClass, index: number, key: Key<any>): void; getPropertyKeys(cls: DecoratedClass, explicitKeys?: PropertyKeys): PropertyKeys; setPropertyKey(cls: DecoratedClass, name: string, key: Key<any> | null): void; } export {};