DefinitelyTyped/types/di/index.d.ts
johnjbarton 98d94b19b1 Add new (pariial) typings for npm 'di' github 'node-di' (#27741)
These typings are adequate for the primary user of di, karma-runner.
The underlying project is deprecated and we will move to a new di system,
but these typings help document where we are today.
2018-08-03 10:45:02 -07:00

16 lines
538 B
TypeScript

// Type definitions for di 0.0
// Project: https://github.com/vojtajina/node-di
// Definitions by: John J Barton <https://github.com/johnjbarton>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
/// <reference types="node" />
export class Injector {
get(dep: string): {};
invoke(fn: (context: {}, deps: Array<{}>) => {}, context: {}): {};
instantiate({prototype: {}}): {};
createChild(modules: Array<{}>): Injector;
constructor(modules?: Array<{}>, parent?: Injector);
}