UNPKG

887 BTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { RawSourceMap } from 'source-map';
9import * as ts from 'typescript';
10export declare type TransformerFactoryCreator = (program?: ts.Program) => ts.TransformerFactory<ts.SourceFile>;
11export interface TransformJavascriptOptions {
12 content: string;
13 inputFilePath?: string;
14 outputFilePath?: string;
15 emitSourceMap?: boolean;
16 strict?: boolean;
17 typeCheck?: boolean;
18 getTransforms: TransformerFactoryCreator[];
19}
20export interface TransformJavascriptOutput {
21 content: string | null;
22 sourceMap: RawSourceMap | null;
23 emitSkipped: boolean;
24}
25export declare function transformJavascript(options: TransformJavascriptOptions): TransformJavascriptOutput;