diff --git a/source-list-map/index.d.ts b/source-list-map/index.d.ts index c6cfb0ac45..2cde4e5839 100644 --- a/source-list-map/index.d.ts +++ b/source-list-map/index.d.ts @@ -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; - diff --git a/source-list-map/source-list-map-tests.ts b/source-list-map/source-list-map-tests.ts index 75341740be..5fe932efc5 100644 --- a/source-list-map/source-list-map-tests.ts +++ b/source-list-map/source-list-map-tests.ts @@ -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');