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

Bundle types in index.d.ts #245

Merged
merged 3 commits into from
Aug 27, 2023

Conversation

tommy-mitchell
Copy link
Contributor

Fixes #244.

Uses rollup-plugin-dts to bundle types and adds another tsd test for the bundled types.

@tommy-mitchell
Copy link
Contributor Author

I pinned the version of type-fest. In v4.3.0, the build fails due to sindresorhus/type-fest#674.

@sindresorhus
Copy link
Owner

package.json Outdated Show resolved Hide resolved
@tommy-mitchell
Copy link
Contributor Author

Resolved.

@sindresorhus sindresorhus merged commit 8a4cecd into sindresorhus:main Aug 27, 2023
3 checks passed
@jaywcjlove
Copy link

image

Could not read type file anymore. @tommy-mitchell @sindresorhus

"typescript": "^5.2.2"

@tommy-mitchell
Copy link
Contributor Author

@sindresorhus do we need a types field in package.json? Not really sure why NPM isn't resolving it.

@jaywcjlove
Copy link

@sindresorhus do we need a types field in package.json? Not really sure why NPM isn't resolving it.

used in a project, the type could not be loaded @tommy-mitchell

@sindresorhus
Copy link
Owner

This is a problem with your TSConfig, not this package. This package properly exports the types:

"types": "./build/index.d.ts",

See: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm

jaywcjlove added a commit to jaywcjlove/ejs-cli that referenced this pull request Aug 31, 2023
@jaywcjlove
Copy link

@sindresorhus thx!

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.

meow(...).flags is any in 12.1.0
3 participants