// Generated by dts-bundle v0.7.3 declare module 'dependory' { import "reflect-metadata"; export * from "dependory/registry"; export * from "dependory/singleton"; export * from "dependory/transient"; export * from "dependory/inject"; } declare module 'dependory/registry' { /** * Interface, which gets stored for transients. */ export interface ClazzObject { clazz: any; args: any[]; } /** * Interface for the injectees for the constructor. */ export interface ConstructorParamInjectee { registry: Registry; hash: string; } /** * Registry for managing the injections. */ export class Registry { /** * Check, if a class is actually an ES6 class. * @param clazz object, for which to check, if it is an ES6 class */ static isClass(clazz: { toString(): string; }): boolean; /** * Generate the hash for anything, which has a "toString" method. * @param object object to generate the hash for */ static getHash(object: { toString(): string; }): string; /** * Get the map for a class, in which its constructor injectees are stored in. * @param clazz class to get the map for */ static getClassContructorInjectees(clazz: any): { [key: string]: ConstructorParamInjectee; }; /** * Instantiate a class with the given arguments and check, if there any injectees and favor them before the actual arguments. * @param clazz class to instantiate * @param args constructor arguments */ static instantiate(clazz: any, args: any[]): any; /** * Add a singleton to the registry. * @param hash hash of the value to add * @param instance instance to add to the registry */ addSingleton(hash: string, instance: any): void; /** * Add a class to the registry. A new instance will be generated everytime, it shall get injected. * @param hash hash of the class to add * @param clazz class to add the the registry */ addTransient(hash: string, clazz: ClazzObject): void; /** * Get the value which is stored for a hash. * @param hash hash to get the stored value for */ get(hash: string): any; } const defaultRegistry: Registry; export { defaultRegistry }; } declare module 'dependory/singleton' { import { Clazz } from "dependory/clazz"; import { Registry } from "dependory/registry"; /** * Options for creating a Singleton. */ interface SingletonOptions { /** * Registry to use for storing the Singleton. Defaults to the registry used by the framework. */ registry?: Registry; /** * Key for injecting this singleton. This overrides the actual * value, by which this singleton would be injected. */ key?: string; } /** * Inject all parameters to a class' constructor and store it as a singleton. * It will instantiated every once and this instance will be used for all injections. * @param options SingletonOptions for creating this Singleton */ export function Singleton(options?: SingletonOptions): >(clazz: T) => T; export {}; } declare module 'dependory/transient' { import { Clazz } from "dependory/clazz"; import { Registry } from "dependory/registry"; /** * Options for creating a transient. */ interface TransientOptions { /** * Registry for injecting and storing this transient. */ registry?: Registry; /** * Key for injecting this Transient. This overrides the actual * value, by which this transient would be injected. */ key?: string; } /** * Inject all parameters to a class' constructor and store it as a transient. * It will get instantiated every time, it will get injected. * @param options options for creating a transient */ export function Transient(options?: TransientOptions): >(clazz: T) => T; export {}; } declare module 'dependory/inject' { import "reflect-metadata"; import { Registry } from "dependory/registry"; /** * Options for injecting a property into a class. */ export interface InjectOptions { /** * Registry to use for getting the value. * Defaults to the general default registry. */ registry?: Registry; /** * Key for finding a property to inject. * This overrides the actual type of the injectee. */ key?: string; } /** * Inject a property into a class. * @param options InjectOptions for injecting. */ export function Inject(options?: InjectOptions): any; export { Inject as inject }; } declare module 'dependory/clazz' { /** * Pseudo-Interface for wrapping classes. */ export interface Clazz { prototype: any; name: string; new (...args: any[]): T; } }