You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
TypeScript objects not being typed to classes/interfaces defined in typescript.d.ts (in want of more generic/flexible types)
ie: n: ts.ModifiersArray vs n: {flags: number} in base.ts line 61
Typing problems - if maybeVisitTypeArguments takes a type not externally declared, typeArguments get renamed, but adding a more strict typing like ts.ExpressionWithTypeArguments brings up an error when passed something like an object of type ts.CallExpression
error TS2345: Argument of type 'CallExpression' is not assignable to parameter of type 'ExpressionWithTypeArguments'.
typescript.d.ts(in want of more generic/flexible types)n: ts.ModifiersArrayvsn: {flags: number}inbase.tsline 61maybeVisitTypeArgumentstakes a type not externally declared,typeArgumentsget renamed, but adding a more strict typing likets.ExpressionWithTypeArgumentsbrings up an error when passed something like an object of typets.CallExpressionerror TS2345: Argument of type 'CallExpression' is not assignable to parameter of type 'ExpressionWithTypeArguments'.Breakage, in cases like these:
A
TypeLiteralnode is comprised ofFirst PunctuationSyntaxListCloseBraceTokenSyntaxListis where the interesting bit could happen:PropertySignatureIdentifierColonTokenStringKeywordAnother scenario:
The current algorithm
contextEmitwill renameqnameandblahbecause they are both identifiers, when we only want to renameqname.