style(compiler-cli): ensure FFR type is implemented correctly (#29539)

PR Close #29539
This commit is contained in:
Pete Bacon Darwin 2019-03-26 14:16:49 +00:00 committed by Jason Aden
parent 06859f1335
commit 39345b6fae
1 changed files with 4 additions and 4 deletions

View File

@ -253,8 +253,8 @@ export function unwrapForwardRef(node: ts.Expression, reflector: ReflectionHost)
* @returns an unwrapped argument if `ref` pointed to forwardRef, or null otherwise
*/
export function forwardRefResolver(
ref: Reference<ts.FunctionDeclaration|ts.MethodDeclaration>,
args: ts.Expression[]): ts.Expression|null {
ref: Reference<ts.FunctionDeclaration|ts.MethodDeclaration|ts.FunctionExpression>,
args: ReadonlyArray<ts.Expression>): ts.Expression|null {
if (!isAngularCoreReference(ref, 'forwardRef') || args.length !== 1) {
return null;
}
@ -266,8 +266,8 @@ export function forwardRefResolver(
* @param resolvers Resolvers to be combined.
*/
export function combineResolvers(resolvers: ForeignFunctionResolver[]): ForeignFunctionResolver {
return (ref: Reference<ts.FunctionDeclaration|ts.MethodDeclaration>,
args: ts.Expression[]): ts.Expression |
return (ref: Reference<ts.FunctionDeclaration|ts.MethodDeclaration|ts.FunctionExpression>,
args: ReadonlyArray<ts.Expression>): ts.Expression |
null => {
for (const resolver of resolvers) {
const resolved = resolver(ref, args);