25 lines
546 B
TypeScript
25 lines
546 B
TypeScript
|
// 声明一个模块,防止引入文件时报错
|
||
|
declare module '*.json';
|
||
|
declare module '*.png';
|
||
|
declare module '*.jpg';
|
||
|
declare module '*.scss';
|
||
|
declare module '*.ts';
|
||
|
declare module '*.js';
|
||
|
|
||
|
// 声明 ref
|
||
|
declare type RefType<T = any> = T | null;
|
||
|
// 申明 数组
|
||
|
declare type EmptyArrayType<T = any> = T[];
|
||
|
// 申明 对象
|
||
|
declare type EmptyObjectType<T = any> = {
|
||
|
[key: string]: T;
|
||
|
};
|
||
|
declare interface domType {
|
||
|
"id": string,
|
||
|
"left": number,
|
||
|
"right": number,
|
||
|
"top": number,
|
||
|
"bottom": number,
|
||
|
"width": number,
|
||
|
"height": number,
|
||
|
}
|