microsoft / microsoft/TypeScript
JS files should parse as JS, not as JSX
Đang mở
@sandersn đang làm issue này rồi.
Từ ngày 26/7/2021.
Awaiting More Feedback
Suggestion
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.4k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 117
Mô tả
Bug Report
🔎 Search Terms
TS1005 allowJS
🕗 Version & Regression Information
3.3.3
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about allowJS and TS1005
- I was unable to test this on prior versions because playground
⏯ Playground Link
💻 Code
tsc --allowJs --checkJs test.js
true< /\b/.test("") // OK
true</\b/.test("") // FAIL
This is a small reproducing example.
The real-world code causing this issue is: https://unpkg.com/froala-editor@4.0.3/js/froala_editor.min.js
🙁 Actual behavior
:2:2 - error TS1005: ';' expected.
:2:7 - error TS1127: Invalid character.
:2:10 - error TS1109: Expression expected.
🙂 Expected behavior
Compiles successfully, because line 1 and line 2 are semantically equal in JS.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.