You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
340 B
12 lines
340 B
2 years ago
|
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),
|
||
|
)
|
||
|
}
|