摘要:
Let's say we have a const of object: export const programModeEnumMap = { GROUP: "group", ANNOUNCEMENT: "announcement", ONE_ON_ONE: "1on1", SELF_DIRECT 阅读全文
摘要:
For example we have a discriminated union type: export type Event = | { type: "click"; event: MouseEvent; } | { type: "focus"; event: FocusEvent; } | 阅读全文
摘要:
Give a discriminated union: export type Event = | { type: "click"; event: MouseEvent; } | { type: "focus"; event: FocusEvent; } | { type: "keydown"; e 阅读全文
摘要:
Implement the type Filter<T, Predicate> takes an Array T, primitive type or union primitive type Predicate and returns an Array include the elements o 阅读全文
摘要:
Returns true if all elements of the list are equal to the second parameter passed in, false if there are any mismatches. For example type Test1 = [1, 阅读全文