Files
lib/src/di/constructable.ts

12 lines
340 B
TypeScript
Raw Normal View History

2022-01-17 15:57:40 -06:00
import {Container} from './Container'
import {TypedDependencyKey} from './types'
import {Pipeline} from '../util'
export type Constructable<T> = Pipeline<Container, T>
export function constructable<T>(key: TypedDependencyKey<T>): Constructable<T> {
return new Pipeline<Container, T>(
container => container.make(key),
)
}