On this page

class OriginalSource extends Source
new OriginalSource(value, name): OriginalSource
Attributes
value:string | Buffer<ArrayBufferLike>
name:string
originalSource.buffer(): Buffer
Returns:Buffer
originalSource.buffers(): Buffer<ArrayBufferLike>[]
Returns:Buffer<ArrayBufferLike>[]
originalSource.clearCache(options?, visited?): void
Attributes

Release cached data held by this source. clearCache is a memory hint: it never affects correctness or output, only how expensive the next read is. Subclasses override; the base is a no-op so every Source supports the call. Composite sources always recurse into wrapped sources. When the same child is reachable via several parents (e.g. modules shared across webpack chunks), pass a shared visited WeakSet so each subtree is walked at most once. Not safe to call concurrently with source/map/sourceAndMap/ streamChunks/updateHash on the same instance.

originalSource.getName(): string
Returns:string
originalSource.map(options?): RawSourceMap | null
Attributes
options:MapOptions
Returns:RawSourceMap | null
originalSource.size(): number
Returns:number
originalSource.source(): SourceValue
Returns:SourceValue
originalSource.sourceAndMap(options?): SourceAndMap
Attributes
options:MapOptions
Returns:SourceAndMap
originalSource.streamChunks(options, onChunk, onSource, _onName): GeneratedSourceInfo
Attributes
onChunk:(chunk: string | undefined, generatedLine: number, generatedColumn: number, sourceIndex: number, originalLine: number, originalColumn: number, nameIndex: number) => void
onSource:(sourceIndex: number, source: string | null, sourceContent?: string) => void
_onName:(nameIndex: number, name: string) => void
originalSource.updateHash(hash): void
Attributes