(string: string, options: MagicStringOptions = {})
| 80 | declare stats: Stats |
| 81 | |
| 82 | constructor(string: string, options: MagicStringOptions = {}) { |
| 83 | const chunk = new Chunk(0, string.length, string) |
| 84 | |
| 85 | Object.defineProperties(this, { |
| 86 | original: { writable: true, value: string }, |
| 87 | outro: { writable: true, value: '' }, |
| 88 | intro: { writable: true, value: '' }, |
| 89 | firstChunk: { writable: true, value: chunk }, |
| 90 | lastChunk: { writable: true, value: chunk }, |
| 91 | lastSearchedChunk: { writable: true, value: chunk }, |
| 92 | byStart: { writable: true, value: new Map<number, Chunk>([[0, chunk]]) }, |
| 93 | byEnd: { writable: true, value: new Map<number, Chunk>([[string.length, chunk]]) }, |
| 94 | filename: { writable: true, value: options.filename }, |
| 95 | indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, |
| 96 | sourcemapLocations: { writable: true, value: new BitSet() }, |
| 97 | storedNames: { writable: true, value: {} }, |
| 98 | indentStr: { writable: true, value: undefined }, |
| 99 | ignoreList: { writable: true, value: options.ignoreList }, |
| 100 | offset: { writable: true, value: options.offset || 0 }, |
| 101 | }) |
| 102 | |
| 103 | if (DEBUG) { |
| 104 | Object.defineProperty(this, 'stats', { value: new Stats() }) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false. |
nothing calls this directly
no outgoing calls
no test coverage detected