Skip to content

Exact position of invalid characters not reported by scanner #43653

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

Closed
JoshuaKGoldberg opened this issue Apr 13, 2021 · 0 comments · Fixed by #44671
Closed

Exact position of invalid characters not reported by scanner #43653

JoshuaKGoldberg opened this issue Apr 13, 2021 · 0 comments · Fixed by #44671
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@JoshuaKGoldberg
Copy link
Contributor

Bug Report

🔎 Search Terms

invalid character exact position scanner

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ

⏯ Playground Link

Playground link with relevant code

💻 Code


var x;   

🙁 Actual behavior

The errors are reported without any column information.

index.ts:1:2 - error TS1127: Invalid character.

1 
   

index.ts:1:3 - error TS1127: Invalid character.

1 

🙂 Expected behavior

TypeScript should show exactly which character is invalid, no?

index.ts:1:2 - error TS1127: Invalid character.

1 
   ~


index.ts:1:3 - error TS1127: Invalid character.

1 
    ~

Noticed this while investigating #43005 (comment)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants