| @@ -19,7 +19,7 type VisitDependency<D, S> = D extends { | |||
|
|
19 | 19 | export class Builder<T, S> { |
|
|
20 | 20 | consume<P extends any[]>(...args: P) { |
|
|
21 | 21 | return <C extends new (...args: ExtractDependency<P, S>) => T>(constructor: C) => { |
|
|
22 | // return constructor; | |
|
|
22 | return constructor as typeof constructor & { service: () => T }; | |
|
|
23 | 23 |
|
|
|
24 | 24 | } |
|
|
25 | 25 | |
| @@ -34,4 +34,8 export class Builder<T, S> { | |||
|
|
34 | 34 | }; |
|
|
35 | 35 | } |
|
|
36 | 36 | |
|
|
37 | cast<T2 extends T>(): Builder<T2, S> { | |
|
|
38 | return this as Builder<T2, S>; | |
|
|
37 | 39 | } |
|
|
40 | ||
|
|
41 | } | |
General Comments 0
You need to be logged in to leave comments.
Login now
