-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
38 lines (33 loc) · 949 Bytes
/
index.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
import type { Plugin } from 'esbuild';
declare namespace ESBuildPluginAssetsManifest {
interface Assets {
[name: string]: {
[ext: string]: string;
};
}
type ProcessOutputFn = (assets: Assets) => string;
interface Options {
/**
* required. the name of manifest file
*/
filename: string;
/**
* optional. default is `outdir` of esbuild config
*/
path?: string;
/**
* optional. will be appended to the manifest json
*/
metadata?: Record<string, unknown>;
/**
* optional. return value of this function will overwrite the manifest json file
*/
processOutput?: ProcessOutputFn;
}
}
declare function assetsManifestPlugin(options: ESBuildPluginAssetsManifest.Options): Plugin;
declare namespace assetsManifestPlugin {
type Assets = ESBuildPluginAssetsManifest.Assets;
type Options = ESBuildPluginAssetsManifest.Options;
}
export = assetsManifestPlugin;