// 此文件跟同级目录的 global.d.ts 文件一样也是全局类型声明,只不过这里存放一些零散的全局类型,无需引入直接在 .vue 、.ts 、.tsx 文件使用即可获得类型提示 type RefType = T | null; type EmitType = (event: string, ...args: any[]) => void; type TargetContext = "_self" | "_blank"; type ComponentRef = ComponentElRef | null; type ElRef = Nullable; type ForDataType = { [P in T]?: ForDataType; }; type AnyFunction = (...args: any[]) => T; type PropType = VuePropType; type Writable = { -readonly [P in keyof T]: T[P]; }; type Nullable = T | null; type NonNullable = T extends null | undefined ? never : T; type Recordable = Record; type ReadonlyRecordable = { readonly [key: string]: T; }; type Indexable = { [key: string]: T; }; type DeepPartial = { [P in keyof T]?: DeepPartial; }; type Without = { [P in Exclude]?: never }; type Exclusive = (Without & U) | (Without & T); type TimeoutHandle = ReturnType; type IntervalHandle = ReturnType; type Effect = "light" | "dark"; interface ChangeEvent extends Event { target: HTMLInputElement; } interface WheelEvent { path?: EventTarget[]; } interface ImportMetaEnv extends ViteEnv { __: unknown; } interface Fn { (...arg: T[]): R; } interface PromiseFn { (...arg: T[]): Promise; } interface ComponentElRef { $el: T; } // function parseInt(s: string | number, radix?: number): number; // function parseFloat(string: string | number): number;