🐛 Bug: Emitted d.ts references internal only typescript types which causes errors in the d.ts file when typechecking
Bug Report Checklist
- [x] I have tried restarting my IDE and the issue persists.
- [x] I have pulled the latest
mainbranch of the repository. - [x] I have searched for related issues and found none that matched my issue.
Expected
The emitted d.ts not to reference non-existent types
Actual
The emitted d.t references non-existent types
Additional Info
https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/typings/typescript.d.ts augments the typescript namespace to include some internal types.
The method in question, https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/src/flags.ts#L92-L101, is marked with @internal and stripInternal could be enabled to fix this issue.
This makes it impossible to type-check a project without skipLibCheck enabled, as it will always have type errors
👍 Makes sense to me, thanks for filing. @kirkwaiblinger @RebeccaStevens WDYT?
I also wonder if we should have some kind of end-to-end types test that runs without skipLibCheck, to stop this kind of error in the future?
one solution i have in mind is to put the internal types in some namespace like #typescript or Typescript_Internal
I'm willing to pr a fix to this