Use the URL type from the DOM definitions, not from Node (#3214)

The two aren't quite interchangeable: the Node definition has a few
more fields, which means that URLs created naively with `new URL()`
aren't assignable to that type.
This commit is contained in:
Natalie Weizenbaum 2021-12-10 13:11:27 -08:00 committed by GitHub
parent b192519b55
commit 23278f2c92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1 additions and 14 deletions

View File

@ -1,4 +1,3 @@
import {URL} from 'url';
import {RawSourceMap} from 'source-map-js'; import {RawSourceMap} from 'source-map-js';
import {Options, StringOptions} from './options'; import {Options, StringOptions} from './options';

View File

@ -1,5 +1,3 @@
import {URL} from 'url';
import {Syntax} from './options'; import {Syntax} from './options';
import {PromiseOr} from './util/promise_or'; import {PromiseOr} from './util/promise_or';

View File

@ -1,5 +1,3 @@
import {URL} from 'url';
import {SourceLocation} from './source_location'; import {SourceLocation} from './source_location';
/** /**

View File

@ -1,5 +1,3 @@
import {URL} from 'url';
import {FileImporter, Importer} from './importer'; import {FileImporter, Importer} from './importer';
import {Logger} from './logger'; import {Logger} from './logger';
import {Value} from './value'; import {Value} from './value';

View File

@ -1,4 +1,3 @@
import {URL} from 'url';
import {RawSourceMap} from 'source-map-js'; // https://www.npmjs.com/package/source-map-js import {RawSourceMap} from 'source-map-js'; // https://www.npmjs.com/package/source-map-js
import {Options, StringOptions} from './options'; import {Options, StringOptions} from './options';

View File

@ -1,5 +1,3 @@
import {URL} from 'url';
import {Syntax} from './options'; import {Syntax} from './options';
import {PromiseOr} from './util/promise_or'; import {PromiseOr} from './util/promise_or';

View File

@ -1,5 +1,3 @@
import {URL} from 'url';
import {SourceLocation} from './source_location'; import {SourceLocation} from './source_location';
/** /**

View File

@ -1,5 +1,3 @@
import {URL} from 'url';
import {FileImporter, Importer} from './importer'; import {FileImporter, Importer} from './importer';
import {Logger} from './logger'; import {Logger} from './logger';
import {Value} from './value'; import {Value} from './value';

View File

@ -3,6 +3,7 @@
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
"rootDir": ".", "rootDir": ".",
"lib": ["dom"],
"paths": { "paths": {
"*": ["./tool/types/*"] "*": ["./tool/types/*"]
} }