Skip to content

Feature Request: Provide TypeScript definitions (.d.ts) or migrate to TypeScript #31

@ctesniere

Description

@ctesniere

Hello dmn-moddle team

Is your feature request related to a problem? Please describe.

I'm using dmn-moddle in a TypeScript codebase, and since the package does not provide type definitions (.d.ts), I'm running into issues with missing autocompletion, lack of type safety, and poor IDE support. It also makes integration and contribution more error-prone without proper typings.

Describe the solution you'd like

I would like to see either:

  • official TypeScript definitions (index.d.ts) included in the package, or
  • a full migration of the codebase to TypeScript, allowing native type safety and better maintainability.

Providing just a .d.ts file for the public API would already be very helpful and could be maintained internally or published via DefinitelyTyped.

Describe alternatives you've considered

  • Writing custom .d.ts definitions manually for internal use, but they are hard to maintain and error-prone.
  • Using @types/dmn-moddle via DefinitelyTyped (but such a package doesn’t exist yet).
  • Relying on any, which defeats the purpose of using TypeScript and makes the developer experience worse.

Additional context

TypeScript adoption is very high across modern JavaScript/NodeJS projects, and providing typings improves developer experience significantly:

  • Improved IDE support and autocompletion
  • Compile-time validation of API usage
  • Implicit documentation through type declarations

Even a minimal .d.ts file for the exposed API would make a big difference. I'd be happy to help contribute this if the maintainers are open to it.

Thanks for your work on this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogQueued in backlogenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions