UNPKG

3 kBTypeScriptView Raw
1export function recmaDocument(this: import("unified").Processor<void, import("estree").Program, void, void>, ...settings: [] | [RecmaDocumentOptions | null | undefined]): void | import("unified").Transformer<import("estree").Program, import("estree").Program>;
2export type Directive = import('estree-jsx').Directive;
3export type ExportAllDeclaration = import('estree-jsx').ExportAllDeclaration;
4export type ExportDefaultDeclaration = import('estree-jsx').ExportDefaultDeclaration;
5export type ExportNamedDeclaration = import('estree-jsx').ExportNamedDeclaration;
6export type ExportSpecifier = import('estree-jsx').ExportSpecifier;
7export type Expression = import('estree-jsx').Expression;
8export type FunctionDeclaration = import('estree-jsx').FunctionDeclaration;
9export type ImportDeclaration = import('estree-jsx').ImportDeclaration;
10export type ImportDefaultSpecifier = import('estree-jsx').ImportDefaultSpecifier;
11export type ImportExpression = import('estree-jsx').ImportExpression;
12export type ImportSpecifier = import('estree-jsx').ImportSpecifier;
13export type Literal = import('estree-jsx').Literal;
14export type JSXElement = import('estree-jsx').JSXElement;
15export type ModuleDeclaration = import('estree-jsx').ModuleDeclaration;
16export type Node = import('estree-jsx').Node;
17export type Program = import('estree-jsx').Program;
18export type Property = import('estree-jsx').Property;
19export type SimpleLiteral = import('estree-jsx').SimpleLiteral;
20export type SpreadElement = import('estree-jsx').SpreadElement;
21export type Statement = import('estree-jsx').Statement;
22export type VariableDeclarator = import('estree-jsx').VariableDeclarator;
23/**
24 * Configuration for internal plugin `recma-document`.
25 */
26export type RecmaDocumentOptions = {
27 /**
28 * Whether to use either `import` and `export` statements to get the runtime
29 * (and optionally provider) and export the content, or get values from
30 * `arguments` and return things.
31 */
32 outputFormat?: 'function-body' | 'program' | null | undefined;
33 /**
34 * Whether to keep `import` (and `export … from`) statements or compile them
35 * to dynamic `import()` instead.
36 */
37 useDynamicImport?: boolean | null | undefined;
38 /**
39 * Resolve `import`s (and `export … from`, and `import.meta.url`) relative to
40 * this URL.
41 */
42 baseUrl?: string | null | undefined;
43 /**
44 * Pragma for JSX (used in classic runtime).
45 */
46 pragma?: string | null | undefined;
47 /**
48 * Pragma for JSX fragments (used in classic runtime).
49 */
50 pragmaFrag?: string | null | undefined;
51 /**
52 * Where to import the identifier of `pragma` from (used in classic runtime).
53 */
54 pragmaImportSource?: string | null | undefined;
55 /**
56 * Place to import automatic JSX runtimes from (used in automatic runtime).
57 */
58 jsxImportSource?: string | null | undefined;
59 /**
60 * JSX runtime to use.
61 */
62 jsxRuntime?: 'automatic' | 'classic' | null | undefined;
63};