1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import MagicString from 'magic-string';
|
17 | export declare const IMPORT_DECLARATION = "ImportDeclaration";
|
18 | export declare const IMPORT_SPECIFIER = "ImportSpecifier";
|
19 | export declare const IMPORT_DEFAULT_SPECIFIER = "ImportDefaultSpecifier";
|
20 | export declare const IMPORT_NAMESPACE_SPECIFIER = "ImportNamespaceSpecifier";
|
21 | export declare const EXPORT_NAMED_DECLARATION = "ExportNamedDeclaration";
|
22 | export declare const EXPORT_SPECIFIER = "ExportSpecifier";
|
23 | export declare const EXPORT_DEFAULT_DECLARATION = "ExportDefaultDeclaration";
|
24 | export declare const EXPORT_ALL_DECLARATION = "ExportAllDeclaration";
|
25 | export declare const ALL_EXPORT_DECLARATIONS: string[];
|
26 | export declare type Range = [number, number];
|
27 | export declare type CollectedExports = Map<string | null, Array<string>>;
|
28 | export declare enum ExportClosureMapping {
|
29 | NAMED_FUNCTION = 0,
|
30 | NAMED_CLASS = 1,
|
31 | NAMED_DEFAULT_FUNCTION = 2,
|
32 | DEFAULT_FUNCTION = 3,
|
33 | NAMED_DEFAULT_CLASS = 4,
|
34 | DEFAULT_CLASS = 5,
|
35 | NAMED_CONSTANT = 6,
|
36 | DEFAULT = 7,
|
37 | DEFAULT_VALUE = 8,
|
38 | DEFAULT_OBJECT = 9
|
39 | }
|
40 | export interface ExportDetails {
|
41 | local: string;
|
42 | exported: string;
|
43 | type: ExportClosureMapping;
|
44 | range: Range;
|
45 | source: string | null;
|
46 | }
|
47 | export declare type TransformMethod = (code: string) => Promise<MagicString>;
|
48 | export interface TransformInterface {
|
49 | name: string;
|
50 | }
|
51 | export interface PluginOptions {
|
52 | [key: string]: string | boolean;
|
53 | }
|