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