mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
[source-map] Fix incorrect RawSourceMap.sourcesContents field typing.
According to [the source map spec](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1) and [the source-map documentation](ea182cea38/README.md (new-sourcemapconsumerrawsourcemap)), this field is an array of strings, *not* a single string. Each item in the string contains the source code of the corresponding item in the `RawSourceMap.sources` array.
This commit is contained in:
@@ -11,7 +11,7 @@ function testSourceMapConsumer() {
|
||||
version: 'foo',
|
||||
sources: ['foo', 'bar'],
|
||||
names: ['foo', 'bar'],
|
||||
sourcesContent: 'foo',
|
||||
sourcesContent: ['foo'],
|
||||
mappings: 'foo'
|
||||
});
|
||||
|
||||
|
||||
2
source-map/source-map.d.ts
vendored
2
source-map/source-map.d.ts
vendored
@@ -13,7 +13,7 @@ declare module SourceMap {
|
||||
version: string;
|
||||
sources: Array<string>;
|
||||
names: Array<string>;
|
||||
sourcesContent?: string;
|
||||
sourcesContent?: string[];
|
||||
mappings: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user