Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause is now `unknown` type. So, we need to cast the `e`, `err`, or `error` variables to type `Error`.
This commit is contained in:
parent
5b28adb7ed
commit
40568daca8
83 changed files with 601 additions and 576 deletions
2
node_modules/normalize-url/index.d.ts
generated
vendored
2
node_modules/normalize-url/index.d.ts
generated
vendored
|
|
@ -226,7 +226,7 @@ export interface Options {
|
|||
//=> 'http://sindresorhus.com/foo'
|
||||
```
|
||||
*/
|
||||
readonly removeDirectoryIndex?: ReadonlyArray<RegExp | string>;
|
||||
readonly removeDirectoryIndex?: boolean | ReadonlyArray<RegExp | string>;
|
||||
|
||||
/**
|
||||
Sorts the query parameters alphabetically by key.
|
||||
|
|
|
|||
2
node_modules/normalize-url/package.json
generated
vendored
2
node_modules/normalize-url/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "normalize-url",
|
||||
"version": "7.0.1",
|
||||
"version": "7.0.2",
|
||||
"description": "Normalize a URL",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/normalize-url",
|
||||
|
|
|
|||
3
node_modules/normalize-url/readme.md
generated
vendored
3
node_modules/normalize-url/readme.md
generated
vendored
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.
|
||||
|
||||
**Note:** This package does **not** do URL sanitization. [Garbage in, garbage out.](https://en.wikipedia.org/wiki/Garbage_in,_garbage_out) If you use this in a server context and accept URLs as user input, it's up to you to protect against invalid URLs, [path traversal attacks](https://owasp.org/www-community/attacks/Path_Traversal), etc.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
|
|
@ -240,7 +242,6 @@ normalizeUrl('https://sindresorhus.com/', {removeSingleSlash: false});
|
|||
//=> 'https://sindresorhus.com/'
|
||||
```
|
||||
|
||||
|
||||
##### removeDirectoryIndex
|
||||
|
||||
Type: `boolean | Array<RegExp | string>`\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue