xstate-tools
xstate-tools copied to clipboard
Proposal: rename typegen file to `.d.ts`
The typegen file for machine is currently called [machine].typegen.ts
. Because this file only contains typings, it might be better to rename it to [machine].typegen.d.ts
.
I ran into this being an issue while using Nuxt, which processes .ts
files, but not .d.ts
files for this exact reason.
In the end it wasn't a huge deal, I have moved the machine and typegen file out of the folder that auto-imports .ts
files, but might be better to be safe than sorry.
I second and third that. TL;DR it's the standard file extension for TypeScript definition files according to Microsoft documentation and tools.
JetBrains IDEs also treat .d.ts
as TypeScript definition files (modules), so do bundlers, testing tools ... everybody.
It's also what one gets from services like DefinitelyTyped. It's what tsc creates if you ask for it or Microsoft's dts-gen.
That's a great idea (cc. @Andarist)