Skip to content

Commit 3dd05ef

Browse files
committed
feat: FunctionWithParamTokens.execute now returns the value of the function
Closes angular#3131
1 parent cfc18b5 commit 3dd05ef

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/angular2/src/test_lib/test_injector.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,11 @@ export class FunctionWithParamTokens {
184184
this._fn = fn;
185185
}
186186

187-
execute(injector: Injector): void {
187+
/**
188+
* Returns the value of the executed function.
189+
*/
190+
execute(injector: Injector): any {
188191
var params = ListWrapper.map(this._tokens, (t) => injector.get(t));
189-
FunctionWrapper.apply(this._fn, params);
192+
return FunctionWrapper.apply(this._fn, params);
190193
}
191194
}

0 commit comments

Comments
 (0)