declare interface Fn { (...arg: T[]): R; } declare interface PromiseFn { (...arg: T[]): Promise; } // 任意对象 declare interface IObj { [key: string]: T; [key: number]: T; } declare function parseInt(s: string | number, radix?: number): number; declare function parseFloat(string: string | number): number; declare type Dictionary = Record; declare type Nullable = T | null; declare type RefInstanceType = { $: T; } | null; declare type RefType = T | null; declare type CustomizedHTMLElement = HTMLElement & T; declare type Indexable = { [key: string]: T; }; declare type Hash = Indexable; // declare type DeepPartial = { // [P in keyof T]?: T[P] extends (infer U)[] // ? RecursivePartial[] // : T[P] extends object // ? RecursivePartial // : T[P]; // }; declare type DeepPartial = { [P in keyof T]?: DeepPartial; }; declare type SelectOptions = { label: string; value: any; }[]; declare type EmitType = (event: string, ...args: any[]) => void; declare type TargetContext = '_self' | '_blank';