fix(ivy): emit generic types when needed in defs in .d.ts file (#25406)
Ivy definitions in .d.ts files often reference the type of a class. Sometimes, those classes have generic type parameters. When this is the case, ngtsc needs to emit generic type parameters in the .d.ts files (usually by passing 'any'). PR Close #25406
This commit is contained in:

committed by
Matias Niemelä

parent
b97d770e60
commit
d33e0091df
@ -156,7 +156,7 @@ export function extractDirectiveMetadata(
|
||||
inputs: {...inputsFromMeta, ...inputsFromFields},
|
||||
outputs: {...outputsFromMeta, ...outputsFromFields}, queries, selector,
|
||||
type: new WrappedNodeExpr(clazz.name !),
|
||||
typeArgumentCount: (clazz.typeParameters || []).length,
|
||||
typeArgumentCount: reflector.getGenericArityOfClass(clazz) || 0,
|
||||
typeSourceSpan: null !, usesInheritance, exportAs,
|
||||
};
|
||||
return {decoratedElements, decorator: directive, metadata};
|
||||
|
Reference in New Issue
Block a user