Skip to content
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

use dts parser option to handle dts file #1210

Closed
hardfist opened this issue Nov 20, 2022 · 0 comments · Fixed by #1226
Closed

use dts parser option to handle dts file #1210

hardfist opened this issue Nov 20, 2022 · 0 comments · Fixed by #1226
Assignees

Comments

@hardfist
Copy link
Contributor

Unfortunately tsc treats d.ts and ts file differently

  • a.ts
const a: string; // error
  • a.d.ts
const a :string // no error

so we can't use normal typescript parser to parse d.ts file, fortunately tsc parser has an option to control the parser behavior babel/babel-loader#912 (comment), so we should enable this option to handle dts file correctly

@jerrykingxyz jerrykingxyz linked a pull request Nov 21, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants