摘要:
import { Equal, Expect } from "../helpers/type-utils"; const obj = { a: 1, b: 2, c: 3, } as const; type ObjKey = keyof typeof obj; //Type '"a"' is not 阅读全文
摘要:
// You'll need to use function overloads to figure this out! function useData<T>(params: { fetchData: () => Promise<T>; initialData?: T }): { getData: 阅读全文