-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: ts interface error #1772
fix: ts interface error #1772
Conversation
感谢PR!
|
b848045
to
e10168c
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #1772 +/- ##
========================================
Coverage 85.20% 85.20%
========================================
Files 197 197
Lines 8645 8645
Branches 2074 2074
========================================
Hits 7366 7366
Misses 1196 1196
Partials 83 83
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
1、2 done 3 的话,我只改了编译时报warning的情况 |
e10168c
to
41eebcd
Compare
在 TypeScript 中,使用 export interface 导出的接口,在引入时确实需要使用 import type 来声明。
这是因为 import type 声明的是类型,而不是值,这样可以避免在编译时将接口的定义包含在输出文件中,从而减小输出文件的大小。另外,使用 import type 还可以避免出现循环依赖的问题。