mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +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](https://github.com/mozilla/source-map/blob/ea182cea380f8a963151547a4ca1e6f2bcde1364/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'
|
||||
});
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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