-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update export types #2170
Update export types #2170
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit bf044d7:
|
@dai-shi here you go |
@dai-shi all yours |
btw, @dbritto-dev do you understand why #2157 caused such an issue? It seems like TS picks different files for index and middleware, but I'm not sure how that could happen. It sounds like TS ignore "types" field, doesn't it? |
@dai-shi I understand the issue, in the case of inner packages when you use "types" outside of "import", "module", "require" or "default" ts use by default that types ignoring where you are importing the packages; when we added the new changes for the main package we fixed that but the inner packages still pointing to "d.ts" even if you are importing them from "esm" so that's the conflict In a nutshell the types were always imported from |
@dai-shi all yours |
So, the "types" line right under "exports" in v4.4.4 package.json was simply ignored? That explains it. |
@dai-shi would you mind taking care of these changes? I tested locally and works well |
Related Issues or Discussions
Fixes #2163
Summary
The types for should be under each type of import. For instance "import", "module", "require" and "default"
Check List
yarn run prettier
for formatting code and docs