Skip to content

Commit 145e974

Browse files
committed
Fixed types
1 parent 48b91cc commit 145e974

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3032,7 +3032,7 @@
30323032
"@types/webpack-bundle-analyzer": "^2.13.0",
30333033
"@types/winreg": "^1.2.30",
30343034
"@types/ws": "^6.0.1",
3035-
"@types/xml2js": "^0.4.2",
3035+
"@types/xml2js": "^0.4.5",
30363036
"acorn": "^6.0.0",
30373037
"ansi-to-html": "^0.6.7",
30383038
"awesome-typescript-loader": "^5.2.1",

src/client/datascience/plotting/plotViewer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import '../../common/extensions';
55

66
import { inject, injectable } from 'inversify';
77
import * as path from 'path';
8-
import { promisify } from 'util';
98
import { Event, EventEmitter, ViewColumn } from 'vscode';
109
import * as xml2js from 'xml2js';
1110
import { traceInfo } from '../../../client/common/logger';
@@ -35,7 +34,7 @@ async function getSVGDimensions(svgValue: string): Promise<{ height?: number; wi
3534
}
3635

3736
type ParsedSvg = { svg: { $: { height: string; width: string } } };
38-
const { svg } = await promisify<string, ParsedSvg>(xml2js.parseString)(svgValue);
37+
const { svg } = (await xml2js.parseStringPromise(svgValue)) as ParsedSvg;
3938
return { height: parseFloat(svg.$.height), width: parseFloat(svg.$.width) };
4039
}
4140

0 commit comments

Comments
 (0)