摘要: For example we want to have one object merge into Window with type information as well. import { Equal, Expect } from "../helpers/type-utils"; const a 阅读全文
posted @ 2023-02-24 15:22 Zhentiw 阅读(41) 评论(0) 推荐(0) 编辑
摘要: import { Equal, Expect } from '../helpers/type-utils'; export function makeEventHandlers< T extends { [Key in keyof T]: (key: Key) => void } >(obj: T) 阅读全文
posted @ 2023-02-24 15:02 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: So we have the configObj look like this: export const configObj = { routes: ["/", "/about", "/contact"], fetchers: { // @ts-expect-error "/does-not-ex 阅读全文
posted @ 2023-02-24 14:58 Zhentiw 阅读(18) 评论(0) 推荐(0) 编辑