摘要: As of TypeScript 2.4, it is now possible to define string enums, or more precisely, enums with string members. Just like any other numeric enum, strin 阅读全文
posted @ 2018-09-14 17:36 Zhentiw 阅读(344) 评论(0) 推荐(0)
摘要: Some functions may have different return types depending on the types of the arguments with which they’re invoked. Using TypeScript’s function overloa 阅读全文
posted @ 2018-09-14 16:14 Zhentiw 阅读(455) 评论(0) 推荐(0)
摘要: TypeScript 2.0 introduced a new primitive type called never, the type of values that never occur. It helps model the completion behavior of functions 阅读全文
posted @ 2018-09-14 15:39 Zhentiw 阅读(356) 评论(0) 推荐(0)
摘要: ypeScript 2.2 introduced the object, a type that represents any non-primitive type. It can be used to more accurately type methods such as Object.crea 阅读全文
posted @ 2018-09-14 15:25 Zhentiw 阅读(363) 评论(0) 推荐(0)