You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.0 KiB
52 lines
1.0 KiB
declare interface Fn<T = any> {
|
|
(...arg: T[]): T;
|
|
}
|
|
|
|
// 任意对象
|
|
declare interface IObj<T = any> {
|
|
[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<T> = Record<string, T>;
|
|
|
|
declare type Nullable<T> = T | null;
|
|
|
|
declare type RefInstanceType<T> = {
|
|
$: T;
|
|
} | null;
|
|
|
|
declare type RefType<T> = T | null;
|
|
|
|
declare type CustomizedHTMLElement<T> = HTMLElement & T;
|
|
|
|
declare type Indexable<T = any> = {
|
|
[key: string]: T;
|
|
};
|
|
|
|
declare type Hash<T> = Indexable<T>;
|
|
|
|
// declare type DeepPartial<T> = {
|
|
// [P in keyof T]?: T[P] extends (infer U)[]
|
|
// ? RecursivePartial<U>[]
|
|
// : T[P] extends object
|
|
// ? RecursivePartial<T[P]>
|
|
// : T[P];
|
|
// };
|
|
|
|
declare type DeepPartial<T> = {
|
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
};
|
|
|
|
declare type SelectOptions = {
|
|
label: string;
|
|
value: any;
|
|
}[];
|
|
|
|
declare type EmitType = (event: string, ...args: any[]) => void;
|
|
|
|
declare type TargetContext = '_self' | '_blank';
|
|
|