-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
49 lines (43 loc) · 861 Bytes
/
typings.d.ts
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
declare module '*.css';
declare module '*.less';
declare module '*.png';
declare module '*.svg' {
export function ReactComponent(
props: React.SVGProps<SVGSVGElement>,
): React.ReactElement;
const url: string;
export default url;
}
type BaseAssetsType = {
url: string;
base?: string;
};
type CssAssetsType = BaseAssetsType;
type JsAssetsType = {
moduleName: string;
} & BaseAssetsType;
type AssetsType = {
base?: string;
css?: {
[key: string]: string | CssAssetsType;
};
js?: {
[key: string]: JsAssetsType;
};
};
type StringType = {
[key: string]: string;
};
type FormattedOptType = {
base?: string;
css?: {
[key: string]: CssAssetsType;
};
js?: {
[key: string]: JsAssetsType;
};
};
type PluginType = {
assets: FormattedOptType;
getEntryAssets: (type: 'css' | 'js', arg: StringType) => void;
};