mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Merge pull request #12483 from ts-webpack/types/source-map
fix: update version number for source-map
This commit is contained in:
commit
c00a40ce82
8
source-map/index.d.ts
vendored
8
source-map/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for source-map v0.1.38
|
||||
// Type definitions for source-map v0.5.6
|
||||
// Project: https://github.com/mozilla/source-map
|
||||
// Definitions by: Morten Houston Ludvigsen <https://github.com/MortenHoustonLudvigsen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -58,7 +58,7 @@ declare namespace SourceMap {
|
||||
public static GENERATED_ORDER: number;
|
||||
public static ORIGINAL_ORDER: number;
|
||||
|
||||
constructor(rawSourceMap: RawSourceMap);
|
||||
constructor(rawSourceMap: RawSourceMap | string);
|
||||
|
||||
public computeColumnSpans(): void;
|
||||
|
||||
@ -115,9 +115,9 @@ declare namespace SourceMap {
|
||||
relativePath?: string
|
||||
): SourceNode;
|
||||
|
||||
public add(chunk: any): SourceNode;
|
||||
public add(chunk: (string | SourceNode)[] | SourceNode | string): SourceNode;
|
||||
|
||||
public prepend(chunk: any): SourceNode;
|
||||
public prepend(chunk: (string | SourceNode)[] | SourceNode | string): SourceNode;
|
||||
|
||||
public setSourceContent(sourceFile: string, sourceContent: string): void;
|
||||
|
||||
|
||||
@ -14,6 +14,15 @@ function testSourceMapConsumer() {
|
||||
file: 'sdf'
|
||||
});
|
||||
|
||||
scm = new SourceMap.SourceMapConsumer(JSON.stringify({
|
||||
version: 3,
|
||||
sources: ['foo', 'bar'],
|
||||
names: ['foo', 'bar'],
|
||||
sourcesContent: ['foo'],
|
||||
mappings: 'foo',
|
||||
file: 'sdf'
|
||||
}));
|
||||
|
||||
// create with partial RawSourceMap
|
||||
scm = new SourceMap.SourceMapConsumer({
|
||||
version: 3,
|
||||
@ -129,10 +138,14 @@ function testSourceNode() {
|
||||
|
||||
function testAdd(node: SourceMap.SourceNode) {
|
||||
node.add('foo');
|
||||
node.add(new SourceMap.SourceNode());
|
||||
node.add([new SourceMap.SourceNode(), 'bar']);
|
||||
}
|
||||
|
||||
function testPrepend(node: SourceMap.SourceNode) {
|
||||
node.prepend('foo');
|
||||
node.prepend(new SourceMap.SourceNode());
|
||||
node.prepend([new SourceMap.SourceNode(), 'bar']);
|
||||
}
|
||||
|
||||
function testSetSourceContent(node: SourceMap.SourceNode) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user