-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathglobal.d.ts
More file actions
117 lines (99 loc) · 2.25 KB
/
global.d.ts
File metadata and controls
117 lines (99 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
declare module "*.bmp" {
const src: string;
export default src;
}
declare module "*.gif" {
const src: string;
export default src;
}
declare module "*.jpg" {
const src: string;
export default src;
}
declare module "*.jpeg" {
const src: string;
export default src;
}
declare module "*.png" {
const src: string;
export default src;
}
declare module "*.webp" {
const src: string;
export default src;
}
declare module "*.svg" {
import type * as React from "react";
export const ReactComponent: React.FunctionComponent<
React.SVGProps<SVGSVGElement>
>;
const src: string;
export default src;
}
declare module "*.module.css" {
const classes: Readonly<Record<string, string>>;
export default classes;
}
declare module "*.scss" {
const classes: Readonly<Record<string, string>>;
export default classes;
}
declare module "*.module.scss" {
const classes: Readonly<Record<string, string>>;
export default classes;
}
declare module "*.less" {
const classes: Readonly<Record<string, string>>;
export default classes;
}
declare module "*.module.less" {
const classes: Readonly<Record<string, string>>;
export default classes;
}
declare namespace VsCodeApi {
export const postMessage: (message: any) => void;
export const getState: () => any;
export const setState: (state: any) => void;
}
interface Window {
vscodeEnv: {
platform: NodeJS.Platform;
};
}
type ImageType = "avif" | "ico" | "jpg" | "png" | "gif" | "webp" | "svg";
interface ImageInfo {
/**
* @description 生成的 vscode url
* @example 'https://file%2B.vscode-resource.vscode-cdn.net/Users/xxx/project/src/assets/images/test.png'
* */
url: string;
/**
* @description 图片名称
* @example 'test.png'
* */
name: string;
/**
* @description 图片后缀
* @example '.png'
* */
ext: string;
}
interface DirInfo {
/**
* @description 系统完整路径
* @example '/Users/xxx/project/src/assets/images'
* */
completePath: string;
/**
* @description 展示在webview的短路径,不具备有效信息
* @example '/assets/images'
* */
shortPath: string;
/** 该目录下的图片列表 */
imageList: ImageInfo[];
}
interface ImageBasicInfo {
width: number;
height: number;
size: string;
}