(tokens: any[], fn: Function)
| 945 | * @publicApi |
| 946 | */ |
| 947 | export function inject(tokens: any[], fn: Function): () => any { |
| 948 | const testBed = TestBedImpl.INSTANCE; |
| 949 | // Not using an arrow function to preserve context passed from call site |
| 950 | return function (this: unknown) { |
| 951 | return testBed.execute(tokens, fn, this); |
| 952 | }; |
| 953 | } |
| 954 | |
| 955 | /** |
| 956 | * @publicApi |
searching dependent graphs…