摘要:
export const inferItemLiteral = <T>(t: T) => { return { output: t, }; }; const result1 = inferItemLiteral("a"); // ? {output: string} /* vs */ export 阅读全文
posted @ 2023-04-10 21:31
Zhentiw
阅读(17)
评论(0)
推荐(0)
摘要:
There are two options doing the same things. const makeSafe = <TParams extends any[], TReturn>(func: (...args: TParams) => TReturn) => ( ...args: TPar 阅读全文
posted @ 2023-04-10 21:16
Zhentiw
阅读(21)
评论(0)
推荐(0)