类型别名
xcatliu opened this issue · 6 comments
LDQs commented
别名是不是一般都要大写的?
xcatliu commented
语法上没有限制,不过参考 TypeScript 官方的写法,一般建议用 Pascel 格式。
weiweidong1993 commented
初学者用不到这么*科技的东西吧
allenlinc commented
type NameResolver = () => string;是创建函数吧
Adam171419546 commented
@allenlinc
type NameResolver = () => string;是创建函数吧
只是函数声明类型,看函数的类型那章的=>那块
yclgkd commented
@allenlinc
type NameResolver = () => string;是创建函数吧
是 接收一个函数为参数,左边是输入右边是输出,左边没限制,右边限制为string,具体看函数的类型那部分