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

🧐[问题 | question] ��于:推荐任何时候都是用 type #11161

Open
tlerbao opened this issue Feb 20, 2024 · 0 comments
Open

🧐[问题 | question] 关于:推荐任何时候都是用 type #11161

tlerbao opened this issue Feb 20, 2024 · 0 comments

Comments

@tlerbao
Copy link

tlerbao commented Feb 20, 2024

https://pro.ant.design/zh-CN/docs/type-script
文中提到,推荐任何时候都是用 type

那么继承是使用 type & type 是吗?

听说 & 交集不如 interface的extends 效率高

下文中有提到
https://www.totaltypescript.com/type-vs-interface-which-should-you-use

问题一:全用type ,请问,存在这个不如extends的效率问题吗?
问题二:建议在src/services/API.d.ts定义,项目比较大时全定义在一个文件显然不合适,推荐怎么分文件定义嗯?

@tlerbao tlerbao changed the title 🧐[问题 | question] 关于:It is recommended to use type at all times. Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant