Skip to content

Commit 555291a

Browse files
committed
Add sourceMapUrl params to SourceMapConsumer.
1 parent 7c06ac8 commit 555291a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source-map.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// Definitions by: Morten Houston Ludvigsen <https://github.com/MortenHoustonLudvigsen>,
44
// Ron Buckton <https://github.com/rbuckton>
55
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6+
export type SourceMapUrl = string;
7+
68
export interface StartOfSourceMap {
79
file?: string;
810
sourceRoot?: string;
@@ -186,17 +188,17 @@ export interface SourceMapConsumerConstructor {
186188
GREATEST_LOWER_BOUND: number;
187189
LEAST_UPPER_BOUND: number;
188190

189-
new (rawSourceMap: RawSourceMap): BasicSourceMapConsumer;
190-
new (rawSourceMap: RawIndexMap): IndexedSourceMapConsumer;
191-
new (rawSourceMap: RawSourceMap | RawIndexMap | string): BasicSourceMapConsumer | IndexedSourceMapConsumer;
191+
new (rawSourceMap: RawSourceMap, sourceMapUrl?: SourceMapUrl): BasicSourceMapConsumer;
192+
new (rawSourceMap: RawIndexMap, sourceMapUrl?: SourceMapUrl): IndexedSourceMapConsumer;
193+
new (rawSourceMap: RawSourceMap | RawIndexMap | string, sourceMapUrl?: SourceMapUrl): BasicSourceMapConsumer | IndexedSourceMapConsumer;
192194

193195
/**
194196
* Create a BasicSourceMapConsumer from a SourceMapGenerator.
195197
*
196198
* @param sourceMap
197199
* The source map that will be consumed.
198200
*/
199-
fromSourceMap(sourceMap: SourceMapGenerator): BasicSourceMapConsumer;
201+
fromSourceMap(sourceMap: SourceMapGenerator, sourceMapUrl?: SourceMapUrl): BasicSourceMapConsumer;
200202
}
201203

202204
export const SourceMapConsumer: SourceMapConsumerConstructor;

0 commit comments

Comments
 (0)