import { NonUndefined } from './nonUndefined'; /** * 取出没有包含函数类型的参数组成一个新类型 * @example * 输入: * type Example = { * name: string | undefined; * setName: (...args: any) => any | undefined; * someKeys?: string; * someFn?: (...args: any) => any; * }; * type example2 = NonFunction; * 输出: * type example2 = { * name: string | undefined; * someKeys?: string | undefined; * } */ export type NonFunction = Pick extends Function ? never : K; }[keyof T]>;