摘要:
In this exercise we have an interface MyComplexInterface which is acting as a type helper. The interface takes arguments for Event, Context, Name, and 阅读全文
摘要:
import { Equal, Expect } from "../helpers/type-utils"; type GetPropValue< T extends Record<PropertyKey, any>, P extends keyof T = "data" > = T extends 阅读全文
摘要:
Let's say we have type TemplateLiteralKey = `${"user" | "post" | "comment"}${"Id" | "Name"}`; We want to make a type type ObjectOfKeys = unknown; In o 阅读全文
摘要:
Here we have a Sandwich type that's currently assigned to unknown We also have a couple of union types, BreadType and Filling, that have several optio 阅读全文
摘要:
Let's say we have an object as const: const frontendToBackendEnumMap = { singleModule: "SINGLE_MODULE", multiModule: "MULTI_MODULE", sharedModule: "SH 阅读全文
摘要:
Let's say we have a const of object: export const programModeEnumMap = { GROUP: "group", ANNOUNCEMENT: "announcement", ONE_ON_ONE: "1on1", SELF_DIRECT 阅读全文