angular / tsickle

Tsickle — TypeScript to Closure Translator
MIT License
896 stars 110 forks source link

Fix number of type args #1436

Closed copybara-service[bot] closed 1 year ago

copybara-service[bot] commented 1 year ago

Fix number of type args

typeChecker.getTypeArguments(referenceType) returns a list of type arguments of all local and parent/outer type parameters as well as sometimes another type argument for the this type.

Luckily the order is deterministic and we can use referenceType.target.{outer,local}TypeParameters to figure out which ones we need to emit.

This also adds logging, just in case my understanding of TypeScript's API is not correct.