/// import ts = require('typescript'); import { RawSourceMap } from 'source-map'; import MagicString = require('magic-string'); export declare abstract class MappedAction { abstract execute(ast: ts.SourceFile, magicString: MagicString): ts.SourceFile; abstract getStart(): number; } export declare abstract class FastAction { abstract execute(ast: ts.SourceFile): ts.SourceFile; } export declare type Action = MappedAction | FastAction; export declare class ReplaceAction extends MappedAction { private start; private end; private str; constructor(start: number, end: number, str: string); execute(ast: ts.SourceFile, magicString: MagicString): ts.SourceFile; getStart(): number; } export declare class InsertAction extends MappedAction { private start; private str; constructor(start: number, str: string); execute(ast: ts.SourceFile, magicString: MagicString): ts.SourceFile; getStart(): number; } export declare class FastAppendAction extends FastAction { private str; constructor(str: string); execute(ast: ts.SourceFile): ts.SourceFile; } export declare class FastRewriteAction extends FastAction { private start; private str; constructor(start: number, str: string); execute(ast: ts.SourceFile): ts.SourceFile; } export declare class MutableSourceCode { private _ast; private magicString; private originalText; private origLineStarts; private _sourceMap; constructor(ast: ts.SourceFile); readonly ast: ts.SourceFile; execute(actionList: Array): void; readonly sourceMap: RawSourceMap; readonly code: string; translateMap(from: RawSourceMap): RawSourceMap; translateDiagnostic(diag: ts.Diagnostic): ts.Diagnostic; }