-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
fix: refactor resulting in miss TS type #543
fix: refactor resulting in miss TS type #543
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #543 +/- ##
=======================================
Coverage 98.69% 98.69%
=======================================
Files 3 3
Lines 306 306
Branches 136 136
=======================================
Hits 302 302
Misses 4 4 ☔ View full report in Codecov by Sentry. |
@@ -1,2 +1,2 @@ | |||
export { default } from './Pagination'; | |||
export type { PaginationProps } from './interface'; | |||
export type * from './interface'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afc163 This change is causing an issue when I am attempting to build with the latest version of rc-pagination
I'm seeing:
> tsc -b
node_modules/rc-pagination/lib/index.d.ts:2:1 - error TS1383: Only named exports may use 'export type'.
2 export type * from './interface';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you change this to export * from
./interfaceI believe things will do what you want and avoids this typescript error. This works fine because
interface.ts` is just a collection of types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide a reproduce codesandbox?
antd used: https://github.com/ant-design/ant-design/blob/3146699941268fc262e4d65d1bb5d107e598198c/components/pagination/Pagination.tsx#L6