摘要:
Construct signatures are similar to call signatures, except they describe what should happen with the new keyword. interface DateConstructor { new (va 阅读全文
摘要:
Recursive types, are self-referential, and are often used to describe infinitely nestable types. For example, consider infinitely nestable arrays of n 阅读全文
摘要:
An interface is a way of defining an object type. An “object type” can be thought of as, “an instance of a class could conceivably look like this”. Fo 阅读全文
摘要:
TypeScript helps us catch a particular type of problem around the use of object literals. Let’s look at the situation where the error arises: // @erro 阅读全文
摘要:
If<C, T, F> Implement a type that evaluates to T if the type C is true or F if C is false. // Implement this type type If<C, T, F> = C extends true ? 阅读全文
摘要:
Union type: means "one of" those types Intersection type: means "combination" of those types Intersection types type typeAB = typeA & typeB; interface 阅读全文
摘要:
`any` type, you can assign any value for any type. For `unkown`, you can also assign any value to unkwon: But you cannot assign unkwon variable to ano 阅读全文