摘要:
The definite assignment !: operator is used to suppress TypeScript’s objections about a class field being used, when it can’t be proven1 that it was i 阅读全文
摘要:
Requirements: function strBuilder(str) { return strBuilder; // TODO } var hello = strBuilder("Hello, "); var kyle = hello("Kyle"); var susan = hello(" 阅读全文
摘要:
value is Foo The first kind of user-defined type guard we will review is an is type guard. It is perfectly suited for our example above because it’s m 阅读全文
摘要:
class UnreachableError extends Error { constructor(_nvr: never, message: string) { super(message) } } class Car { drive() { console.log("vroom") } } c 阅读全文