-
Notifications
You must be signed in to change notification settings - Fork 232
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
TS6133 Error if using typescript with noUnusedLocals and typescript preprocessor #322
Comments
What is TS6133? Is this something TypeScript has turned on by default? Any idea how we can fix or avoid this? :) |
@tjvr TS6133 is thrown when you declare something but never use it. It is enforced if you use Pull #323 should fix this issue. I wasn't sure if the proper etiquette for this project was to create a pull request or a pull request and an issue so I went with the more verbose option. |
Isn't that an issue on your end? That seems like a good deal of complexity for something that is easily fixable by the user. |
@glmdgrielson Could you clarify please? |
As far as I can tell, this issue has nothing to do with the Nearley module but instead is on your end. You said yourself that it's caused by your config, so why shouldn't you be able to fix it? Sorry if I'm being rude. I just don't see why it's such a big deal. 😕 |
Unfortunately, you can't configure It's an incredibly easy fix from the Nearley module side. Take a look at #323. To accomplish the same thing as a user, they would have to either:
None of these user workarounds are ideal. A module side fix is much more simple and costs practically nothing to implement. |
Happy to merge if not 👍 |
I just tried. Type checking the invocation of a |
The official website says:
So... I'm not so sure. But if it works for you, then I guess that works! |
The following line with context to #323 is a function declaration, not invocation. Unused declaration is ignored, but the invocation is still scrutinized. |
If you don't write first letter in capital for JS File Name /Class Name this issue can come up. I had this issue and resolved it by simply changing the file name to capital letter. I hope this might help. |
The functions declared in the output parser cause TS6133 errors when attempting to compile with typescript. This is because understandably, not all functions that are provided by builtins and generators are used in a user's grammar.
How to reproduce:
grammar.ne
The text was updated successfully, but these errors were encountered: