-
Notifications
You must be signed in to change notification settings - Fork 11
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
Errors like 'AudioParamMap' incorrectly extends interface 'ReadonlyMap<string, AudioParam>'
#30
Comments
Hello @ehoogeveen-medweb , thank you for your report 😃 However, I could not reproduce the issue. Cloud you provide some reproduction so that I can take a closer look? Currently I'm guessing that two sets of type definitions are somehow loaded at the same time. Thanks 🙂 |
Sure! I was able to reduce it to the following config:
{
"compilerOptions": {
"target": "ESNext"
},
"include": ["**/*"]
}
{
"private": true,
"devDependencies": {
"better-typescript-lib": "^2.3.0",
"typescript": "^5.0.4"
}
} and an empty The target needs to be at least The full output:
|
Thanks! I can reproduce the problem now. Looking into it 👀 |
npx tsc --listFiles
Somehow tsc reads Found a workaround: explicitly specify {
"compilerOptions": {
"target": "ESNext",
"lib": ["ESNext", "dom"]
},
"include": ["**/*"]
} |
Thanks, the workaround appears to work correctly (though now I'm seeing errors in my files that were probably hidden before). Should I file a bug about this on the TypeScript side? |
Glad to know the workaround works 🙂 |
Oops, looks like this is a better-typescript-lib issue. Following "lib": ["es2022", "dom", "dom.iterable"], |
Hmm, unfortunately adding "dom.iterable" to the list seems to make the errors return! But without it, I can't use the spread operator on DOM collections. |
I was able to find a compromise: Omit dom.iterable for projects with |
Thanks for your patience. I'm about to release a fix 🙂 |
|
Yep, no more workaround needed! Thanks for the quick investigation :) |
Hi, I noticed recently that when I do a full build (
npx tsc --build . --force
) I'm getting a bunch of errors like the following:I think probably something changed in the stock typescript libs, but I'm having difficulty tracking down the source of these changes. I don't actually use these interfaces and subsequent builds (without
--force
) don't repeat the errors, but I'm not sure what the net result is as I don't actually use the emitted code (I use@babel/preset-typescript
instead).Could you have a look? This is with TypeScript v5.0.4 and
skipLibCheck: false
(I useskipLibCheck: true
for the main project but I have some type declaration-only projects that I check more strictly).The text was updated successfully, but these errors were encountered: