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
This is actually working as intended. // @ts-ignore is not meant to be a special lexical entity, it is just a marker on the line before, that can be insider another comment, JSX text or a string.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 3.0.0-dev.20180621
Search Terms:
ts-ignore
Code
Expected behavior:
3 times
Cannot find name 'nonExistent'.
Actual behavior:
No error, because the regex used to lookup the comment doesn't (and cannot reliably) check the surroundings of the comment.
To fix this, you probably need to use
getTokenAtPosition
andget(Leading|Trailing)CommentRanges
to check if this is really a comment.Playground Link: https://agentcooper.github.io/typescript-play/?jsx=1#code/DwPgUABFEPQxABALgZwLQEsDmA7A9gE4Cmk0A3vjgKIAeGKSROSAvmMDCANxhgAGYOIlSZchEgBIKeanQZNW-HmABEAHUHxk6bPmIqwlWvUbNlMAFQXNwnWOIQAhgBtnEJAAsi7jxhxYUCAsYQxljeTMgA
Related Issues:
The text was updated successfully, but these errors were encountered: