SourceNode
class SourceNode { }
constructor();
constructor(
line: number | null,
column: number | null,
source: string | null,
chunks?: Array<(string | SourceNode)> | SourceNode | string,
name?: string,
);children: SourceNode[];
column: number;
line: number;
name: string;
source: string;
sourceContents: any;
setSourceContent(sourceFile: string, sourceContent: string): void;
toString(): string;
walkSourceContents(fn: (file: string, content: string) => void): void;
static fromStringWithSourceMap(
code: string,
sourceMapConsumer: SourceMapConsumer,
relativePath?: string,
): SourceNode;§Constructors
§
new SourceNode(line: number | null, column: number | null, source: string | null, chunks?: Array<(string | SourceNode)> | SourceNode | string, name?: string)
[src]§Properties
§
children: SourceNode[]
[src]§Methods
§
add(chunk: Array<(string | SourceNode)> | SourceNode | string): SourceNode
[src]§
join(sep: string): SourceNode
[src]§
prepend(chunk: Array<(string | SourceNode)> | SourceNode | string): SourceNode
[src]§
toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap
[src]§
walk(fn: (chunk: string, mapping: MappedPosition) => void): void
[src]§Static Methods
§
fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode
[src]