mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-07 09:40:19 +00:00
Merge pull request #12577 from ts-webpack/types/source-list-map
Types/source list map
This commit is contained in:
Vendored
+5
-6
@@ -49,9 +49,9 @@ export class SourceNode {
|
||||
}
|
||||
|
||||
export class SourceListMap {
|
||||
children: (SourceNode | CodeNode | SourceListMap)[];
|
||||
children: (SourceNode | CodeNode)[];
|
||||
|
||||
constructor(generatedCode: (SourceNode | CodeNode | SourceListMap)[]);
|
||||
constructor(generatedCode: (SourceNode | CodeNode)[]);
|
||||
constructor(
|
||||
generatedCode?: string | SourceNode | CodeNode | SourceListMap,
|
||||
source?: string,
|
||||
@@ -84,9 +84,8 @@ export class SourceListMap {
|
||||
|
||||
export function fromStringWithSourceMap(
|
||||
code: string, map: {
|
||||
sources: any;
|
||||
sourcesContent: any;
|
||||
mappings: any;
|
||||
sources: (string | SourceNode | CodeNode) [];
|
||||
sourcesContent: string[];
|
||||
mappings: string;
|
||||
}
|
||||
): SourceListMap;
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ node.mapGeneratedCode(function (code) {
|
||||
})
|
||||
|
||||
slm.fromStringWithSourceMap('hello', {
|
||||
sources: null,
|
||||
sourcesContent: null,
|
||||
mappings: null
|
||||
sources: [node, new slm.CodeNode('hello')],
|
||||
sourcesContent: ['hi'],
|
||||
mappings: 'null'
|
||||
});
|
||||
|
||||
const snode = new slm.SourceNode('hi', 'i\'am', 'e-cloud');
|
||||
|
||||
Reference in New Issue
Block a user