是否可以从具有相同参数和泛型但没有返回类型的现有类型记录函数创建新函数类型?我试图从ReturnNothing函数中创建ReturnSame类型,而不必手动定义它。OmitReturn is a made up Typescript utility.
const returnNothing3: OmitReturn<typeof returnSame> = (..
const wrapField = <T extends { value: string }>(fieldValue: string): T => ({});'{ value: string; }' is assignable to the constraint of type 'T', but 'T' could be instantiated