MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / constructor

Method constructor

src/utils/Mappings.ts:23–32  ·  view source on GitHub ↗
(hires: SourceMapOptions['hires'])

Source from the content-addressed store, hash-verified

21 declare pending: SourceMapSegment | null
22
23 constructor(hires: SourceMapOptions['hires']) {
24 this.hires = hires
25 this.generatedCodeLine = 0
26 this.generatedCodeColumn = 0
27 this.raw = []
28 this.rawSegments = this.raw[this.generatedCodeLine] = []
29 this.rawRangeMappings = []
30 this.rawRangeMappingsIndices = this.rawRangeMappings[this.generatedCodeLine] = []
31 this.pending = null
32 }
33
34 addEdit(sourceIndex: number, content: string, loc: SourceLocation, nameIndex: number): void {
35 /* v8 ignore else -- `pending` is never assigned a truthy value */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected