1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { RawSourceMap } from 'source-map';
|
9 | import * as ts from 'typescript';
|
10 | export declare type TransformerFactoryCreator = (program?: ts.Program) => ts.TransformerFactory<ts.SourceFile>;
|
11 | export interface TransformJavascriptOptions {
|
12 | content: string;
|
13 | inputFilePath?: string;
|
14 | outputFilePath?: string;
|
15 | emitSourceMap?: boolean;
|
16 | strict?: boolean;
|
17 | typeCheck?: boolean;
|
18 | getTransforms: TransformerFactoryCreator[];
|
19 | }
|
20 | export interface TransformJavascriptOutput {
|
21 | content: string | null;
|
22 | sourceMap: RawSourceMap | null;
|
23 | emitSkipped: boolean;
|
24 | }
|
25 | export declare function transformJavascript(options: TransformJavascriptOptions): TransformJavascriptOutput;
|