Skip to content

Conversation

michaelfaith
Copy link
Contributor

Since TS 4.7, two new type declaration extensions have been supported:

  • .d.cts for types from a compilation on .cts files
  • .d.mts for types from a compilation on .mts files

Support has been added for both of these type declarations. I also included two new test packages,
demonstrating the full .cts -> .cjs/.d.cts and .mts -> .mjs/.d.mts workflow

Fixes #3116

@michaelfaith
Copy link
Contributor Author

@microsoft-github-policy-service agree

@michaelfaith
Copy link
Contributor Author

michaelfaith commented Jun 17, 2023

Resolved repo-state conflict
Ran rush change

@michaelfaith michaelfaith force-pushed the feat/support-mts-cts branch from cae52b1 to d7b3146 Compare June 17, 2023 12:28
Since TS 4.7, two new type declaration extensions have been supported:
- `.d.cts` for types from a compilation on `.cts` files
- `.d.mts` for types from a compilation on `.mts` files

Support has been added for both of these type declarations.  I also
included two new test packages,
demonstrating the full .cts -> .cjs/.d.cts and .mts -> .mjs/.d.mts workflow
@michaelfaith michaelfaith force-pushed the feat/support-mts-cts branch from d7b3146 to 33591fa Compare June 17, 2023 12:48
@michaelfaith
Copy link
Contributor Author

Updated README (via repo-toolbox).

@michaelfaith michaelfaith marked this pull request as draft June 22, 2023 20:47
@michaelfaith michaelfaith marked this pull request as ready for review June 26, 2023 15:00
@ryanbas21
Copy link

This would be great since there are dts plugins that rely on api extractor and this could really help those of us who publish dual module system packages and need to provide typings for two modules

@michaelfaith
Copy link
Contributor Author

@octogonz any feedback on this change?

@octogonz
Copy link
Collaborator

I am on vacation, will be back next week

@michaelfaith
Copy link
Contributor Author

Hi @octogonz, are you still going to be looking at this?

@octogonz
Copy link
Collaborator

This PR was superseded by #4023, but the test cases are useful, so we'll accept it anyway. 😄
@iclanton

@octogonz octogonz enabled auto-merge November 16, 2023 05:44
@octogonz octogonz merged commit a2fe24e into microsoft:main Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[api-extractor] Support .d.mts for documentation and rollups
3 participants