diff --git a/types/jsdom/index.d.ts b/types/jsdom/index.d.ts index 5ccdd33a65..cfb54fa25f 100644 --- a/types/jsdom/index.d.ts +++ b/types/jsdom/index.d.ts @@ -7,7 +7,7 @@ /// import { EventEmitter } from 'events'; -import { ElementLocation } from 'parse5'; +import { MarkupData } from 'parse5'; import * as tough from 'tough-cookie'; import { Script } from 'vm'; @@ -32,7 +32,7 @@ export class JSDOM { /** * The nodeLocation() method will find where a DOM node is within the source document, returning the parse5 location info for the node. */ - nodeLocation(node: Node): ElementLocation | null; + nodeLocation(node: Node): MarkupData.ElementLocation | null; /** * The built-in vm module of Node.js allows you to create Script instances, diff --git a/types/jsdom/package.json b/types/jsdom/package.json index c208056015..ef0b8c56fc 100644 --- a/types/jsdom/package.json +++ b/types/jsdom/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "parse5": "^3.0.2" + "parse5": "^4.0.0" } } diff --git a/types/jsdom/tsconfig.json b/types/jsdom/tsconfig.json index fe7f9dd41f..d75878188a 100644 --- a/types/jsdom/tsconfig.json +++ b/types/jsdom/tsconfig.json @@ -15,10 +15,13 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "parse5": [ "parse5/v4" ] + } }, "files": [ "index.d.ts", "jsdom-tests.ts" ] -} \ No newline at end of file +}