style(compiler-cli): ensure FFR type is implemented correctly (#29539)
PR Close #29539
This commit is contained in:
parent
06859f1335
commit
39345b6fae
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue