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
If I use the parse5 module in a new npm package and then run a typescript compile, I get errors from the inside the .d.ts files from the parse5 module. The compiler is complaining about the keyword type being included inside the brackets next to the import statements, and the compile succeeds if I manually remove those.
For example, inside index.d.ts in the published version, the first line is: import { type ParserOptions } from './parser/index.js';
I manually adjusted this to: import { ParserOptions } from './parser/index.js';
After applying this change in all .d.ts files, I was able to run typescript compile on my project.
I made a small project where I was able to replicate the issue. You should run into the same issue after running npm i && tsc. I am also uploading my output from running tsc.
Versions used:
node 18.14.2
npm 9.5.0
typescript 4.4.3
The text was updated successfully, but these errors were encountered:
If I use the
parse5
module in a newnpm
package and then run a typescript compile, I get errors from the inside the.d.ts
files from theparse5
module. The compiler is complaining about the keywordtype
being included inside the brackets next to the import statements, and the compile succeeds if I manually remove those.For example, inside
index.d.ts
in the published version, the first line is:import { type ParserOptions } from './parser/index.js';
I manually adjusted this to:
import { ParserOptions } from './parser/index.js';
After applying this change in all
.d.ts
files, I was able to run typescript compile on my project.I made a small project where I was able to replicate the issue. You should run into the same issue after running
npm i && tsc
. I am also uploading my output from runningtsc
.Versions used:
The text was updated successfully, but these errors were encountered: