保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 9bdb95c9e34cef640534e5e5a1e2225a80442000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { Replacement, SourceAndMapMixin } from '.';
import Source = require('./Source');
 
/**
 * Decorates a Source with replacements and insertions of source code.
 *
 */
declare class ReplaceSource extends Source implements SourceAndMapMixin {
    replacements: Replacement[];
 
    /**
     * The ReplaceSource supports "identity" mappings for child source.
     * When original source matches generated source for a mapping it's assumed to be mapped char by char allowing to split mappings at replacements/insertions.
     */
    constructor(source: Source, name?: string);
 
    /**
     * Replaces chars from start (0-indexed, inclusive) to end (0-indexed, inclusive) with replacement.
     */
    replace(start: number, end: number, newValue: string, name?: string): void;
 
    /**
     * Inserts the insertion before char pos (0-indexed).
     */
    insert(pos: number, newValue: string, name?: string): void;
 
    /**
     * Get decorated Source.
     */
    original(): Source;
 
    source(): string;
}
 
export = ReplaceSource;