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
Apparently it's now possible for Nodes to not have any tokens, which I'm not sure how to fix.
The other issues look minor, just some adjusted signatures.
test/rules/control-flow/testCfaRule.ts:32:34 - error TS2345: Argument of type 'Node | undefined' is not assignable to parameter of type 'Node'.
Type 'undefined' is not assignable to type 'Node'.
32 ctx.addFailureAtNode(node.getFirstToken(ctx.sourceFile), 'control flow end');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/tokenTests.ts:67:45 - error TS2345: Argument of type 'Node | undefined' is not assignable to parameter of type 'Node'.
Type 'undefined' is not assignable to type 'Node'.
67 assert.isUndefined(getPreviousToken(sourceFile.getFirstToken()), 'Token');
~~~~~~~~~~~~~~~~~~~~~~~~~~
util/type.ts:87:5 - error TS2322: Type 'ReadonlyArray<Signature>' is not assignable to type 'Signature[]'.
Property 'push' is missing in type 'ReadonlyArray<Signature>'.
87 return type.getCallSignatures();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
util/type.ts:97:61 - error TS2345: Argument of type 'Type | undefined' is not assignable to parameter of type 'Type'.
Type 'undefined' is not assignable to type 'Type'.
97 for (const ty of unionTypeParts(checker.getApparentType(type))) {
~~~~
util/util.ts:85:41 - error TS2345: Argument of type 'Node' is not assignable to parameter of type 'Declaration'.
Property '_declarationBrand' is missing in type 'Node'.
85 return (ts.getCombinedModifierFlags(node) & flag) !== 0;
~~~~
util/util.ts:953:15 - error TS2339: Property 'unescapeIdentifier' does not exist on type 'typeof ts'.
953 return ts.unescapeIdentifier ? ts.unescapeIdentifier(node.text) : node.text;
~~~~~~~~~~~~~~~~~~
util/util.ts:953:39 - error TS2339: Property 'unescapeIdentifier' does not exist on type 'typeof ts'.
953 return ts.unescapeIdentifier ? ts.unescapeIdentifier(node.text) : node.text;
~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
IIUC this is not a problem with the library but only occurs when building with a newer TypeScript version?
Regarding "Nodes to not have any tokens": this was possible before. Not the type declarations are just more correct. The cases above can simply be asserted to never be undefined.
That Type | undefined can also be asserted.
ReadonlyArray<Signature> not assignable to Signature[] probably just needs to fix the return type of the containing function.
The (un)escapeIdentifier functions needs an assertion to any.
If you want to fix this, feel free to send a PR. Otherwise I'll try to get this fixed tomorrow.
These build errors are from updating the version of TypeScript in package.json. Sorry for not being clear.
I'm happy if you fix it, so I can wait. If you are too busy I can otherwise try creating a PR, but I suspect it'll be about as much work for you to review my PR as it would be to fix it directly. :)
With TypeScript 3.0.0-rc, below failures.
Apparently it's now possible for Nodes to not have any tokens, which I'm not sure how to fix.
The other issues look minor, just some adjusted signatures.
The text was updated successfully, but these errors were encountered: