Skip to content
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

Proposal: rename typegen file to .d.ts #241

Open
TheDutchCoder opened this issue Nov 9, 2022 · 2 comments
Open

Proposal: rename typegen file to .d.ts #241

TheDutchCoder opened this issue Nov 9, 2022 · 2 comments
Assignees

Comments

@TheDutchCoder
Copy link

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.

@WebMechanic
Copy link

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.

@davidkpiano
Copy link
Member

That's a great idea (cc. @Andarist)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants