tsdjs / tsd

Check TypeScript type definitions
MIT License
2.4k stars 67 forks source link

reference file with extension .ts or filenames containing uppercase letters does not throw Errors #145

Open Uzlopak opened 2 years ago

Uzlopak commented 2 years ago

Hi,

we had unfortunately some regressions in mongoose, because I messed up a filename by naming it cursor.ts and not cursor.d.ts. Also there is a bug/feature in typescript that enforces, that filenames of d.ts files should only contain lowercase characters.In both cases tsd does not throw any error.

it would be cool if tsd would recognize this and throw errors.

The bugs we had: https://github.com/Automattic/mongoose/pull/11469 https://github.com/Automattic/mongoose/issues/11512

Link to the uppercase issue: https://github.com/microsoft/TypeScript/issues/45096

How I hope we avoid similiar regressions in the future: https://github.com/Automattic/mongoose/pull/11516