-
Notifications
You must be signed in to change notification settings - Fork 0
generic new
ythy edited this page Nov 8, 2017
·
1 revision
T
应至少标注在 function
class
上,与内容/参数 相互约束
interface MobileSelectStatic{
new<T> (config: Config<T>): MobileSelect;
}
interface Config<T>{
triggerDisplayData?: boolean,
wheels: WheelData<T>[],
keyMap?: T,
callback?: (indexArr: number[], data: T[]) => void,
}
此例子, 当wheels
T
类型为string
new
类型相应显示为string
tell me how get back to sunshine