-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node InferType did not pass test 'isEntityName' #509
Comments
@marcj I assume it's because of a change in TypeScript. I'm using 5.2.2 here. |
In my PR for adding Nx to the repository, I had also upgraded the TypeScript version to 5.2.2, and the same error occurred. |
I don't know. The old PR and your patch doesn't fix it, it basically disables the whole sextion since found is then always false, iirc. need to look into it closer to figure out a solution |
@marcj I'm gonna have a look at it |
@timvandam did you also have this issue with TypeScript 5.2.2 or was it a different version? |
idk I forgot |
FYI TypeScript 4.9.5 works fine with this code |
@marcj the following patch to TypeScript fixes the issue for me diff --git a/node_modules/typescript/lib/typescript.js b/node_modules/typescript/lib/typescript.js
index 86ab90b..dc72ecb 100644
--- a/node_modules/typescript/lib/typescript.js
+++ b/node_modules/typescript/lib/typescript.js
@@ -87586,7 +87586,7 @@ ${lanes.join("\n")}
[183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
return context.factory.updateTypeReferenceNode(
node,
- Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
+ Debug.checkDefined(nodeVisitor(node.typeName, visitor, node => isTypeNode(node) || isEntityName(node))),
nodesVisitor(node.typeArguments, visitor, isTypeNode)
);
}, |
I discovered that this issue only happens for me if I don't get this error when
I think it's because the error is thrown in |
that's weird |
i edited my previous post so now this one is pointless but i didn't want to delete it because i am scared of deleting things |
The original issue was marked as complete even though it wasn't fixed.
Reproduction
Workaround
Disable reflection for the specific scope
/** @reflection never */
The text was updated successfully, but these errors were encountered: