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

Add TypeScript definition #50

Merged
merged 7 commits into from
Jan 23, 2023
Merged

Add TypeScript definition #50

merged 7 commits into from
Jan 23, 2023

Conversation

leonsilicon
Copy link
Contributor

The current type definition on DefinitelyTyped is broken when using ESM with "moduleResolution": "node16" (since the npm package it produces doesn't include "type": "module" in its package.json file, leading to TypeScript incorrectly typing the default export (import wrapAnsi from 'wrap-ansi') as wrapAnsi.default).

Since the types are broken, instead of fixing them, I thought that I might as well just copy them to the wrap-ansi package itself so users don't need to separately install the type definition when importing wrap-ansi.

@sindresorhus sindresorhus merged commit bafa535 into chalk:main Jan 23, 2023
@sindresorhus
Copy link
Member

Thanks :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants