injection-js
Version:
Dependency Injection library for JavaScript and TypeScript
32 lines (31 loc) • 871 B
TypeScript
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @whatItDoes Represents a type that a Component or other object is instances of.
*
* @description
*
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is being represented by
* the `MyCustomComponent` constructor function.
*
* @stable
*/
export declare const Type: FunctionConstructor;
export declare function isType(v: any): v is Type<any>;
/**
* @description
*
* Represents an abstract class `T`, if applied to a concrete class it would stop being
* instantiable.
*/
export interface AbstractType<T> extends Function {
prototype: T;
}
export interface Type<T = object> extends Function {
new (...args: any[]): T;
}