Skip to content

[types] Generate declarations from JS #563

@MysteryBlokHed

Description

@MysteryBlokHed

Created a separate issue to move discussion away from #555.

Adding the following options to the root tsconfig.json allows declaration files to be generated from JS:

"declaration": true,
"emitDeclarationOnly": true

The only concern I have is that it clogs up the repository with many .d.ts files, which shouldn't be committed. This can be partially solved with .gitignore (and then adding exceptions for the .d.ts files that are meant to be there), but it's still kind of annoying as a developer.

I tried changing the outDir option to put the declaration files into their own directory (like they used to be before the JSDoc migration), but it doesn't seem to copy over the .d.ts source files (like index.d.ts).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions