Skip to content

[FeatureRequest] Document request on .d.mts .d.cts #46660

@loynoir

Description

@loynoir

Suggestion

Document on new typescript file pattern .d.mts .d.cts

  1. Can .d.mts .d.cts just be treated like .d.ts?
    https://github.com/rollup/plugins/pull/1033/files

  2. A spec defining these file extensions

  3. ...

🔍 Search Terms

.d.mts .d.cts rollup

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

📃 Motivating Example

  1. Can .d.mts .d.cts just be treated as .d.ts?
    Crash on new typescript file pattern .d.mts .d.cts rollup/plugins#1032 (comment)

  2. Related rollup PR
    Add .d.mts .d.cts compact rollup/plugins#1033

💻 Use Cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions