Bump the npm group with 5 updates (#1856)

* Bump the npm group with 5 updates

Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) | `7.5.0` | `7.5.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.4.1` | `6.5.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.4.1` | `6.5.0` |
| [eslint](https://github.com/eslint/eslint) | `8.47.0` | `8.48.0` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.1.6` | `5.2.2` |


Updates `@types/semver` from 7.5.0 to 7.5.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Updates `@typescript-eslint/eslint-plugin` from 6.4.1 to 6.5.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.5.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 6.4.1 to 6.5.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.5.0/packages/parser)

Updates `eslint` from 8.47.0 to 8.48.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

Updates `typescript` from 5.1.6 to 5.2.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.6...v5.2.2)

---
updated-dependencies:
- dependency-name: "@types/semver"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-08-29 04:47:41 -07:00 committed by GitHub
parent b88b5503aa
commit 8ecc33d259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 48141 additions and 37037 deletions

110
node_modules/.package-lock.json generated vendored
View file

@ -448,9 +448,9 @@
}
},
"node_modules/@eslint/js": {
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz",
"integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==",
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz",
"integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -900,9 +900,9 @@
}
},
"node_modules/@types/semver": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz",
"integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==",
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz",
"integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==",
"dev": true
},
"node_modules/@types/sinon": {
@ -934,16 +934,16 @@
"integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz",
"integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.5.0.tgz",
"integrity": "sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/type-utils": "6.4.1",
"@typescript-eslint/utils": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/type-utils": "6.5.0",
"@typescript-eslint/utils": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -969,15 +969,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz",
"integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.5.0.tgz",
"integrity": "sha512-LMAVtR5GN8nY0G0BadkG0XIe4AcNMeyEy3DyhKGAh9k4pLSMBO7rF29JvDBpZGCmp5Pgz5RLHP6eCpSYZJQDuQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/typescript-estree": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4"
},
"engines": {
@ -997,13 +997,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz",
"integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz",
"integrity": "sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1"
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1014,13 +1014,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz",
"integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.5.0.tgz",
"integrity": "sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/utils": "6.4.1",
"@typescript-eslint/typescript-estree": "6.5.0",
"@typescript-eslint/utils": "6.5.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@ -1041,9 +1041,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz",
"integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.5.0.tgz",
"integrity": "sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1054,13 +1054,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz",
"integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz",
"integrity": "sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -1081,17 +1081,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz",
"integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.5.0.tgz",
"integrity": "sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/typescript-estree": "6.5.0",
"semver": "^7.5.4"
},
"engines": {
@ -1106,12 +1106,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz",
"integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz",
"integrity": "sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/types": "6.5.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@ -2465,15 +2465,15 @@
}
},
"node_modules/eslint": {
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz",
"integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==",
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz",
"integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "^8.47.0",
"@eslint/js": "8.48.0",
"@humanwhocodes/config-array": "^0.11.10",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@ -5999,9 +5999,9 @@
}
},
"node_modules/typescript": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"dev": true,
"bin": {
"tsc": "bin/tsc",

View file

@ -1,6 +1,6 @@
{
"name": "@eslint/js",
"version": "8.47.0",
"version": "8.48.0",
"description": "ESLint JavaScript language implementation",
"main": "./src/index.js",
"scripts": {},

View file

@ -8,7 +8,7 @@ This package contains type definitions for semver (https://github.com/npm/node-s
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver.
### Additional Details
* Last updated: Mon, 08 May 2023 19:02:57 GMT
* Last updated: Mon, 28 Aug 2023 15:34:56 GMT
* Dependencies: none
* Global values: none

View file

@ -7,7 +7,7 @@ declare namespace inc {
}
/**
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
* Return the version incremented by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if it's not valid.
*/
declare function inc(
version: string | SemVer,

View file

@ -1,6 +1,6 @@
{
"name": "@types/semver",
"version": "7.5.0",
"version": "7.5.1",
"description": "TypeScript definitions for semver",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver",
"license": "MIT",
@ -45,6 +45,6 @@
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "a1ae8c1d9f9371bb1030d232fd0c118ad40215d3dd62afb98c7d6f15678c60de",
"typesPublisherContentHash": "57a882c4bde80f3fc5c7efb5e92cf953532ab98690f8f0eba77ab778999b37b4",
"typeScriptVersion": "4.3"
}

View file

@ -24,7 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
const util = __importStar(require("../util"));
const getWrappedCode_1 = require("../util/getWrappedCode");
exports.default = util.createRule({
name: 'consistent-type-assertions',
meta: {
@ -84,6 +86,7 @@ exports.default = util.createRule({
],
create(context, [options]) {
const sourceCode = context.getSourceCode();
const parserServices = util.getParserServices(context, true);
function isConst(node) {
if (node.type !== utils_1.AST_NODE_TYPES.TSTypeReference) {
return false;
@ -116,10 +119,26 @@ exports.default = util.createRule({
? { cast: sourceCode.getText(node.typeAnnotation) }
: {},
fix: messageId === 'as'
? (fixer) => [
fixer.replaceText(node, getTextWithParentheses(node.expression)),
fixer.insertTextAfter(node, ` as ${getTextWithParentheses(node.typeAnnotation)}`),
]
? (fixer) => {
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
/**
* AsExpression has lower precedence than TypeAssertionExpression,
* so we don't need to wrap expression and typeAnnotation in parens.
*/
const expressionCode = sourceCode.getText(node.expression);
const typeAnnotationCode = sourceCode.getText(node.typeAnnotation);
const asPrecedence = util.getOperatorPrecedence(ts.SyntaxKind.AsExpression, ts.SyntaxKind.Unknown);
const parentPrecedence = util.getOperatorPrecedence(tsNode.parent.kind, ts.isBinaryExpression(tsNode.parent)
? tsNode.parent.operatorToken.kind
: ts.SyntaxKind.Unknown, ts.isNewExpression(tsNode.parent)
? tsNode.parent.arguments != null &&
tsNode.parent.arguments.length > 0
: undefined);
const text = `${expressionCode} as ${typeAnnotationCode}`;
return fixer.replaceText(node, util.isParenthesized(node, sourceCode)
? text
: (0, getWrappedCode_1.getWrappedCode)(text, asPrecedence, parentPrecedence));
}
: undefined,
});
}

File diff suppressed because one or more lines are too long

View file

@ -312,6 +312,7 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
case typescript_1.SyntaxKind.MetaProperty:
return OperatorPrecedence.Member;
case typescript_1.SyntaxKind.AsExpression:
case typescript_1.SyntaxKind.SatisfiesExpression:
return OperatorPrecedence.Relational;
case typescript_1.SyntaxKind.ThisKeyword:
case typescript_1.SyntaxKind.SuperKeyword:

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWrappedCode = void 0;
function getWrappedCode(text, nodePrecedence, parentPrecedence) {
return nodePrecedence > parentPrecedence ? text : `(${text})`;
}
exports.getWrappedCode = getWrappedCode;
//# sourceMappingURL=getWrappedCode.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"getWrappedCode.js","sourceRoot":"","sources":["../../src/util/getWrappedCode.ts"],"names":[],"mappings":";;;AAEA,SAAgB,cAAc,CAC5B,IAAY,EACZ,cAAkC,EAClC,gBAAoC;IAEpC,OAAO,cAAc,GAAG,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC;AAChE,CAAC;AAND,wCAMC"}

View file

@ -12,10 +12,13 @@ function getWrappingFixer(params) {
return (fixer) => {
const innerCodes = innerNodes.map(innerNode => {
let code = sourceCode.getText(innerNode);
// check the inner expression's precedence
if (!isStrongPrecedenceNode(innerNode)) {
// the code we are adding might have stronger precedence than our wrapped node
// let's wrap our node in parens in case it has a weaker precedence than the code we are wrapping it in
/**
* Wrap our node in parens to prevent the following cases:
* - It has a weaker precedence than the code we are wrapping it in
* - It's gotten mistaken as block statement instead of object expression
*/
if (!isStrongPrecedenceNode(innerNode) ||
isObjectExpressionInOneLineReturn(node, innerNode)) {
code = `(${code})`;
}
return code;
@ -44,12 +47,15 @@ exports.getWrappingFixer = getWrappingFixer;
function isStrongPrecedenceNode(innerNode) {
return (innerNode.type === utils_1.AST_NODE_TYPES.Literal ||
innerNode.type === utils_1.AST_NODE_TYPES.Identifier ||
innerNode.type === utils_1.AST_NODE_TYPES.TSTypeReference ||
innerNode.type === utils_1.AST_NODE_TYPES.TSTypeOperator ||
innerNode.type === utils_1.AST_NODE_TYPES.ArrayExpression ||
innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression ||
innerNode.type === utils_1.AST_NODE_TYPES.MemberExpression ||
innerNode.type === utils_1.AST_NODE_TYPES.CallExpression ||
innerNode.type === utils_1.AST_NODE_TYPES.NewExpression ||
innerNode.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression);
innerNode.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression ||
innerNode.type === utils_1.AST_NODE_TYPES.TSInstantiationExpression);
}
exports.isStrongPrecedenceNode = isStrongPrecedenceNode;
/**
@ -138,4 +144,12 @@ function isLeftHandSide(node) {
}
return false;
}
/**
* Checks if a node's parent is arrow function expression and a inner node is object expression
*/
function isObjectExpressionInOneLineReturn(node, innerNode) {
return (node.parent?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
node.parent.body === node &&
innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression);
}
//# sourceMappingURL=getWrappingFixer.js.map

View file

@ -1 +1 @@
{"version":3,"file":"getWrappingFixer.js","sourceRoot":"","sources":["../../src/util/getWrappingFixer.ts"],"names":[],"mappings":";;;AACA,oDAAoE;AAsBpE;;;GAGG;AACH,SAAgB,gBAAgB,CAC9B,MAA2B;IAE3B,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAC5D,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEtE,OAAO,CAAC,KAAK,EAAoB,EAAE;QACjC,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC5C,IAAI,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAEzC,0CAA0C;YAC1C,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE;gBACtC,8EAA8E;gBAC9E,uGAAuG;gBACvG,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;aACpB;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,kBAAkB;QAClB,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;QAE/B,0CAA0C;QAC1C,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;YAChC,iHAAiH;YACjH,yDAAyD;YACzD,IAAI,CAAC,gBAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;gBAC/C,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;aACpB;SACF;QAED,uCAAuC;QACvC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;YACrE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;SACnB;QAED,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC;AACJ,CAAC;AAvCD,4CAuCC;AAED;;GAEG;AACH,SAAgB,sBAAsB,CAAC,SAAwB;IAC7D,OAAO,CACL,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO;QACzC,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;QAC5C,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;QACjD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAClD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAClD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;QAChD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,aAAa;QAC/C,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB,CAC3D,CAAC;AACJ,CAAC;AAXD,wDAWC;AAED;;GAEG;AACH,SAAS,sBAAsB,CAAC,IAAmB;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAO,CAAC;IAE5B,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;QAC9C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAChD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,qBAAqB;QACpD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe,EAC9C;QACA,OAAO,IAAI,CAAC;KACb;IAED,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,MAAM,KAAK,IAAI,EACtB;QACA,OAAO,IAAI,CAAC;KACb;IAED,IACE,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;QAC5C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,aAAa,CAAC;QAC/C,MAAM,CAAC,MAAM,KAAK,IAAI,EACtB;QACA,OAAO,IAAI,CAAC;KACb;IAED,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QACvD,MAAM,CAAC,GAAG,KAAK,IAAI,EACnB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAS,wBAAwB,CAC/B,IAAmB,EACnB,UAA+B;IAE/B,SAAS;QACP,MAAM,MAAM,GAAG,IAAI,CAAC,MAAO,CAAC;QAE5B,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,mBAAmB,EAAE;YACtD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;YAC5B,IACE,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO;gBACrC,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,EAC5C;gBACA,+CAA+C;gBAC/C,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClD,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;gBACzD,IACE,cAAc,GAAG,CAAC;oBAClB,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAE,CAAC,KAAK,KAAK,GAAG,EACzD;oBACA,OAAO,IAAI,CAAC;iBACb;aACF;SACF;QAED,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YACzB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,GAAG,MAAM,CAAC;KACf;AACH,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,IAAmB;IACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAO,CAAC;IAE5B,MAAM;IACN,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB,EAAE;QACnD,OAAO,IAAI,CAAC;KACb;IAED,QAAQ;IACR,IACE,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC9C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAChD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,oBAAoB,CAAC;QACtD,IAAI,KAAK,MAAM,CAAC,IAAI,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,YAAY;IACZ,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,qBAAqB;QACpD,IAAI,KAAK,MAAM,CAAC,IAAI,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,IAAI,IAAI,KAAK,MAAM,CAAC,MAAM,EAAE;QAC3E,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QACvD,IAAI,KAAK,MAAM,CAAC,GAAG,EACnB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
{"version":3,"file":"getWrappingFixer.js","sourceRoot":"","sources":["../../src/util/getWrappingFixer.ts"],"names":[],"mappings":";;;AACA,oDAAoE;AAsBpE;;;GAGG;AACH,SAAgB,gBAAgB,CAC9B,MAA2B;IAE3B,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAC5D,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEtE,OAAO,CAAC,KAAK,EAAoB,EAAE;QACjC,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC5C,IAAI,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAEzC;;;;eAIG;YACH,IACE,CAAC,sBAAsB,CAAC,SAAS,CAAC;gBAClC,iCAAiC,CAAC,IAAI,EAAE,SAAS,CAAC,EAClD;gBACA,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;aACpB;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,kBAAkB;QAClB,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;QAE/B,0CAA0C;QAC1C,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;YAChC,iHAAiH;YACjH,yDAAyD;YACzD,IAAI,CAAC,gBAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;gBAC/C,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;aACpB;SACF;QAED,uCAAuC;QACvC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE;YACrE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;SACnB;QAED,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC;AACJ,CAAC;AA5CD,4CA4CC;AAED;;GAEG;AACH,SAAgB,sBAAsB,CAAC,SAAwB;IAC7D,OAAO,CACL,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO;QACzC,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;QAC5C,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;QACjD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;QAChD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;QACjD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAClD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAClD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;QAChD,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,aAAa;QAC/C,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QAC1D,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,yBAAyB,CAC5D,CAAC;AACJ,CAAC;AAdD,wDAcC;AAED;;GAEG;AACH,SAAS,sBAAsB,CAAC,IAAmB;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAO,CAAC;IAE5B,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe;QAC9C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAChD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,qBAAqB;QACpD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe,EAC9C;QACA,OAAO,IAAI,CAAC;KACb;IAED,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC/C,MAAM,CAAC,MAAM,KAAK,IAAI,EACtB;QACA,OAAO,IAAI,CAAC;KACb;IAED,IACE,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;QAC5C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,aAAa,CAAC;QAC/C,MAAM,CAAC,MAAM,KAAK,IAAI,EACtB;QACA,OAAO,IAAI,CAAC;KACb;IAED,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QACvD,MAAM,CAAC,GAAG,KAAK,IAAI,EACnB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAS,wBAAwB,CAC/B,IAAmB,EACnB,UAA+B;IAE/B,SAAS;QACP,MAAM,MAAM,GAAG,IAAI,CAAC,MAAO,CAAC;QAE5B,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,mBAAmB,EAAE;YACtD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;YAC5B,IACE,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO;gBACrC,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,EAC5C;gBACA,+CAA+C;gBAC/C,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClD,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;gBACzD,IACE,cAAc,GAAG,CAAC;oBAClB,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAE,CAAC,KAAK,KAAK,GAAG,EACzD;oBACA,OAAO,IAAI,CAAC;iBACb;aACF;SACF;QAED,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YACzB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,GAAG,MAAM,CAAC;KACf;AACH,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,IAAmB;IACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAO,CAAC;IAE5B,MAAM;IACN,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB,EAAE;QACnD,OAAO,IAAI,CAAC;KACb;IAED,QAAQ;IACR,IACE,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC9C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAChD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,oBAAoB,CAAC;QACtD,IAAI,KAAK,MAAM,CAAC,IAAI,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,YAAY;IACZ,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,qBAAqB;QACpD,IAAI,KAAK,MAAM,CAAC,IAAI,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,IAAI,IAAI,KAAK,MAAM,CAAC,MAAM,EAAE;QAC3E,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QACvD,IAAI,KAAK,MAAM,CAAC,GAAG,EACnB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,iCAAiC,CACxC,IAAmB,EACnB,SAAwB;IAExB,OAAO,CACL,IAAI,CAAC,MAAM,EAAE,IAAI,KAAK,sBAAc,CAAC,uBAAuB;QAC5D,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI;QACzB,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB,CACnD,CAAC;AACJ,CAAC"}

View file

@ -8,3 +8,5 @@ description: 'Disallow unnecessary semicolons.'
This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule.
It adds support for class properties.
Note that this rule is classified as a "Suggestion" rule instead of a "Layout & Formatting" rule because [adding extra semi-colons actually changes the AST of the program](https://typescript-eslint.io/play/#ts=5.1.6&showAST=es&fileType=.ts&code=MYewdgzgLgBAHjAvDAjAbg0A&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQHYHsBaRADwBdoBDQ5RAWwEt0p8AzVyAGnG0gAEyATwAOKAMbQGwssWTwGuMgHoCxclRr0mGSImjR80SDwC%2BIE0A&tsconfig=&tokens=false). With that said, modern TypeScript formatters will remove extra semi-colons automatically during the formatting process. Thus, if you [use a formatter](/linting/troubleshooting/formatting), then enabling this rule is probably unnecessary.

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin",
"version": "6.4.1",
"version": "6.5.0",
"description": "TypeScript plugin for ESLint",
"files": [
"dist",
@ -57,10 +57,10 @@
},
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/type-utils": "6.4.1",
"@typescript-eslint/utils": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/type-utils": "6.5.0",
"@typescript-eslint/utils": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -73,8 +73,8 @@
"@types/marked": "*",
"@types/natural-compare": "*",
"@types/prettier": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "6.4.1",
"@typescript-eslint/rule-tester": "6.4.1",
"@typescript-eslint/rule-schema-to-typescript-types": "6.5.0",
"@typescript-eslint/rule-tester": "6.5.0",
"ajv": "^6.12.6",
"chalk": "^5.3.0",
"cross-fetch": "*",
@ -103,5 +103,5 @@
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/parser",
"version": "6.4.1",
"version": "6.5.0",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
@ -51,10 +51,10 @@
"eslint": "^7.0.0 || ^8.0.0"
},
"dependencies": {
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/typescript-estree": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4"
},
"devDependencies": {
@ -82,5 +82,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/scope-manager",
"version": "6.4.1",
"version": "6.5.0",
"description": "TypeScript scope analyser for ESLint",
"files": [
"dist",
@ -44,12 +44,12 @@
"typecheck": "nx typecheck"
},
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1"
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0"
},
"devDependencies": {
"@types/glob": "*",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/typescript-estree": "6.5.0",
"glob": "*",
"jest-specific-snapshot": "*",
"make-dir": "*",
@ -69,5 +69,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/type-utils",
"version": "6.4.1",
"version": "6.5.0",
"description": "Type utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@ -45,13 +45,13 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/utils": "6.4.1",
"@typescript-eslint/typescript-estree": "6.5.0",
"@typescript-eslint/utils": "6.5.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
"devDependencies": {
"@typescript-eslint/parser": "6.4.1",
"@typescript-eslint/parser": "6.5.0",
"ajv": "^6.10.0",
"downlevel-dts": "*",
"jest": "29.6.2",
@ -78,5 +78,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -562,16 +562,17 @@ export declare interface ExpressionStatement extends BaseNode {
expression: Expression;
directive: string | undefined;
}
export declare type ForInitialiser = Expression | VariableDeclaration;
export declare type ForInitialiser = Expression | LetOrConstOrVarDeclaration;
export declare interface ForInStatement extends BaseNode {
type: AST_NODE_TYPES.ForInStatement;
left: ForInitialiser;
right: Expression;
body: Statement;
}
declare type ForOfInitialiser = Expression | LetOrConstOrVarDeclaration | UsingInForOfDeclaration;
export declare interface ForOfStatement extends BaseNode {
type: AST_NODE_TYPES.ForOfStatement;
left: ForInitialiser;
left: ForOfInitialiser;
right: Expression;
body: Statement;
await: boolean;
@ -826,6 +827,40 @@ export declare interface LabeledStatement extends BaseNode {
body: Statement;
}
export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion;
export declare interface LetOrConstOrVarDeclaration extends BaseNode {
type: AST_NODE_TYPES.VariableDeclaration;
/**
* The variables declared by this declaration.
* Note that there may be 0 declarations (i.e. `const;`).
* ```
* let x;
* let y, z;
* ```
*/
declarations: LetOrConstOrVarDeclarator[];
/**
* Whether the declaration is `declare`d
* ```
* declare const x = 1;
* ```
*/
declare: boolean;
/**
* The keyword used to declare the variable(s)
* ```
* const x = 1;
* let y = 2;
* var z = 3;
* ```
*/
kind: 'const' | 'let' | 'var';
}
export declare interface LetOrConstOrVarDeclarator extends BaseNode {
type: AST_NODE_TYPES.VariableDeclarator;
id: BindingName;
init: Expression | null;
definite: boolean;
}
export declare interface LineComment extends BaseToken {
type: AST_TOKEN_TYPES.Line;
}
@ -1761,41 +1796,72 @@ export declare interface UpdateExpression extends UnaryExpressionBase {
type: AST_NODE_TYPES.UpdateExpression;
operator: '--' | '++';
}
declare type ValueOf<T> = T[keyof T];
export declare interface VariableDeclaration extends BaseNode {
export declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNomalConextDeclaration;
export declare type UsingDeclarator = UsingInForOfDeclarator | UsingInNomalConextDeclarator;
export declare interface UsingInForOfDeclaration extends BaseNode {
type: AST_NODE_TYPES.VariableDeclaration;
/**
* The variables declared by this declaration.
* Note that there may be 0 declarations (i.e. `const;`).
* ```
* let x;
* let y, z;
* for(using x of y){}
* ```
*/
declarations: VariableDeclarator[];
declarations: UsingInForOfDeclarator[];
/**
* Whether the declaration is `declare`d
* ```
* declare const x = 1;
* ```
* This value will always be `false`
* because 'declare' modifier cannot appear on a 'using' declaration.
*/
declare: boolean;
declare: false;
/**
* The keyword used to declare the variable(s)
* ```
* const x = 1;
* let y = 2;
* var z = 3;
* for(using x of y){}
* for(await using x of y){}
* ```
*/
kind: 'const' | 'let' | 'var';
kind: 'await using' | 'using';
}
export declare interface VariableDeclarator extends BaseNode {
export declare interface UsingInForOfDeclarator extends BaseNode {
type: AST_NODE_TYPES.VariableDeclarator;
id: BindingName;
init: Expression | null;
id: Identifier;
init: null;
definite: boolean;
}
export declare interface UsingInNomalConextDeclaration extends BaseNode {
type: AST_NODE_TYPES.VariableDeclaration;
/**
* The variables declared by this declaration.
* Note that there may be 0 declarations (i.e. `const;`).
* ```
* using x = 1;
* using y =1, z = 2;
* ```
*/
declarations: UsingInNomalConextDeclarator[];
/**
* This value will always be `false`
* because 'declare' modifier cannot appear on a 'using' declaration.
*/
declare: false;
/**
* The keyword used to declare the variable(s)
* ```
* using x = 1;
* await using y = 2;
* ```
*/
kind: 'await using' | 'using';
}
export declare interface UsingInNomalConextDeclarator extends BaseNode {
type: AST_NODE_TYPES.VariableDeclarator;
id: Identifier;
init: Expression;
definite: boolean;
}
declare type ValueOf<T> = T[keyof T];
export declare type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration;
export declare type VariableDeclarator = LetOrConstOrVarDeclarator | UsingDeclarator;
export declare interface WhileStatement extends BaseNode {
type: AST_NODE_TYPES.WhileStatement;
test: Expression;

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/types",
"version": "6.4.1",
"version": "6.5.0",
"description": "Types for the TypeScript-ESTree AST spec",
"files": [
"dist",
@ -90,5 +90,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -1 +1 @@
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA4B5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAKtE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,wBAAwB,GAAG,EAAE,CAAC,sBAAsB,GAC1D,OAAO,CAMT;AAED,MAAM,WAAW,OAAO;IACtB,qBAAqB,EAAE,2BAA2B,CAAC;IACnD,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC7D;AAED,qBAAa,SAAS;;IACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAiB;IACvD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAiB;IAEvD,OAAO,CAAC,YAAY,CAAS;IAE7B;;;;;OAKG;gBACS,GAAG,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAK1D,UAAU,IAAI,OAAO;IAOrB,cAAc,IAAI,QAAQ,CAAC,OAAO;IAIlC;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IA8BjB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAyElB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,oCAAoC;IAe5C;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAsB7B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAiC9B;;;;;OAKG;IACH,OAAO,CAAC,gDAAgD;IAexD;;;;OAIG;IACH,OAAO,CAAC,kDAAkD;IAmB1D;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,sBAAsB;IA4C9B;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA+FlB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,+BAA+B;IAiDvC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,sBAAsB;IAoC9B,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,qBAAqB;IAsB7B;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;CAymFpB"}
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA4B5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAKtE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,wBAAwB,GAAG,EAAE,CAAC,sBAAsB,GAC1D,OAAO,CAMT;AAED,MAAM,WAAW,OAAO;IACtB,qBAAqB,EAAE,2BAA2B,CAAC;IACnD,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC7D;AAED,qBAAa,SAAS;;IACpB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAiB;IACvD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAiB;IAEvD,OAAO,CAAC,YAAY,CAAS;IAE7B;;;;;OAKG;gBACS,GAAG,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAK1D,UAAU,IAAI,OAAO;IAOrB,cAAc,IAAI,QAAQ,CAAC,OAAO;IAIlC;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IA8BjB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAyElB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,oCAAoC;IAe5C;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAsB7B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAiC9B;;;;;OAKG;IACH,OAAO,CAAC,gDAAgD;IAexD;;;;OAIG;IACH,OAAO,CAAC,kDAAkD;IAmB1D;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,sBAAsB;IA4C9B;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA+FlB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,+BAA+B;IAiDvC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,sBAAsB;IAoC9B,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,qBAAqB;IAsB7B;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;CAypFpB"}

View file

@ -741,6 +741,16 @@ class Converter {
if (!result.declarations.length) {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, 'A variable declaration list must have at least one variable declarator.');
}
if (result.kind === 'using' || result.kind === 'await using') {
node.declarationList.declarations.forEach((declaration, i) => {
if (result.declarations[i].init == null) {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration, `'${result.kind}' declarations must be initialized.`);
}
if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration.name, `'${result.kind}' declarations may not have binding patterns.`);
}
});
}
/**
* Semantically, decorators are not allowed on variable declarations,
* Pre 4.8 TS would include them in the AST, so we did as well.
@ -751,13 +761,25 @@ class Converter {
return this.fixExports(node, result);
}
// mostly for for-of, for-in
case SyntaxKind.VariableDeclarationList:
return this.createNode(node, {
case SyntaxKind.VariableDeclarationList: {
const result = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration,
declarations: node.declarations.map(el => this.convertChild(el)),
declare: false,
kind: (0, node_utils_1.getDeclarationKind)(node),
});
if (result.kind === 'using' || result.kind === 'await using') {
node.declarations.forEach((declaration, i) => {
if (result.declarations[i].init != null) {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration, `'${result.kind}' declarations may not be initialized in for statement.`);
}
if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration.name, `'${result.kind}' declarations may not have binding patterns.`);
}
});
}
return result;
}
// Expressions
case SyntaxKind.ExpressionStatement:
return this.createNode(node, {
@ -2410,6 +2432,13 @@ _Converter_instances = new WeakSet(), _Converter_checkModifiers = function _Conv
!ts.isPropertyDeclaration(node)) {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on class elements of this kind.`);
}
if (modifier.kind === SyntaxKind.DeclareKeyword &&
ts.isVariableStatement(node)) {
const declarationKind = (0, node_utils_1.getDeclarationKind)(node.declarationList);
if (declarationKind === 'using' || declarationKind === 'await using') {
__classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'declare' modifier cannot appear on a '${declarationKind}' declaration.`);
}
}
if (modifier.kind === SyntaxKind.AbstractKeyword &&
node.kind !== SyntaxKind.ClassDeclaration &&
node.kind !== SyntaxKind.ConstructorType &&

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,7 @@ interface TokenToText extends TSESTree.PunctuatorTokenToText, TSESTree.BinaryOpe
}
type AssignmentOperatorKind = keyof TSESTree.AssignmentOperatorToText;
type BinaryOperatorKind = keyof TSESTree.BinaryOperatorToText;
type DeclarationKind = TSESTree.VariableDeclaration['kind'];
/**
* Returns true if the given ts.Token is a logical operator
* @param operator the operator token
@ -111,7 +112,7 @@ export declare function isJSXToken(node: ts.Node): boolean;
* @param node TypeScript AST node
* @returns declaration kind
*/
export declare function getDeclarationKind(node: ts.VariableDeclarationList): 'const' | 'let' | 'var';
export declare function getDeclarationKind(node: ts.VariableDeclarationList): DeclarationKind;
/**
* Gets a ts.Node's accessibility level
* @param node The ts.Node

File diff suppressed because one or more lines are too long

View file

@ -282,9 +282,16 @@ function getDeclarationKind(node) {
if (node.flags & ts.NodeFlags.Let) {
return 'let';
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if ((node.flags & ts.NodeFlags.AwaitUsing) === ts.NodeFlags.AwaitUsing) {
return 'await using';
}
if (node.flags & ts.NodeFlags.Const) {
return 'const';
}
if (node.flags & ts.NodeFlags.Using) {
return 'using';
}
return 'var';
}
exports.getDeclarationKind = getDeclarationKind;

File diff suppressed because one or more lines are too long

View file

@ -33,12 +33,12 @@ const ts = __importStar(require("typescript"));
* This needs to be kept in sync with /docs/users/Versioning.mdx
* in the typescript-eslint monorepo
*/
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.2.0';
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.3.0';
/*
* The semver package will ignore prerelease ranges, and we don't want to explicitly document every one
* List them all separately here, so we can automatically create the full string
*/
const SUPPORTED_PRERELEASE_RANGES = ['5.2.1-rc'];
const SUPPORTED_PRERELEASE_RANGES = [];
const ACTIVE_TYPESCRIPT_VERSION = ts.version;
const isRunningSupportedTypeScriptVersion = semver_1.default.satisfies(ACTIVE_TYPESCRIPT_VERSION, [SUPPORTED_TYPESCRIPT_VERSIONS]
.concat(SUPPORTED_PRERELEASE_RANGES)

View file

@ -1 +1 @@
{"version":3,"file":"warnAboutTSVersion.js","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,+CAAiC;AAGjC;;;GAGG;AACH,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,MAAM,2BAA2B,GAAa,CAAC,UAAU,CAAC,CAAC;AAC3D,MAAM,yBAAyB,GAAG,EAAE,CAAC,OAAO,CAAC;AAC7C,MAAM,mCAAmC,GAAG,gBAAM,CAAC,SAAS,CAC1D,yBAAyB,EACzB,CAAC,6BAA6B,CAAC;KAC5B,MAAM,CAAC,2BAA2B,CAAC;KACnC,IAAI,CAAC,MAAM,CAAC,CAChB,CAAC;AAEF,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC,SAAgB,kBAAkB,CAAC,aAA4B;IAC7D,IAAI,CAAC,mCAAmC,IAAI,CAAC,oBAAoB,EAAE;QACjE,MAAM,KAAK,GACT,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QACjE,IAAI,KAAK,EAAE;YACT,MAAM,MAAM,GAAG,eAAe,CAAC;YAC/B,MAAM,cAAc,GAAG;gBACrB,MAAM;gBACN,uIAAuI;gBACvI,uDAAuD;gBACvD,kCAAkC,6BAA6B,EAAE;gBACjE,4BAA4B,yBAAyB,EAAE;gBACvD,6EAA6E;gBAC7E,MAAM;aACP,CAAC;YACF,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SAChD;QACD,oBAAoB,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAnBD,gDAmBC"}
{"version":3,"file":"warnAboutTSVersion.js","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,+CAAiC;AAGjC;;;GAGG;AACH,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,MAAM,2BAA2B,GAAa,EAAE,CAAC;AACjD,MAAM,yBAAyB,GAAG,EAAE,CAAC,OAAO,CAAC;AAC7C,MAAM,mCAAmC,GAAG,gBAAM,CAAC,SAAS,CAC1D,yBAAyB,EACzB,CAAC,6BAA6B,CAAC;KAC5B,MAAM,CAAC,2BAA2B,CAAC;KACnC,IAAI,CAAC,MAAM,CAAC,CAChB,CAAC;AAEF,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC,SAAgB,kBAAkB,CAAC,aAA4B;IAC7D,IAAI,CAAC,mCAAmC,IAAI,CAAC,oBAAoB,EAAE;QACjE,MAAM,KAAK,GACT,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QACjE,IAAI,KAAK,EAAE;YACT,MAAM,MAAM,GAAG,eAAe,CAAC;YAC/B,MAAM,cAAc,GAAG;gBACrB,MAAM;gBACN,uIAAuI;gBACvI,uDAAuD;gBACvD,kCAAkC,6BAA6B,EAAE;gBACjE,4BAA4B,yBAAyB,EAAE;gBACvD,6EAA6E;gBAC7E,MAAM;aACP,CAAC;YACF,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SAChD;QACD,oBAAoB,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAnBD,gDAmBC"}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/typescript-estree",
"version": "6.4.1",
"version": "6.5.0",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
@ -52,8 +52,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -88,5 +88,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -371,9 +371,17 @@ export declare const isNodeOfType: <NodeType extends AST_NODE_TYPES>(nodeType: N
type: NodeType;
}> | Extract<TSESTree.UpdateExpression, {
type: NodeType;
}> | Extract<TSESTree.VariableDeclaration, {
}> | Extract<TSESTree.LetOrConstOrVarDeclaration, {
type: NodeType;
}> | Extract<TSESTree.VariableDeclarator, {
}> | Extract<TSESTree.UsingInForOfDeclaration, {
type: NodeType;
}> | Extract<TSESTree.UsingInNomalConextDeclaration, {
type: NodeType;
}> | Extract<TSESTree.LetOrConstOrVarDeclarator, {
type: NodeType;
}> | Extract<TSESTree.UsingInForOfDeclarator, {
type: NodeType;
}> | Extract<TSESTree.UsingInNomalConextDeclarator, {
type: NodeType;
}> | Extract<TSESTree.WhileStatement, {
type: NodeType;
@ -754,9 +762,17 @@ export declare const isNodeOfTypes: <NodeTypes extends readonly AST_NODE_TYPES[]
type: NodeTypes[number];
}> | Extract<TSESTree.UpdateExpression, {
type: NodeTypes[number];
}> | Extract<TSESTree.VariableDeclaration, {
}> | Extract<TSESTree.LetOrConstOrVarDeclaration, {
type: NodeTypes[number];
}> | Extract<TSESTree.VariableDeclarator, {
}> | Extract<TSESTree.UsingInForOfDeclaration, {
type: NodeTypes[number];
}> | Extract<TSESTree.UsingInNomalConextDeclaration, {
type: NodeTypes[number];
}> | Extract<TSESTree.LetOrConstOrVarDeclarator, {
type: NodeTypes[number];
}> | Extract<TSESTree.UsingInForOfDeclarator, {
type: NodeTypes[number];
}> | Extract<TSESTree.UsingInNomalConextDeclarator, {
type: NodeTypes[number];
}> | Extract<TSESTree.WhileStatement, {
type: NodeTypes[number];
@ -1137,9 +1153,17 @@ export declare const isNodeOfTypeWithConditions: <NodeType extends AST_NODE_TYPE
type: NodeType;
}> | Extract<TSESTree.UpdateExpression, {
type: NodeType;
}> | Extract<TSESTree.VariableDeclaration, {
}> | Extract<TSESTree.LetOrConstOrVarDeclaration, {
type: NodeType;
}> | Extract<TSESTree.VariableDeclarator, {
}> | Extract<TSESTree.UsingInForOfDeclaration, {
type: NodeType;
}> | Extract<TSESTree.UsingInNomalConextDeclaration, {
type: NodeType;
}> | Extract<TSESTree.LetOrConstOrVarDeclarator, {
type: NodeType;
}> | Extract<TSESTree.UsingInForOfDeclarator, {
type: NodeType;
}> | Extract<TSESTree.UsingInNomalConextDeclarator, {
type: NodeType;
}> | Extract<TSESTree.WhileStatement, {
type: NodeType;

View file

@ -1 +1 @@
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ast-utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAO9E,eAAO,MAAM,YAAY,kEAGf,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEf,CAAC;AAE5B,eAAO,MAAM,aAAa,gFAGhB,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEC,CAAC;AAE5C,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qGAQ/B,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS,uCASvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DAQ/B,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,yCAWzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;yGAShC,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,m0BAGkB,CAAC"}
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ast-utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAO9E,eAAO,MAAM,YAAY,kEAGf,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEf,CAAC;AAE5B,eAAO,MAAM,aAAa,gFAGhB,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEC,CAAC;AAE5C,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qGAQ/B,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS,uCASvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DAQ/B,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,yCAWzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;yGAShC,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,m0BAGkB,CAAC"}

View file

@ -25,7 +25,7 @@ declare const isLogicalOrOperator: (node: TSESTree.Node | null | undefined) => n
* ```
*/
declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion;
declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.VariableDeclarator;
declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.LetOrConstOrVarDeclarator | TSESTree.UsingInForOfDeclarator | TSESTree.UsingInNomalConextDeclarator;
declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression;
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;

View file

@ -1 +1 @@
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAU7C,QAAA,MAAM,yBAAyB;;4BAG9B,CAAC;AAEF,QAAA,MAAM,4BAA4B,gYAGjC,CAAC;AAEF,QAAA,MAAM,4BAA4B;;4BAGjC,CAAC;AAEF,QAAA,MAAM,+BAA+B,gYAGpC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,wBAAwB;;2BAK7B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,mBAAmB,sHAGxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,wGAGV,CAAC;AAEZ,QAAA,MAAM,oBAAoB,iFAAkD,CAAC;AAO7E,QAAA,MAAM,UAAU,0MAA+B,CAAC;AAUhD,QAAA,MAAM,cAAc,yTAAmC,CAAC;AAExD,QAAA,MAAM,wBAAwB,gdAGnB,CAAC;AAEZ,QAAA,MAAM,gBAAgB,6EAA8C,CAAC;AAErE,QAAA,MAAM,mBAAmB,gFAAiD,CAAC;AAE3E,QAAA,MAAM,oBAAoB,ixBAef,CAAC;AAEZ;;GAEG;AACH,QAAA,MAAM,aAAa,+OAGlB,CAAC;AAEF;;GAEG;AACH,iBAAS,QAAQ,CACf,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAC9B,IAAI,IAAI;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG,CAAC,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAO3E;AAED,QAAA,MAAM,YAAY,yEAA0C,CAAC;AAE7D;;GAEG;AACH,QAAA,MAAM,iBAAiB,8EAA+C,CAAC;AAEvE;;GAEG;AACH,QAAA,MAAM,cAAc;;4BAElB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,aAAa;;4BAEjB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,eAAe;;yBAEnB,CAAC;AAEH,QAAA,MAAM,MAAM,qLAMD,CAAC;AAEZ,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,oBAAoB,GACrB,CAAC"}
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAU7C,QAAA,MAAM,yBAAyB;;4BAG9B,CAAC;AAEF,QAAA,MAAM,4BAA4B,gYAGjC,CAAC;AAEF,QAAA,MAAM,4BAA4B;;4BAGjC,CAAC;AAEF,QAAA,MAAM,+BAA+B,gYAGpC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,wBAAwB;;2BAK7B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,mBAAmB,sHAGxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,wGAGV,CAAC;AAEZ,QAAA,MAAM,oBAAoB,kKAAkD,CAAC;AAO7E,QAAA,MAAM,UAAU,0MAA+B,CAAC;AAUhD,QAAA,MAAM,cAAc,yTAAmC,CAAC;AAExD,QAAA,MAAM,wBAAwB,gdAGnB,CAAC;AAEZ,QAAA,MAAM,gBAAgB,6EAA8C,CAAC;AAErE,QAAA,MAAM,mBAAmB,gFAAiD,CAAC;AAE3E,QAAA,MAAM,oBAAoB,ixBAef,CAAC;AAEZ;;GAEG;AACH,QAAA,MAAM,aAAa,+OAGlB,CAAC;AAEF;;GAEG;AACH,iBAAS,QAAQ,CACf,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAC9B,IAAI,IAAI;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG,CAAC,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAO3E;AAED,QAAA,MAAM,YAAY,yEAA0C,CAAC;AAE7D;;GAEG;AACH,QAAA,MAAM,iBAAiB,8EAA+C,CAAC;AAEvE;;GAEG;AACH,QAAA,MAAM,cAAc;;4BAElB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,aAAa;;4BAEjB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,eAAe;;yBAEnB,CAAC;AAEH,QAAA,MAAM,MAAM,qLAMD,CAAC;AAEZ,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,oBAAoB,GACrB,CAAC"}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/utils",
"version": "6.4.1",
"version": "6.5.0",
"description": "Utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@ -68,16 +68,16 @@
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/typescript-estree": "6.5.0",
"semver": "^7.5.4"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
},
"devDependencies": {
"@typescript-eslint/parser": "6.4.1",
"@typescript-eslint/parser": "6.5.0",
"downlevel-dts": "*",
"jest": "29.6.2",
"prettier": "^2.8.4",
@ -95,5 +95,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/visitor-keys",
"version": "6.4.1",
"version": "6.5.0",
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [
"dist",
@ -45,7 +45,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/types": "6.5.0",
"eslint-visitor-keys": "^3.4.1"
},
"devDependencies": {
@ -67,5 +67,5 @@
]
}
},
"gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59"
"gitHead": "4f34d0ba34474926ba1eed623704b583a037f886"
}

View file

@ -1,5 +1,5 @@
/**
* @fileoverview A class of the code path segment.
* @fileoverview The CodePathSegment class.
* @author Toru Nagashima
*/
@ -30,10 +30,22 @@ function isReachable(segment) {
/**
* A code path segment.
*
* Each segment is arranged in a series of linked lists (implemented by arrays)
* that keep track of the previous and next segments in a code path. In this way,
* you can navigate between all segments in any code path so long as you have a
* reference to any segment in that code path.
*
* When first created, the segment is in a detached state, meaning that it knows the
* segments that came before it but those segments don't know that this new segment
* follows it. Only when `CodePathSegment#markUsed()` is called on a segment does it
* officially become part of the code path by updating the previous segments to know
* that this new segment follows.
*/
class CodePathSegment {
/**
* Creates a new instance.
* @param {string} id An identifier.
* @param {CodePathSegment[]} allPrevSegments An array of the previous segments.
* This array includes unreachable segments.
@ -49,27 +61,25 @@ class CodePathSegment {
this.id = id;
/**
* An array of the next segments.
* An array of the next reachable segments.
* @type {CodePathSegment[]}
*/
this.nextSegments = [];
/**
* An array of the previous segments.
* An array of the previous reachable segments.
* @type {CodePathSegment[]}
*/
this.prevSegments = allPrevSegments.filter(isReachable);
/**
* An array of the next segments.
* This array includes unreachable segments.
* An array of all next segments including reachable and unreachable.
* @type {CodePathSegment[]}
*/
this.allNextSegments = [];
/**
* An array of the previous segments.
* This array includes unreachable segments.
* An array of all previous segments including reachable and unreachable.
* @type {CodePathSegment[]}
*/
this.allPrevSegments = allPrevSegments;
@ -83,7 +93,11 @@ class CodePathSegment {
// Internal data.
Object.defineProperty(this, "internal", {
value: {
// determines if the segment has been attached to the code path
used: false,
// array of previous segments coming from the end of a loop
loopedPrevSegments: []
}
});
@ -113,9 +127,10 @@ class CodePathSegment {
}
/**
* Creates a segment that follows given segments.
* Creates a new segment and appends it after the given segments.
* @param {string} id An identifier.
* @param {CodePathSegment[]} allPrevSegments An array of the previous segments.
* @param {CodePathSegment[]} allPrevSegments An array of the previous segments
* to append to.
* @returns {CodePathSegment} The created segment.
*/
static newNext(id, allPrevSegments) {
@ -127,7 +142,7 @@ class CodePathSegment {
}
/**
* Creates an unreachable segment that follows given segments.
* Creates an unreachable segment and appends it after the given segments.
* @param {string} id An identifier.
* @param {CodePathSegment[]} allPrevSegments An array of the previous segments.
* @returns {CodePathSegment} The created segment.
@ -137,7 +152,7 @@ class CodePathSegment {
/*
* In `if (a) return a; foo();` case, the unreachable segment preceded by
* the return statement is not used but must not be remove.
* the return statement is not used but must not be removed.
*/
CodePathSegment.markUsed(segment);
@ -157,7 +172,7 @@ class CodePathSegment {
}
/**
* Makes a given segment being used.
* Marks a given segment as used.
*
* And this function registers the segment into the previous segments as a next.
* @param {CodePathSegment} segment A segment to mark.
@ -172,6 +187,13 @@ class CodePathSegment {
let i;
if (segment.reachable) {
/*
* If the segment is reachable, then it's officially part of the
* code path. This loops through all previous segments to update
* their list of next segments. Because the segment is reachable,
* it's added to both `nextSegments` and `allNextSegments`.
*/
for (i = 0; i < segment.allPrevSegments.length; ++i) {
const prevSegment = segment.allPrevSegments[i];
@ -179,6 +201,13 @@ class CodePathSegment {
prevSegment.nextSegments.push(segment);
}
} else {
/*
* If the segment is not reachable, then it's not officially part of the
* code path. This loops through all previous segments to update
* their list of next segments. Because the segment is not reachable,
* it's added only to `allNextSegments`.
*/
for (i = 0; i < segment.allPrevSegments.length; ++i) {
segment.allPrevSegments[i].allNextSegments.push(segment);
}
@ -196,19 +225,20 @@ class CodePathSegment {
}
/**
* Replaces unused segments with the previous segments of each unused segment.
* @param {CodePathSegment[]} segments An array of segments to replace.
* @returns {CodePathSegment[]} The replaced array.
* Creates a new array based on an array of segments. If any segment in the
* array is unused, then it is replaced by all of its previous segments.
* All used segments are returned as-is without replacement.
* @param {CodePathSegment[]} segments The array of segments to flatten.
* @returns {CodePathSegment[]} The flattened array.
*/
static flattenUnusedSegments(segments) {
const done = Object.create(null);
const retv = [];
const done = new Set();
for (let i = 0; i < segments.length; ++i) {
const segment = segments[i];
// Ignores duplicated.
if (done[segment.id]) {
if (done.has(segment)) {
continue;
}
@ -217,18 +247,16 @@ class CodePathSegment {
for (let j = 0; j < segment.allPrevSegments.length; ++j) {
const prevSegment = segment.allPrevSegments[j];
if (!done[prevSegment.id]) {
done[prevSegment.id] = true;
retv.push(prevSegment);
if (!done.has(prevSegment)) {
done.add(prevSegment);
}
}
} else {
done[segment.id] = true;
retv.push(segment);
done.add(segment);
}
}
return retv;
return [...done];
}
}

View file

@ -32,6 +32,7 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array");
/** @typedef {import("../shared/types").Parser} Parser */
/** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */
/** @typedef {import("../shared/types").Rule} Rule */
/**
@ -446,7 +447,7 @@ class FlatRuleTester {
/**
* Adds a new rule test to execute.
* @param {string} ruleName The name of the rule to run.
* @param {Function} rule The rule to test.
* @param {Function | Rule} rule The rule to test.
* @param {{
* valid: (ValidTestCase | string)[],
* invalid: InvalidTestCase[]
@ -1011,29 +1012,35 @@ class FlatRuleTester {
/*
* This creates a mocha test suite and pipes all supplied info through
* one of the templates above.
* The test suites for valid/invalid are created conditionally as
* test runners (eg. vitest) fail for empty test suites.
*/
this.constructor.describe(ruleName, () => {
this.constructor.describe("valid", () => {
test.valid.forEach(valid => {
this.constructor[valid.only ? "itOnly" : "it"](
sanitize(typeof valid === "object" ? valid.name || valid.code : valid),
() => {
testValidTemplate(valid);
}
);
if (test.valid.length > 0) {
this.constructor.describe("valid", () => {
test.valid.forEach(valid => {
this.constructor[valid.only ? "itOnly" : "it"](
sanitize(typeof valid === "object" ? valid.name || valid.code : valid),
() => {
testValidTemplate(valid);
}
);
});
});
});
}
this.constructor.describe("invalid", () => {
test.invalid.forEach(invalid => {
this.constructor[invalid.only ? "itOnly" : "it"](
sanitize(invalid.name || invalid.code),
() => {
testInvalidTemplate(invalid);
}
);
if (test.invalid.length > 0) {
this.constructor.describe("invalid", () => {
test.invalid.forEach(invalid => {
this.constructor[invalid.only ? "itOnly" : "it"](
sanitize(invalid.name || invalid.code),
() => {
testInvalidTemplate(invalid);
}
);
});
});
});
}
});
}
}

View file

@ -62,6 +62,7 @@ const { SourceCode } = require("../source-code");
//------------------------------------------------------------------------------
/** @typedef {import("../shared/types").Parser} Parser */
/** @typedef {import("../shared/types").Rule} Rule */
/**
@ -508,17 +509,20 @@ class RuleTester {
/**
* Define a rule for one particular run of tests.
* @param {string} name The name of the rule to define.
* @param {Function} rule The rule definition.
* @param {Function | Rule} rule The rule definition.
* @returns {void}
*/
defineRule(name, rule) {
if (typeof rule === "function") {
emitLegacyRuleAPIWarning(name);
}
this.rules[name] = rule;
}
/**
* Adds a new rule test to execute.
* @param {string} ruleName The name of the rule to run.
* @param {Function} rule The rule to test.
* @param {Function | Rule} rule The rule to test.
* @param {{
* valid: (ValidTestCase | string)[],
* invalid: InvalidTestCase[]
@ -1021,29 +1025,35 @@ class RuleTester {
/*
* This creates a mocha test suite and pipes all supplied info through
* one of the templates above.
* The test suites for valid/invalid are created conditionally as
* test runners (eg. vitest) fail for empty test suites.
*/
this.constructor.describe(ruleName, () => {
this.constructor.describe("valid", () => {
test.valid.forEach(valid => {
this.constructor[valid.only ? "itOnly" : "it"](
sanitize(typeof valid === "object" ? valid.name || valid.code : valid),
() => {
testValidTemplate(valid);
}
);
if (test.valid.length > 0) {
this.constructor.describe("valid", () => {
test.valid.forEach(valid => {
this.constructor[valid.only ? "itOnly" : "it"](
sanitize(typeof valid === "object" ? valid.name || valid.code : valid),
() => {
testValidTemplate(valid);
}
);
});
});
});
}
this.constructor.describe("invalid", () => {
test.invalid.forEach(invalid => {
this.constructor[invalid.only ? "itOnly" : "it"](
sanitize(invalid.name || invalid.code),
() => {
testInvalidTemplate(invalid);
}
);
if (test.invalid.length > 0) {
this.constructor.describe("invalid", () => {
test.invalid.forEach(invalid => {
this.constructor[invalid.only ? "itOnly" : "it"](
sanitize(invalid.name || invalid.code),
() => {
testInvalidTemplate(invalid);
}
);
});
});
});
}
});
}
}

View file

@ -5,6 +5,12 @@
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { getStaticValue } = require("@eslint-community/eslint-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@ -29,6 +35,7 @@ module.exports = {
},
create(context) {
const { sourceCode } = context;
/**
* report an error.
@ -46,17 +53,17 @@ module.exports = {
* check the right side of the assignment
* @param {ASTNode} update UpdateExpression to check
* @param {int} dir expected direction that could either be turned around or invalidated
* @returns {int} return dir, the negated dir or zero if it's not clear for identifiers
* @returns {int} return dir, the negated dir, or zero if the counter does not change or the direction is not clear
*/
function getRightDirection(update, dir) {
if (update.right.type === "UnaryExpression") {
if (update.right.operator === "-") {
return -dir;
}
} else if (update.right.type === "Identifier") {
return 0;
const staticValue = getStaticValue(update.right, sourceCode.getScope(update));
if (staticValue && ["bigint", "boolean", "number"].includes(typeof staticValue.value)) {
const sign = Math.sign(Number(staticValue.value)) || 0; // convert NaN to 0
return dir * sign;
}
return dir;
return 0;
}
/**

View file

@ -10,6 +10,7 @@
//------------------------------------------------------------------------------
const { findVariable } = require("@eslint-community/eslint-utils");
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
@ -59,6 +60,78 @@ function isPromiseExecutor(node, scope) {
isGlobalReference(parent.callee, getOuterScope(scope));
}
/**
* Checks if the given node is a void expression.
* @param {ASTNode} node The node to check.
* @returns {boolean} - `true` if the node is a void expression
*/
function expressionIsVoid(node) {
return node.type === "UnaryExpression" && node.operator === "void";
}
/**
* Fixes the linting error by prepending "void " to the given node
* @param {Object} sourceCode context given by context.sourceCode
* @param {ASTNode} node The node to fix.
* @param {Object} fixer The fixer object provided by ESLint.
* @returns {Array<Object>} - An array of fix objects to apply to the node.
*/
function voidPrependFixer(sourceCode, node, fixer) {
const requiresParens =
// prepending `void ` will fail if the node has a lower precedence than void
astUtils.getPrecedence(node) < astUtils.getPrecedence({ type: "UnaryExpression", operator: "void" }) &&
// check if there are parentheses around the node to avoid redundant parentheses
!astUtils.isParenthesised(sourceCode, node);
// avoid parentheses issues
const returnOrArrowToken = sourceCode.getTokenBefore(
node,
node.parent.type === "ArrowFunctionExpression"
? astUtils.isArrowToken
// isReturnToken
: token => token.type === "Keyword" && token.value === "return"
);
const firstToken = sourceCode.getTokenAfter(returnOrArrowToken);
const prependSpace =
// is return token, as => allows void to be adjacent
returnOrArrowToken.value === "return" &&
// If two tokens (return and "(") are adjacent
returnOrArrowToken.range[1] === firstToken.range[0];
return [
fixer.insertTextBefore(firstToken, `${prependSpace ? " " : ""}void ${requiresParens ? "(" : ""}`),
fixer.insertTextAfter(node, requiresParens ? ")" : "")
];
}
/**
* Fixes the linting error by `wrapping {}` around the given node's body.
* @param {Object} sourceCode context given by context.sourceCode
* @param {ASTNode} node The node to fix.
* @param {Object} fixer The fixer object provided by ESLint.
* @returns {Array<Object>} - An array of fix objects to apply to the node.
*/
function curlyWrapFixer(sourceCode, node, fixer) {
// https://github.com/eslint/eslint/pull/17282#issuecomment-1592795923
const arrowToken = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken);
const firstToken = sourceCode.getTokenAfter(arrowToken);
const lastToken = sourceCode.getLastToken(node);
return [
fixer.insertTextBefore(firstToken, "{"),
fixer.insertTextAfter(lastToken, "}")
];
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@ -74,10 +147,27 @@ module.exports = {
url: "https://eslint.org/docs/latest/rules/no-promise-executor-return"
},
schema: [],
hasSuggestions: true,
schema: [{
type: "object",
properties: {
allowVoid: {
type: "boolean",
default: false
}
},
additionalProperties: false
}],
messages: {
returnsValue: "Return values from promise executor functions cannot be read."
returnsValue: "Return values from promise executor functions cannot be read.",
// arrow and function suggestions
prependVoid: "Prepend `void` to the expression.",
// only arrow suggestions
wrapBraces: "Wrap the expression in `{}`."
}
},
@ -85,26 +175,52 @@ module.exports = {
let funcInfo = null;
const sourceCode = context.sourceCode;
/**
* Reports the given node.
* @param {ASTNode} node Node to report.
* @returns {void}
*/
function report(node) {
context.report({ node, messageId: "returnsValue" });
}
const {
allowVoid = false
} = context.options[0] || {};
return {
onCodePathStart(_, node) {
funcInfo = {
upper: funcInfo,
shouldCheck: functionTypesToCheck.has(node.type) && isPromiseExecutor(node, sourceCode.getScope(node))
shouldCheck:
functionTypesToCheck.has(node.type) &&
isPromiseExecutor(node, sourceCode.getScope(node))
};
if (funcInfo.shouldCheck && node.type === "ArrowFunctionExpression" && node.expression) {
report(node.body);
if (// Is a Promise executor
funcInfo.shouldCheck &&
node.type === "ArrowFunctionExpression" &&
node.expression &&
// Except void
!(allowVoid && expressionIsVoid(node.body))
) {
const suggest = [];
// prevent useless refactors
if (allowVoid) {
suggest.push({
messageId: "prependVoid",
fix(fixer) {
return voidPrependFixer(sourceCode, node.body, fixer);
}
});
}
suggest.push({
messageId: "wrapBraces",
fix(fixer) {
return curlyWrapFixer(sourceCode, node, fixer);
}
});
context.report({
node: node.body,
messageId: "returnsValue",
suggest
});
}
},
@ -113,9 +229,31 @@ module.exports = {
},
ReturnStatement(node) {
if (funcInfo.shouldCheck && node.argument) {
report(node);
if (!(funcInfo.shouldCheck && node.argument)) {
return;
}
// node is `return <expression>`
if (!allowVoid) {
context.report({ node, messageId: "returnsValue" });
return;
}
if (expressionIsVoid(node.argument)) {
return;
}
// allowVoid && !expressionIsVoid
context.report({
node,
messageId: "returnsValue",
suggest: [{
messageId: "prependVoid",
fix(fixer) {
return voidPrependFixer(sourceCode, node.argument, fixer);
}
}]
});
}
};
}

View file

@ -19,7 +19,7 @@ A config object is using the "extends" key, which is not supported in flat confi
Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.
Please see the following page for more information:
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-configs
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
`,
globals: `

4
node_modules/eslint/package.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.47.0",
"version": "8.48.0",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"bin": {
@ -63,7 +63,7 @@
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "^8.47.0",
"@eslint/js": "8.48.0",
"@humanwhocodes/config-array": "^0.11.10",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",

View file

@ -35,6 +35,11 @@ type DecoratorContext =
| ClassMemberDecoratorContext
;
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
type DecoratorMetadata =
typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
/**
* Context provided to a class decorator.
* @template Class The type of the decorated class associated with this context.
@ -66,6 +71,8 @@ interface ClassDecoratorContext<
* ```
*/
addInitializer(initializer: (this: Class) => void): void;
readonly metadata: DecoratorMetadata;
}
/**
@ -130,6 +137,8 @@ interface ClassMethodDecoratorContext<
* ```
*/
addInitializer(initializer: (this: This) => void): void;
readonly metadata: DecoratorMetadata;
}
/**
@ -175,6 +184,8 @@ interface ClassGetterDecoratorContext<
* decorating a non-`static` element).
*/
addInitializer(initializer: (this: This) => void): void;
readonly metadata: DecoratorMetadata;
}
/**
@ -220,6 +231,8 @@ interface ClassSetterDecoratorContext<
* decorating a non-`static` element).
*/
addInitializer(initializer: (this: This) => void): void;
readonly metadata: DecoratorMetadata;
}
/**
@ -274,6 +287,8 @@ interface ClassAccessorDecoratorContext<
* decorating a non-`static` element).
*/
addInitializer(initializer: (this: This) => void): void;
readonly metadata: DecoratorMetadata;
}
/**
@ -369,4 +384,6 @@ interface ClassFieldDecoratorContext<
* decorating a non-`static` element).
*/
addInitializer(initializer: (this: This) => void): void;
readonly metadata: DecoratorMetadata;
}

View file

@ -750,6 +750,7 @@ interface Keyframe {
interface KeyframeAnimationOptions extends KeyframeEffectOptions {
id?: string;
timeline?: AnimationTimeline | null;
}
interface KeyframeEffectOptions extends EffectTiming {
@ -1034,7 +1035,7 @@ interface NotificationOptions {
lang?: string;
renotify?: boolean;
requireInteraction?: boolean;
silent?: boolean;
silent?: boolean | null;
tag?: string;
timestamp?: EpochTimeStamp;
vibrate?: VibratePattern;
@ -1351,7 +1352,6 @@ interface RTCEncodedAudioFrameMetadata {
}
interface RTCEncodedVideoFrameMetadata {
contributingSources?: number[];
dependencies?: number[];
frameId?: number;
height?: number;
@ -1871,8 +1871,13 @@ interface TextDecoderOptions {
}
interface TextEncoderEncodeIntoResult {
read?: number;
written?: number;
read: number;
written: number;
}
interface ToggleEventInit extends EventInit {
newState?: string;
oldState?: string;
}
interface TouchEventInit extends EventModifierInit {
@ -2105,6 +2110,32 @@ interface WebGLContextEventInit extends EventInit {
statusMessage?: string;
}
interface WebTransportCloseInfo {
closeCode?: number;
reason?: string;
}
interface WebTransportErrorOptions {
source?: WebTransportErrorSource;
streamErrorCode?: number | null;
}
interface WebTransportHash {
algorithm?: string;
value?: BufferSource;
}
interface WebTransportOptions {
allowPooling?: boolean;
congestionControl?: WebTransportCongestionControl;
requireUnreliable?: boolean;
serverCertificateHashes?: WebTransportHash[];
}
interface WebTransportSendStreamOptions {
sendOrder?: number | null;
}
interface WheelEventInit extends MouseEventInit {
deltaMode?: number;
deltaX?: number;
@ -2304,9 +2335,9 @@ interface AbortSignal extends EventTarget {
declare var AbortSignal: {
prototype: AbortSignal;
new(): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
abort(reason?: any): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
timeout(milliseconds: number): AbortSignal;
};
@ -3344,7 +3375,7 @@ interface CSSImportRule extends CSSRule {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/media) */
readonly media: MediaList;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet) */
readonly styleSheet: CSSStyleSheet;
readonly styleSheet: CSSStyleSheet | null;
}
declare var CSSImportRule: {
@ -3377,6 +3408,7 @@ declare var CSSKeyframeRule: {
interface CSSKeyframesRule extends CSSRule {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/cssRules) */
readonly cssRules: CSSRuleList;
readonly length: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/name) */
name: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/appendRule) */
@ -3597,7 +3629,7 @@ interface CSSNumericValue extends CSSStyleValue {
declare var CSSNumericValue: {
prototype: CSSNumericValue;
new(): CSSNumericValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/parse) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/parse_static) */
parse(cssText: string): CSSNumericValue;
};
@ -4108,8 +4140,11 @@ interface CSSStyleDeclaration {
fontStyle: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) */
fontSynthesis: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) */
fontSynthesisSmallCaps: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) */
fontSynthesisStyle: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) */
fontSynthesisWeight: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-variant) */
fontVariant: string;
@ -4129,6 +4164,8 @@ interface CSSStyleDeclaration {
fontVariationSettings: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-weight) */
fontWeight: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) */
forcedColorAdjust: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/gap) */
gap: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/grid) */
@ -4996,12 +5033,15 @@ declare var CSSStyleDeclaration: {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule)
*/
interface CSSStyleRule extends CSSRule {
readonly cssRules: CSSRuleList;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/selectorText) */
selectorText: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style) */
readonly style: CSSStyleDeclaration;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/styleMap) */
readonly styleMap: StylePropertyMap;
deleteRule(index: number): void;
insertRule(rule: string, index?: number): number;
}
declare var CSSStyleRule: {
@ -5060,9 +5100,9 @@ interface CSSStyleValue {
declare var CSSStyleValue: {
prototype: CSSStyleValue;
new(): CSSStyleValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parse) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parse_static) */
parse(property: string, cssText: string): CSSStyleValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parseAll) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parseAll_static) */
parseAll(property: string, cssText: string): CSSStyleValue[];
};
@ -5438,6 +5478,8 @@ interface CanvasShadowStyles {
}
interface CanvasState {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */
reset(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */
restore(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */
@ -5623,8 +5665,6 @@ declare var ClipboardEvent: {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem)
*/
interface ClipboardItem {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/presentationStyle) */
readonly presentationStyle: PresentationStyle;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/types) */
readonly types: ReadonlyArray<string>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/getType) */
@ -6174,7 +6214,7 @@ interface DOMPoint extends DOMPointReadOnly {
declare var DOMPoint: {
prototype: DOMPoint;
new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */
fromPoint(other?: DOMPointInit): DOMPoint;
};
@ -6200,7 +6240,7 @@ interface DOMPointReadOnly {
declare var DOMPointReadOnly: {
prototype: DOMPointReadOnly;
new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */
fromPoint(other?: DOMPointInit): DOMPointReadOnly;
};
@ -6278,7 +6318,7 @@ interface DOMRectReadOnly {
declare var DOMRectReadOnly: {
prototype: DOMRectReadOnly;
new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */
fromRect(other?: DOMRectInit): DOMRectReadOnly;
};
@ -7118,6 +7158,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
createEvent(eventInterface: "StorageEvent"): StorageEvent;
createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
createEvent(eventInterface: "ToggleEvent"): ToggleEvent;
createEvent(eventInterface: "TouchEvent"): TouchEvent;
createEvent(eventInterface: "TrackEvent"): TrackEvent;
createEvent(eventInterface: "TransitionEvent"): TransitionEvent;
@ -8865,6 +8906,7 @@ interface GlobalEventHandlersEventMap {
"reset": Event;
"resize": UIEvent;
"scroll": Event;
"scrollend": Event;
"securitypolicyviolation": SecurityPolicyViolationEvent;
"seeked": Event;
"seeking": Event;
@ -9037,7 +9079,7 @@ interface GlobalEventHandlers {
* Fires when an error occurs during object loading.
* @param ev The event.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/error_event)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event)
*/
onerror: OnErrorEventHandler;
/**
@ -9215,6 +9257,8 @@ interface GlobalEventHandlers {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scroll_event)
*/
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollend_event) */
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/securitypolicyviolation_event) */
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
/**
@ -9636,7 +9680,7 @@ declare var HTMLBodyElement: {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement)
*/
interface HTMLButtonElement extends HTMLElement {
interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/disabled) */
disabled: boolean;
/**
@ -10032,6 +10076,8 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
readonly offsetWidth: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) */
outerText: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) */
popover: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) */
spellcheck: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) */
@ -10041,6 +10087,12 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
attachInternals(): ElementInternals;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click) */
click(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidePopover) */
hidePopover(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover) */
showPopover(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover) */
togglePopover(force?: boolean): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@ -10232,7 +10284,7 @@ interface HTMLFormElement extends HTMLElement {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete)
*/
autocomplete: string;
autocomplete: AutoFillBase;
/**
* Retrieves a collection, in source order, of all controls in a given form.
*
@ -10885,7 +10937,7 @@ declare var HTMLImageElement: {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement)
*/
interface HTMLInputElement extends HTMLElement {
interface HTMLInputElement extends HTMLElement, PopoverInvokerElement {
/** Sets or retrieves a comma-separated list of content types. */
accept: string;
/**
@ -10900,7 +10952,7 @@ interface HTMLInputElement extends HTMLElement {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/autocomplete)
*/
autocomplete: string;
autocomplete: AutoFill;
capture: string;
/** Sets or retrieves the state of the check box or radio button. */
checked: boolean;
@ -12270,7 +12322,7 @@ interface HTMLScriptElement extends HTMLElement {
declare var HTMLScriptElement: {
prototype: HTMLScriptElement;
new(): HTMLScriptElement;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/supports) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/supports_static) */
supports(type: string): boolean;
};
@ -12281,7 +12333,7 @@ declare var HTMLScriptElement: {
*/
interface HTMLSelectElement extends HTMLElement {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/autocomplete) */
autocomplete: string;
autocomplete: AutoFill;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/disabled) */
disabled: boolean;
/**
@ -13083,7 +13135,7 @@ declare var HTMLTemplateElement: {
*/
interface HTMLTextAreaElement extends HTMLElement {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/autocomplete) */
autocomplete: string;
autocomplete: AutoFill;
/** Sets or retrieves the width of the object. */
cols: number;
/** Sets or retrieves the initial contents of the object. */
@ -13391,6 +13443,8 @@ interface Headers {
delete(name: string): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
get(name: string): string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
getSetCookie(): string[];
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
has(name: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
@ -13768,25 +13822,25 @@ declare var IDBKeyRange: {
/**
* Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static)
*/
bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
/**
* Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static)
*/
lowerBound(lower: any, open?: boolean): IDBKeyRange;
/**
* Returns a new IDBKeyRange spanning only key.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static)
*/
only(value: any): IDBKeyRange;
/**
* Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static)
*/
upperBound(upper: any, open?: boolean): IDBKeyRange;
};
@ -14229,6 +14283,8 @@ interface InnerHTML {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/InputDeviceInfo)
*/
interface InputDeviceInfo extends MediaDeviceInfo {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/InputDeviceInfo/getCapabilities) */
getCapabilities(): MediaTrackCapabilities;
}
declare var InputDeviceInfo: {
@ -15111,7 +15167,7 @@ interface MediaRecorder extends EventTarget {
declare var MediaRecorder: {
prototype: MediaRecorder;
new(stream: MediaStream, options?: MediaRecorderOptions): MediaRecorder;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/isTypeSupported) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/isTypeSupported_static) */
isTypeSupported(type: string): boolean;
};
@ -15177,7 +15233,7 @@ interface MediaSource extends EventTarget {
declare var MediaSource: {
prototype: MediaSource;
new(): MediaSource;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported_static) */
isTypeSupported(type: string): boolean;
};
@ -16342,6 +16398,8 @@ interface Notification extends EventTarget {
onerror: ((this: Notification, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */
onshow: ((this: Notification, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */
readonly silent: boolean | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */
readonly tag: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */
@ -16357,9 +16415,9 @@ interface Notification extends EventTarget {
declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */
readonly permission: NotificationPermission;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission_static) */
requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise<NotificationPermission>;
};
@ -17099,7 +17157,7 @@ interface PerformanceObserver {
declare var PerformanceObserver: {
prototype: PerformanceObserver;
new(callback: PerformanceObserverCallback): PerformanceObserver;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */
readonly supportedEntryTypes: ReadonlyArray<string>;
};
@ -17577,6 +17635,13 @@ declare var PopStateEvent: {
new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent;
};
interface PopoverInvokerElement {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetAction) */
popoverTargetAction: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetElement) */
popoverTargetElement: Element | null;
}
/**
* A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them.
*
@ -17645,7 +17710,7 @@ declare var PublicKeyCredential: {
prototype: PublicKeyCredential;
new(): PublicKeyCredential;
isConditionalMediationAvailable(): Promise<boolean>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static) */
isUserVerifyingPlatformAuthenticatorAvailable(): Promise<boolean>;
};
@ -17667,7 +17732,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */
readonly supportedContentEncodings: ReadonlyArray<string>;
};
@ -18112,7 +18177,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration?: RTCConfiguration): RTCPeerConnection;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/generateCertificate) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/generateCertificate_static) */
generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise<RTCCertificate>;
};
@ -18172,7 +18237,7 @@ interface RTCRtpReceiver {
declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(): RTCRtpReceiver;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getCapabilities) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getCapabilities_static) */
getCapabilities(kind: string): RTCRtpCapabilities | null;
};
@ -18203,7 +18268,7 @@ interface RTCRtpSender {
declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(): RTCRtpSender;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getCapabilities) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getCapabilities_static) */
getCapabilities(kind: string): RTCRtpCapabilities | null;
};
@ -18748,9 +18813,11 @@ interface Response extends Body {
declare var Response: {
prototype: Response;
new(body?: BodyInit | null, init?: ResponseInit): Response;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */
error(): Response;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
json(data: any, init?: ResponseInit): Response;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
redirect(url: string | URL, status?: number): Response;
};
@ -20915,8 +20982,6 @@ interface ScreenOrientation extends EventTarget {
onchange: ((this: ScreenOrientation, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/type) */
readonly type: OrientationType;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/lock) */
lock(orientation: OrientationLockType): Promise<void>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) */
unlock(): void;
addEventListener<K extends keyof ScreenOrientationEventMap>(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@ -21110,7 +21175,6 @@ interface ServiceWorkerContainer extends EventTarget {
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */
onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */
onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */
readonly ready: Promise<ServiceWorkerRegistration>;
@ -21847,7 +21911,7 @@ interface TextDecoder extends TextDecoderCommon {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
*/
decode(input?: BufferSource, options?: TextDecodeOptions): string;
decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string;
}
declare var TextDecoder: {
@ -22229,6 +22293,19 @@ declare var TimeRanges: {
new(): TimeRanges;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
interface ToggleEvent extends Event {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
readonly newState: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
readonly oldState: string;
}
declare var ToggleEvent: {
prototype: ToggleEvent;
new(type: string, eventInitDict?: ToggleEventInit): ToggleEvent;
};
/**
* A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
*
@ -22481,9 +22558,11 @@ interface URL {
declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
createObjectURL(obj: Blob | MediaSource): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
revokeObjectURL(url: string): void;
};
@ -22492,6 +22571,8 @@ declare var webkitURL: typeof URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
interface URLSearchParams {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
readonly size: number;
/**
* Appends a specified key/value pair as a new search parameter.
*
@ -22503,7 +22584,7 @@ interface URLSearchParams {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
*/
delete(name: string): void;
delete(name: string, value?: string): void;
/**
* Returns the first value associated to the given search parameter.
*
@ -22521,7 +22602,7 @@ interface URLSearchParams {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
*/
has(name: string): boolean;
has(name: string, value?: string): boolean;
/**
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
*
@ -22621,6 +22702,7 @@ declare var VTTRegion: {
interface ValidityState {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/badInput) */
readonly badInput: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/customError) */
readonly customError: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/patternMismatch) */
readonly patternMismatch: boolean;
@ -22636,7 +22718,9 @@ interface ValidityState {
readonly tooShort: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/typeMismatch) */
readonly typeMismatch: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valid) */
readonly valid: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valueMissing) */
readonly valueMissing: boolean;
}
@ -25351,6 +25435,96 @@ declare var WebSocket: {
readonly CLOSED: 3;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport)
*/
interface WebTransport {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */
readonly closed: Promise<WebTransportCloseInfo>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */
readonly datagrams: WebTransportDatagramDuplexStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */
readonly incomingBidirectionalStreams: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */
readonly incomingUnidirectionalStreams: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */
readonly ready: Promise<undefined>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */
close(closeInfo?: WebTransportCloseInfo): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */
createBidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WebTransportBidirectionalStream>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */
createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
}
declare var WebTransport: {
prototype: WebTransport;
new(url: string | URL, options?: WebTransportOptions): WebTransport;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream)
*/
interface WebTransportBidirectionalStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */
readonly readable: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */
readonly writable: WritableStream;
}
declare var WebTransportBidirectionalStream: {
prototype: WebTransportBidirectionalStream;
new(): WebTransportBidirectionalStream;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream)
*/
interface WebTransportDatagramDuplexStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */
incomingHighWaterMark: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */
incomingMaxAge: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */
readonly maxDatagramSize: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */
outgoingHighWaterMark: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */
outgoingMaxAge: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */
readonly readable: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */
readonly writable: WritableStream;
}
declare var WebTransportDatagramDuplexStream: {
prototype: WebTransportDatagramDuplexStream;
new(): WebTransportDatagramDuplexStream;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError)
*/
interface WebTransportError extends DOMException {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */
readonly source: WebTransportErrorSource;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */
readonly streamErrorCode: number | null;
}
declare var WebTransportError: {
prototype: WebTransportError;
new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
};
/**
* Events that occur due to the user moving a mouse wheel or similar input device.
*
@ -26294,96 +26468,120 @@ declare var console: Console;
/** Holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface. */
declare namespace CSS {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/Hz) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function Hz(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/Q) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function Q(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ch) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function ch(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/cm) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cm(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cqb(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cqh(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cqi(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cqmax(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cqmin(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function cqw(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/deg) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function deg(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dpcm) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dpcm(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dpi) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dpi(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dppx) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dppx(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dvb(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dvh(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dvi(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dvmax(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dvmin(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function dvw(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/em) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function em(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/escape) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/escape_static) */
function escape(ident: string): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ex) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function ex(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/fr) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function fr(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/grad) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function grad(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/kHz) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function kHz(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function lvb(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function lvh(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function lvi(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function lvmax(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function lvmin(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function lvw(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/mm) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function mm(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ms) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function ms(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/number) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function number(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/pc) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function pc(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/percent) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function percent(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/pt) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function pt(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/px) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function px(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/rad) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function rad(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty_static) */
function registerProperty(definition: PropertyDefinition): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/rem) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function rem(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/s) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function s(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports_static) */
function supports(property: string, value: string): boolean;
function supports(conditionText: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function svb(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function svh(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function svi(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function svmax(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function svmin(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function svw(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/turn) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function turn(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vb) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function vb(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vh) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function vh(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vi) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function vi(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vmax) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function vmax(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vmin) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function vmin(value: number): CSSUnitValue;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vw) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */
function vw(value: number): CSSUnitValue;
}
@ -26398,16 +26596,16 @@ declare namespace WebAssembly {
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */
interface Global {
interface Global<T extends ValueType = ValueType> {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */
value: any;
value: ValueTypeMap[T];
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */
valueOf(): any;
valueOf(): ValueTypeMap[T];
}
var Global: {
prototype: Global;
new(descriptor: GlobalDescriptor, v?: any): Global;
new<T extends ValueType = ValueType>(descriptor: GlobalDescriptor<T>, v?: ValueTypeMap[T]): Global<T>;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */
@ -26484,9 +26682,9 @@ declare namespace WebAssembly {
new(descriptor: TableDescriptor, value?: any): Table;
};
interface GlobalDescriptor {
interface GlobalDescriptor<T extends ValueType = ValueType> {
mutable?: boolean;
value: ValueType;
value: T;
}
interface MemoryDescriptor {
@ -26512,6 +26710,16 @@ declare namespace WebAssembly {
maximum?: number;
}
interface ValueTypeMap {
anyfunc: Function;
externref: any;
f32: number;
f64: number;
i32: number;
i64: bigint;
v128: never;
}
interface WebAssemblyInstantiatedSource {
instance: Instance;
module: Module;
@ -26519,12 +26727,12 @@ declare namespace WebAssembly {
type ImportExportKind = "function" | "global" | "memory" | "table";
type TableKind = "anyfunc" | "externref";
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
type ExportValue = Function | Global | Memory | Table;
type Exports = Record<string, ExportValue>;
type ImportValue = ExportValue | number;
type Imports = Record<string, ModuleImports>;
type ModuleImports = Record<string, ImportValue>;
type ValueType = keyof ValueTypeMap;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */
function compile(bytes: BufferSource): Promise<Module>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */
@ -27368,7 +27576,7 @@ declare var onended: ((this: Window, ev: Event) => any) | null;
* Fires when an error occurs during object loading.
* @param ev The event.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/error_event)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event)
*/
declare var onerror: OnErrorEventHandler;
/**
@ -27546,6 +27754,8 @@ declare var onresize: ((this: Window, ev: UIEvent) => any) | null;
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scroll_event)
*/
declare var onscroll: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollend_event) */
declare var onscrollend: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/securitypolicyviolation_event) */
declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null;
/**
@ -27742,6 +27952,10 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi
declare function removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
type AlgorithmIdentifier = Algorithm | string;
type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView;
type AutoFill = AutoFillBase | `${OptionalPrefixToken<AutoFillSection>}${OptionalPrefixToken<AutoFillAddressKind>}${AutoFillField}${OptionalPostfixToken<AutoFillCredentialField>}`;
type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken<AutoFillContactKind>}${AutoFillContactField}`;
type AutoFillSection = `section-${string}`;
type BigInteger = Uint8Array;
type BinaryData = ArrayBuffer | ArrayBufferView;
type BlobPart = BufferSource | Blob | string;
@ -27792,6 +28006,8 @@ type NamedCurve = string;
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
type OptionalPostfixToken<T extends string> = ` ${T}` | "";
type OptionalPrefixToken<T extends string> = `${T} ` | "";
type PerformanceEntryList = PerformanceEntry[];
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
@ -27816,6 +28032,12 @@ type AudioContextLatencyCategory = "balanced" | "interactive" | "playback";
type AudioContextState = "closed" | "running" | "suspended";
type AuthenticatorAttachment = "cross-platform" | "platform";
type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb";
type AutoFillAddressKind = "billing" | "shipping";
type AutoFillBase = "" | "off" | "on";
type AutoFillContactField = "email" | "tel" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-local-prefix" | "tel-local-suffix" | "tel-national";
type AutoFillContactKind = "home" | "mobile" | "work";
type AutoFillCredentialField = "webauthn";
type AutoFillNormalField = "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday-day" | "bday-month" | "bday-year" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "new-password" | "one-time-code" | "organization" | "postal-code" | "street-address" | "transaction-amount" | "transaction-currency" | "username";
type AutoKeyword = "auto";
type AutomationRate = "a-rate" | "k-rate";
type AvcBitstreamFormat = "annexb" | "avc";
@ -27898,7 +28120,6 @@ type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"
type NotificationDirection = "auto" | "ltr" | "rtl";
type NotificationPermission = "default" | "denied" | "granted";
type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu";
type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary";
type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary";
type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle";
type OverSampleType = "2x" | "4x" | "none";
@ -27936,7 +28157,7 @@ type RTCSctpTransportState = "closed" | "connected" | "connecting";
type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting";
type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "track" | "transport";
type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport";
type ReadableStreamReaderMode = "byob";
type ReadableStreamType = "bytes";
type ReadyState = "closed" | "ended" | "open";
@ -27976,6 +28197,8 @@ type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | "
type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
type WakeLockType = "screen";
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
type WebTransportErrorSource = "session" | "stream";
type WorkerType = "classic" | "module";
type WriteCommandType = "seek" | "truncate" | "write";
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";

View file

@ -60,7 +60,7 @@ interface ReadonlyMap<K, V> {
readonly size: number;
}
interface WeakMap<K extends object, V> {
interface WeakMap<K extends WeakKey, V> {
/**
* Removes the specified element from the WeakMap.
* @returns true if the element was successfully removed, or false if it was not present.
@ -76,14 +76,14 @@ interface WeakMap<K extends object, V> {
has(key: K): boolean;
/**
* Adds a new element with a specified key and value.
* @param key Must be an object.
* @param key Must be an object or symbol.
*/
set(key: K, value: V): this;
}
interface WeakMapConstructor {
new <K extends object = object, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>;
readonly prototype: WeakMap<object, any>;
new <K extends WeakKey = WeakKey, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>;
readonly prototype: WeakMap<WeakKey, any>;
}
declare var WeakMap: WeakMapConstructor;
@ -125,9 +125,9 @@ interface ReadonlySet<T> {
readonly size: number;
}
interface WeakSet<T extends object> {
interface WeakSet<T extends WeakKey> {
/**
* Appends a new object to the end of the WeakSet.
* Appends a new value to the end of the WeakSet.
*/
add(value: T): this;
/**
@ -136,13 +136,13 @@ interface WeakSet<T extends object> {
*/
delete(value: T): boolean;
/**
* @returns a boolean indicating whether an object exists in the WeakSet or not.
* @returns a boolean indicating whether a value exists in the WeakSet or not.
*/
has(value: T): boolean;
}
interface WeakSetConstructor {
new <T extends object = object>(values?: readonly T[] | null): WeakSet<T>;
readonly prototype: WeakSet<object>;
new <T extends WeakKey = WeakKey>(values?: readonly T[] | null): WeakSet<T>;
readonly prototype: WeakSet<WeakKey>;
}
declare var WeakSet: WeakSetConstructor;

View file

@ -56,10 +56,10 @@ interface Array<T> {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
}
interface ArrayConstructor {

View file

@ -159,10 +159,10 @@ interface MapConstructor {
new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
}
interface WeakMap<K extends object, V> { }
interface WeakMap<K extends WeakKey, V> { }
interface WeakMapConstructor {
new <K extends object, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
}
interface Set<T> {
@ -207,10 +207,10 @@ interface SetConstructor {
new <T>(iterable?: Iterable<T> | null): Set<T>;
}
interface WeakSet<T extends object> { }
interface WeakSet<T extends WeakKey> { }
interface WeakSetConstructor {
new <T extends object = object>(iterable: Iterable<T>): WeakSet<T>;
new <T extends WeakKey = WeakKey>(iterable: Iterable<T>): WeakSet<T>;
}
interface Promise<T> { }

View file

@ -137,7 +137,7 @@ interface Map<K, V> {
readonly [Symbol.toStringTag]: string;
}
interface WeakMap<K extends object, V> {
interface WeakMap<K extends WeakKey, V> {
readonly [Symbol.toStringTag]: string;
}
@ -145,7 +145,7 @@ interface Set<T> {
readonly [Symbol.toStringTag]: string;
}
interface WeakSet<T extends object> {
interface WeakSet<T extends WeakKey> {
readonly [Symbol.toStringTag]: string;
}

View file

@ -22,3 +22,4 @@ and limitations under the License.
/// <reference lib="es2017.string" />
/// <reference lib="es2017.intl" />
/// <reference lib="es2017.typedarrays" />
/// <reference lib="es2017.date" />

31
node_modules/typescript/lib/lib.es2017.date.d.ts generated vendored Normal file
View file

@ -0,0 +1,31 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface DateConstructor {
/**
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
* @param monthIndex The month as a number between 0 and 11 (January to December).
* @param date The date as a number between 1 and 31.
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
* @param ms A number from 0 to 999 that specifies the milliseconds.
*/
UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
}

View file

@ -165,10 +165,10 @@ interface BigInt64Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/** Yields index, value pairs for every entry in the array. */
entries(): IterableIterator<[number, bigint]>;
@ -437,10 +437,10 @@ interface BigUint64Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/** Yields index, value pairs for every entry in the array. */
entries(): IterableIterator<[number, bigint]>;

View file

@ -16,12 +16,13 @@ and limitations under the License.
/// <reference no-default-lib="true"/>
interface WeakRef<T extends object> {
interface WeakRef<T extends WeakKey> {
readonly [Symbol.toStringTag]: "WeakRef";
/**
* Returns the WeakRef instance's target object, or undefined if the target object has been
* Returns the WeakRef instance's target value, or undefined if the target value has been
* reclaimed.
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
*/
deref(): T | undefined;
}
@ -30,10 +31,11 @@ interface WeakRefConstructor {
readonly prototype: WeakRef<any>;
/**
* Creates a WeakRef instance for the given target object.
* @param target The target object for the WeakRef instance.
* Creates a WeakRef instance for the given target value.
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
* @param target The target value for the WeakRef instance.
*/
new<T extends object>(target: T): WeakRef<T>;
new<T extends WeakKey>(target: T): WeakRef<T>;
}
declare var WeakRef: WeakRefConstructor;
@ -42,22 +44,23 @@ interface FinalizationRegistry<T> {
readonly [Symbol.toStringTag]: "FinalizationRegistry";
/**
* Registers an object with the registry.
* @param target The target object to register.
* @param heldValue The value to pass to the finalizer for this object. This cannot be the
* target object.
* Registers a value with the registry.
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
* @param target The target value to register.
* @param heldValue The value to pass to the finalizer for this value. This cannot be the
* target value.
* @param unregisterToken The token to pass to the unregister method to unregister the target
* object. If provided (and not undefined), this must be an object. If not provided, the target
* cannot be unregistered.
* value. If not provided, the target cannot be unregistered.
*/
register(target: object, heldValue: T, unregisterToken?: object): void;
register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void;
/**
* Unregisters an object from the registry.
* Unregisters a value from the registry.
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
* @param unregisterToken The token that was used as the unregisterToken argument when calling
* register to register the target object.
* register to register the target value.
*/
unregister(unregisterToken: object): void;
unregister(unregisterToken: WeakKey): void;
}
interface FinalizationRegistryConstructor {
@ -65,7 +68,7 @@ interface FinalizationRegistryConstructor {
/**
* Creates a finalization registry with an associated cleanup callback
* @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
* @param cleanupCallback The callback to call after a value in the registry has been reclaimed.
*/
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
}

View file

@ -39,6 +39,50 @@ interface Array<T> {
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number;
/**
* Returns a copy of an array with its elements reversed.
*/
toReversed(): T[];
/**
* Returns a copy of an array with its elements sorted.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: T, b: T) => number): T[];
/**
* Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.
* @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove.
* @param items Elements to insert into the copied array in place of the deleted elements.
* @returns The copied array.
*/
toSpliced(start: number, deleteCount: number, ...items: T[]): T[];
/**
* Copies an array and removes elements while returning the remaining elements.
* @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove.
* @returns A copy of the original array with the remaining elements.
*/
toSpliced(start: number, deleteCount?: number): T[];
/**
* Copies an array, then overwrites the value at the provided index with the
* given value. If the index is negative, then it replaces from the end
* of the array.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to write into the copied array.
* @returns The copied array with the updated value.
*/
with(index: number, value: T): T[];
}
interface ReadonlyArray<T> {
@ -51,8 +95,14 @@ interface ReadonlyArray<T> {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined;
findLast<S extends T>(
predicate: (value: T, index: number, array: readonly T[]) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (value: T, index: number, array: readonly T[]) => unknown,
thisArg?: any
): T | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -63,7 +113,54 @@ interface ReadonlyArray<T> {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (value: T, index: number, array: readonly T[]) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copied array with all of its elements reversed.
*/
toReversed(): T[];
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: T, b: T) => number): T[];
/**
* Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements.
* @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove.
* @param items Elements to insert into the copied array in place of the deleted elements.
* @returns A copy of the original array with the remaining elements.
*/
toSpliced(start: number, deleteCount: number, ...items: T[]): T[];
/**
* Copies an array and removes elements while returning the remaining elements.
* @param start The zero-based location in the array from which to start removing elements.
* @param deleteCount The number of elements to remove.
* @returns A copy of the original array with the remaining elements.
*/
toSpliced(start: number, deleteCount?: number): T[];
/**
* Copies an array, then overwrites the value at the provided index with the
* given value. If the index is negative, then it replaces from the end
* of the array
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: T): T[];
}
interface Int8Array {
@ -76,8 +173,18 @@ interface Int8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Int8Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (value: number, index: number, array: Int8Array) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -88,7 +195,36 @@ interface Int8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (value: number, index: number, array: Int8Array) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint8Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Uint8Array.from([11, 2, 22, 1]);
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Uint8Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Uint8Array;
}
interface Uint8Array {
@ -101,8 +237,18 @@ interface Uint8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Uint8Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (value: number, index: number, array: Uint8Array) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -113,7 +259,36 @@ interface Uint8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (value: number, index: number, array: Uint8Array) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint8Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Uint8Array.from([11, 2, 22, 1]);
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Uint8Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Uint8Array;
}
interface Uint8ClampedArray {
@ -126,8 +301,22 @@ interface Uint8ClampedArray {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Uint8ClampedArray
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: Uint8ClampedArray
) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -138,7 +327,40 @@ interface Uint8ClampedArray {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: number,
index: number,
array: Uint8ClampedArray
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint8ClampedArray;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Uint8ClampedArray.from([11, 2, 22, 1]);
* myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Uint8ClampedArray;
}
interface Int16Array {
@ -151,8 +373,18 @@ interface Int16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Int16Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (value: number, index: number, array: Int16Array) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -163,7 +395,36 @@ interface Int16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (value: number, index: number, array: Int16Array) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Int16Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Int16Array.from([11, 2, -22, 1]);
* myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Int16Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Int16Array;
}
interface Uint16Array {
@ -176,8 +437,22 @@ interface Uint16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Uint16Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: Uint16Array
) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -188,7 +463,40 @@ interface Uint16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: number,
index: number,
array: Uint16Array
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint16Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Uint16Array.from([11, 2, 22, 1]);
* myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Uint16Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Uint16Array;
}
interface Int32Array {
@ -201,8 +509,18 @@ interface Int32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Int32Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (value: number, index: number, array: Int32Array) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -213,7 +531,36 @@ interface Int32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (value: number, index: number, array: Int32Array) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Int32Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Int32Array.from([11, 2, -22, 1]);
* myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Int32Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Int32Array;
}
interface Uint32Array {
@ -226,8 +573,22 @@ interface Uint32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Uint32Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: Uint32Array
) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -238,7 +599,40 @@ interface Uint32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: number,
index: number,
array: Uint32Array
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Uint32Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Uint32Array.from([11, 2, 22, 1]);
* myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Uint32Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Uint32Array;
}
interface Float32Array {
@ -251,8 +645,22 @@ interface Float32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Float32Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: Float32Array
) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -263,7 +671,40 @@ interface Float32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: number,
index: number,
array: Float32Array
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Float32Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Float32Array.from([11.25, 2, -22.5, 1]);
* myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Float32Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Float32Array;
}
interface Float64Array {
@ -276,8 +717,22 @@ interface Float64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends number>(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number | undefined;
findLast<S extends number>(
predicate: (
value: number,
index: number,
array: Float64Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: number,
index: number,
array: Float64Array
) => unknown,
thisArg?: any
): number | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -288,7 +743,40 @@ interface Float64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: number,
index: number,
array: Float64Array
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): Float64Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = Float64Array.from([11.25, 2, -22.5, 1]);
* myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5]
* ```
*/
toSorted(compareFn?: (a: number, b: number) => number): Float64Array;
/**
* Copies the array and inserts the given number at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: number): Float64Array;
}
interface BigInt64Array {
@ -301,8 +789,22 @@ interface BigInt64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined;
findLast<S extends bigint>(
predicate: (
value: bigint,
index: number,
array: BigInt64Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: bigint,
index: number,
array: BigInt64Array
) => unknown,
thisArg?: any
): bigint | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -313,7 +815,40 @@ interface BigInt64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: bigint,
index: number,
array: BigInt64Array
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): BigInt64Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]);
* myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n]
* ```
*/
toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array;
/**
* Copies the array and inserts the given bigint at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: bigint): BigInt64Array;
}
interface BigUint64Array {
@ -326,8 +861,22 @@ interface BigUint64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S | undefined;
findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined;
findLast<S extends bigint>(
predicate: (
value: bigint,
index: number,
array: BigUint64Array
) => value is S,
thisArg?: any
): S | undefined;
findLast(
predicate: (
value: bigint,
index: number,
array: BigUint64Array
) => unknown,
thisArg?: any
): bigint | undefined;
/**
* Returns the index of the last element in the array where predicate is true, and -1
@ -338,5 +887,38 @@ interface BigUint64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findLastIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number;
findLastIndex(
predicate: (
value: bigint,
index: number,
array: BigUint64Array
) => unknown,
thisArg?: any
): number;
/**
* Copies the array and returns the copy with the elements in reverse order.
*/
toReversed(): BigUint64Array;
/**
* Copies and sorts the array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]);
* myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n]
* ```
*/
toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array;
/**
* Copies the array and inserts the given bigint at the provided index.
* @param index The index of the value to overwrite. If the index is
* negative, then it replaces from the end of the array.
* @param value The value to insert into the copied array.
* @returns A copy of the original array with the inserted value.
*/
with(index: number, value: bigint): BigUint64Array;
}

21
node_modules/typescript/lib/lib.es2023.collection.d.ts generated vendored Normal file
View file

@ -0,0 +1,21 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface WeakKeyTypes {
symbol: symbol;
}

View file

@ -18,3 +18,4 @@ and limitations under the License.
/// <reference lib="es2022" />
/// <reference lib="es2023.array" />
/// <reference lib="es2023.collection" />

View file

@ -1665,6 +1665,15 @@ type Uncapitalize<S extends string> = intrinsic;
*/
interface ThisType<T> { }
/**
* Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry
*/
interface WeakKeyTypes {
object: object;
}
type WeakKey = WeakKeyTypes[keyof WeakKeyTypes];
/**
* Represents a raw buffer of binary data, which is used to store data for the
* different typed arrays. ArrayBuffers cannot be read from or written to directly,
@ -1880,10 +1889,10 @@ interface Int8Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -2162,10 +2171,10 @@ interface Uint8Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -2444,10 +2453,10 @@ interface Uint8ClampedArray {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -2725,10 +2734,10 @@ interface Int16Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -3007,10 +3016,10 @@ interface Uint16Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -3289,10 +3298,10 @@ interface Int32Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -3571,10 +3580,10 @@ interface Uint32Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -3852,10 +3861,10 @@ interface Float32Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
@ -4135,10 +4144,10 @@ interface Float64Array {
* @param target If target is negative, it is treated as length+target where length is the
* length of the array.
* @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end. If start is omitted, `0` is used.
* is treated as length+end.
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start?: number, end?: number): this;
copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.

View file

@ -18,3 +18,5 @@ and limitations under the License.
/// <reference lib="es2023" />
/// <reference lib="esnext.intl" />
/// <reference lib="esnext.decorators" />
/// <reference lib="esnext.disposable" />

28
node_modules/typescript/lib/lib.esnext.decorators.d.ts generated vendored Normal file
View file

@ -0,0 +1,28 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2015.symbol" />
/// <reference lib="decorators" />
interface SymbolConstructor {
readonly metadata: unique symbol;
}
interface Function {
[Symbol.metadata]: DecoratorMetadata | null;
}

185
node_modules/typescript/lib/lib.esnext.disposable.d.ts generated vendored Normal file
View file

@ -0,0 +1,185 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2015.symbol" />
interface SymbolConstructor {
/**
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
*/
readonly dispose: unique symbol;
/**
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
*/
readonly asyncDispose: unique symbol;
}
interface Disposable {
[Symbol.dispose](): void;
}
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
interface SuppressedError extends Error {
error: any;
suppressed: any;
}
interface SuppressedErrorConstructor extends ErrorConstructor {
new (error: any, suppressed: any, message?: string): SuppressedError;
(error: any, suppressed: any, message?: string): SuppressedError;
readonly prototype: SuppressedError;
}
declare var SuppressedError: SuppressedErrorConstructor;
interface DisposableStack {
/**
* Returns a value indicating whether this stack has been disposed.
*/
readonly disposed: boolean;
/**
* Disposes each resource in the stack in the reverse order that they were added.
*/
dispose(): void;
/**
* Adds a disposable resource to the stack, returning the resource.
* @param value The resource to add. `null` and `undefined` will not be added, but will be returned.
* @returns The provided {@link value}.
*/
use<T extends Disposable | null | undefined>(value: T): T;
/**
* Adds a value and associated disposal callback as a resource to the stack.
* @param value The value to add.
* @param onDispose The callback to use in place of a `[Symbol.dispose]()` method. Will be invoked with `value`
* as the first parameter.
* @returns The provided {@link value}.
*/
adopt<T>(value: T, onDispose: (value: T) => void): T;
/**
* Adds a callback to be invoked when the stack is disposed.
*/
defer(onDispose: () => void): void;
/**
* Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed.
* @example
* ```ts
* class C {
* #res1: Disposable;
* #res2: Disposable;
* #disposables: DisposableStack;
* constructor() {
* // stack will be disposed when exiting constructor for any reason
* using stack = new DisposableStack();
*
* // get first resource
* this.#res1 = stack.use(getResource1());
*
* // get second resource. If this fails, both `stack` and `#res1` will be disposed.
* this.#res2 = stack.use(getResource2());
*
* // all operations succeeded, move resources out of `stack` so that they aren't disposed
* // when constructor exits
* this.#disposables = stack.move();
* }
*
* [Symbol.dispose]() {
* this.#disposables.dispose();
* }
* }
* ```
*/
move(): DisposableStack;
[Symbol.dispose](): void;
readonly [Symbol.toStringTag]: string;
}
interface DisposableStackConstructor {
new(): DisposableStack;
readonly prototype: DisposableStack;
}
declare var DisposableStack: DisposableStackConstructor;
interface AsyncDisposableStack {
/**
* Returns a value indicating whether this stack has been disposed.
*/
readonly disposed: boolean;
/**
* Disposes each resource in the stack in the reverse order that they were added.
*/
disposeAsync(): Promise<void>;
/**
* Adds a disposable resource to the stack, returning the resource.
* @param value The resource to add. `null` and `undefined` will not be added, but will be returned.
* @returns The provided {@link value}.
*/
use<T extends AsyncDisposable | Disposable | null | undefined>(value: T): T;
/**
* Adds a value and associated disposal callback as a resource to the stack.
* @param value The value to add.
* @param onDisposeAsync The callback to use in place of a `[Symbol.asyncDispose]()` method. Will be invoked with `value`
* as the first parameter.
* @returns The provided {@link value}.
*/
adopt<T>(value: T, onDisposeAsync: (value: T) => PromiseLike<void> | void): T;
/**
* Adds a callback to be invoked when the stack is disposed.
*/
defer(onDisposeAsync: () => PromiseLike<void> | void): void;
/**
* Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed.
* @example
* ```ts
* class C {
* #res1: Disposable;
* #res2: Disposable;
* #disposables: DisposableStack;
* constructor() {
* // stack will be disposed when exiting constructor for any reason
* using stack = new DisposableStack();
*
* // get first resource
* this.#res1 = stack.use(getResource1());
*
* // get second resource. If this fails, both `stack` and `#res1` will be disposed.
* this.#res2 = stack.use(getResource2());
*
* // all operations succeeded, move resources out of `stack` so that they aren't disposed
* // when constructor exits
* this.#disposables = stack.move();
* }
*
* [Symbol.dispose]() {
* this.#disposables.dispose();
* }
* }
* ```
*/
move(): AsyncDisposableStack;
[Symbol.asyncDispose](): Promise<void>;
readonly [Symbol.toStringTag]: string;
}
interface AsyncDisposableStackConstructor {
new(): AsyncDisposableStack;
readonly prototype: AsyncDisposableStack;
}
declare var AsyncDisposableStack: AsyncDisposableStackConstructor;

View file

@ -454,7 +454,7 @@ interface NotificationOptions {
lang?: string;
renotify?: boolean;
requireInteraction?: boolean;
silent?: boolean;
silent?: boolean | null;
tag?: string;
timestamp?: EpochTimeStamp;
vibrate?: VibratePattern;
@ -539,7 +539,6 @@ interface RTCEncodedAudioFrameMetadata {
}
interface RTCEncodedVideoFrameMetadata {
contributingSources?: number[];
dependencies?: number[];
frameId?: number;
height?: number;
@ -709,8 +708,8 @@ interface TextDecoderOptions {
}
interface TextEncoderEncodeIntoResult {
read?: number;
written?: number;
read: number;
written: number;
}
interface Transformer<I = any, O = any> {
@ -866,6 +865,32 @@ interface WebGLContextEventInit extends EventInit {
statusMessage?: string;
}
interface WebTransportCloseInfo {
closeCode?: number;
reason?: string;
}
interface WebTransportErrorOptions {
source?: WebTransportErrorSource;
streamErrorCode?: number | null;
}
interface WebTransportHash {
algorithm?: string;
value?: BufferSource;
}
interface WebTransportOptions {
allowPooling?: boolean;
congestionControl?: WebTransportCongestionControl;
requireUnreliable?: boolean;
serverCertificateHashes?: WebTransportHash[];
}
interface WebTransportSendStreamOptions {
sendOrder?: number | null;
}
interface WorkerOptions {
credentials?: RequestCredentials;
name?: string;
@ -950,9 +975,9 @@ interface AbortSignal extends EventTarget {
declare var AbortSignal: {
prototype: AbortSignal;
new(): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
abort(reason?: any): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
timeout(milliseconds: number): AbortSignal;
};
@ -1633,6 +1658,8 @@ interface CanvasShadowStyles {
}
interface CanvasState {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */
reset(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */
restore(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */
@ -2083,7 +2110,7 @@ interface DOMPoint extends DOMPointReadOnly {
declare var DOMPoint: {
prototype: DOMPoint;
new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */
fromPoint(other?: DOMPointInit): DOMPoint;
};
@ -2106,7 +2133,7 @@ interface DOMPointReadOnly {
declare var DOMPointReadOnly: {
prototype: DOMPointReadOnly;
new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */
fromPoint(other?: DOMPointInit): DOMPointReadOnly;
};
@ -2170,7 +2197,7 @@ interface DOMRectReadOnly {
declare var DOMRectReadOnly: {
prototype: DOMRectReadOnly;
new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */
fromRect(other?: DOMRectInit): DOMRectReadOnly;
};
@ -2878,11 +2905,11 @@ interface FileSystemSyncAccessHandle {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */
getSize(): number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */
read(buffer: BufferSource, options?: FileSystemReadWriteOptions): number;
read(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */
truncate(newSize: number): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */
write(buffer: BufferSource, options?: FileSystemReadWriteOptions): number;
write(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number;
}
declare var FileSystemSyncAccessHandle: {
@ -3045,6 +3072,8 @@ interface Headers {
delete(name: string): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
get(name: string): string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
getSetCookie(): string[];
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
has(name: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
@ -3393,25 +3422,25 @@ declare var IDBKeyRange: {
/**
* Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static)
*/
bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
/**
* Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static)
*/
lowerBound(lower: any, open?: boolean): IDBKeyRange;
/**
* Returns a new IDBKeyRange spanning only key.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static)
*/
only(value: any): IDBKeyRange;
/**
* Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound)
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static)
*/
upperBound(upper: any, open?: boolean): IDBKeyRange;
};
@ -4111,6 +4140,8 @@ interface Notification extends EventTarget {
onerror: ((this: Notification, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */
onshow: ((this: Notification, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */
readonly silent: boolean | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */
readonly tag: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */
@ -4126,7 +4157,7 @@ interface Notification extends EventTarget {
declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */
readonly permission: NotificationPermission;
};
@ -4450,7 +4481,7 @@ interface PerformanceObserver {
declare var PerformanceObserver: {
prototype: PerformanceObserver;
new(callback: PerformanceObserverCallback): PerformanceObserver;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */
readonly supportedEntryTypes: ReadonlyArray<string>;
};
@ -4638,7 +4669,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */
readonly supportedContentEncodings: ReadonlyArray<string>;
};
@ -5004,9 +5035,11 @@ interface Response extends Body {
declare var Response: {
prototype: Response;
new(body?: BodyInit | null, init?: ResponseInit): Response;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */
error(): Response;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
json(data: any, init?: ResponseInit): Response;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
redirect(url: string | URL, status?: number): Response;
};
@ -5097,7 +5130,6 @@ interface ServiceWorkerContainer extends EventTarget {
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */
onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */
onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */
readonly ready: Promise<ServiceWorkerRegistration>;
@ -5351,7 +5383,7 @@ interface TextDecoder extends TextDecoderCommon {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
*/
decode(input?: BufferSource, options?: TextDecodeOptions): string;
decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string;
}
declare var TextDecoder: {
@ -5559,14 +5591,18 @@ interface URL {
declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
createObjectURL(obj: Blob): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL) */
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
revokeObjectURL(url: string): void;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
interface URLSearchParams {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
readonly size: number;
/**
* Appends a specified key/value pair as a new search parameter.
*
@ -5578,7 +5614,7 @@ interface URLSearchParams {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
*/
delete(name: string): void;
delete(name: string, value?: string): void;
/**
* Returns the first value associated to the given search parameter.
*
@ -5596,7 +5632,7 @@ interface URLSearchParams {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
*/
has(name: string): boolean;
has(name: string, value?: string): boolean;
/**
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
*
@ -8197,6 +8233,96 @@ declare var WebSocket: {
readonly CLOSED: 3;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport)
*/
interface WebTransport {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */
readonly closed: Promise<WebTransportCloseInfo>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */
readonly datagrams: WebTransportDatagramDuplexStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */
readonly incomingBidirectionalStreams: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */
readonly incomingUnidirectionalStreams: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */
readonly ready: Promise<undefined>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */
close(closeInfo?: WebTransportCloseInfo): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */
createBidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WebTransportBidirectionalStream>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */
createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
}
declare var WebTransport: {
prototype: WebTransport;
new(url: string | URL, options?: WebTransportOptions): WebTransport;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream)
*/
interface WebTransportBidirectionalStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */
readonly readable: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */
readonly writable: WritableStream;
}
declare var WebTransportBidirectionalStream: {
prototype: WebTransportBidirectionalStream;
new(): WebTransportBidirectionalStream;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream)
*/
interface WebTransportDatagramDuplexStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */
incomingHighWaterMark: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */
incomingMaxAge: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */
readonly maxDatagramSize: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */
outgoingHighWaterMark: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */
outgoingMaxAge: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */
readonly readable: ReadableStream;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */
readonly writable: WritableStream;
}
declare var WebTransportDatagramDuplexStream: {
prototype: WebTransportDatagramDuplexStream;
new(): WebTransportDatagramDuplexStream;
};
/**
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError)
*/
interface WebTransportError extends DOMException {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */
readonly source: WebTransportErrorSource;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */
readonly streamErrorCode: number | null;
}
declare var WebTransportError: {
prototype: WebTransportError;
new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
};
/**
* This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.
*
@ -8718,16 +8844,16 @@ declare namespace WebAssembly {
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */
interface Global {
interface Global<T extends ValueType = ValueType> {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */
value: any;
value: ValueTypeMap[T];
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */
valueOf(): any;
valueOf(): ValueTypeMap[T];
}
var Global: {
prototype: Global;
new(descriptor: GlobalDescriptor, v?: any): Global;
new<T extends ValueType = ValueType>(descriptor: GlobalDescriptor<T>, v?: ValueTypeMap[T]): Global<T>;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */
@ -8804,9 +8930,9 @@ declare namespace WebAssembly {
new(descriptor: TableDescriptor, value?: any): Table;
};
interface GlobalDescriptor {
interface GlobalDescriptor<T extends ValueType = ValueType> {
mutable?: boolean;
value: ValueType;
value: T;
}
interface MemoryDescriptor {
@ -8832,6 +8958,16 @@ declare namespace WebAssembly {
maximum?: number;
}
interface ValueTypeMap {
anyfunc: Function;
externref: any;
f32: number;
f64: number;
i32: number;
i64: bigint;
v128: never;
}
interface WebAssemblyInstantiatedSource {
instance: Instance;
module: Module;
@ -8839,12 +8975,12 @@ declare namespace WebAssembly {
type ImportExportKind = "function" | "global" | "memory" | "table";
type TableKind = "anyfunc" | "externref";
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
type ExportValue = Function | Global | Memory | Table;
type Exports = Record<string, ExportValue>;
type ImportValue = ExportValue | number;
type Imports = Record<string, ModuleImports>;
type ModuleImports = Record<string, ImportValue>;
type ValueType = keyof ValueTypeMap;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */
function compile(bytes: BufferSource): Promise<Module>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */
@ -9057,6 +9193,7 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi
declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
type AlgorithmIdentifier = Algorithm | string;
type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView;
type BigInteger = Uint8Array;
type BinaryData = ArrayBuffer | ArrayBufferView;
type BlobPart = BufferSource | Blob | string;
@ -9180,6 +9317,8 @@ type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | "NV12" | "RGBA" | "RGBX";
type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
type WebTransportErrorSource = "session" | "stream";
type WorkerType = "classic" | "module";
type WriteCommandType = "seek" | "truncate" | "write";
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";

14874
node_modules/typescript/lib/tsc.js generated vendored

File diff suppressed because it is too large Load diff

21083
node_modules/typescript/lib/tsserver.js generated vendored

File diff suppressed because it is too large Load diff

View file

@ -1830,6 +1830,11 @@ declare namespace ts {
* coupled with `replacementSpan` to replace a dotted access with a bracket access.
*/
insertText?: string;
/**
* A string that should be used when filtering a set of
* completion items.
*/
filterText?: string;
/**
* `insertText` should be interpreted as a snippet if true.
*/
@ -2119,11 +2124,17 @@ declare namespace ts {
arguments: InlayHintsRequestArgs;
}
interface InlayHintItem {
/** This property will be the empty string when displayParts is set. */
text: string;
position: Location;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
displayParts?: InlayHintItemDisplayPart[];
}
interface InlayHintItemDisplayPart {
text: string;
span?: FileSpan;
}
interface InlayHintsResponse extends Response {
body?: InlayHintItem[];
@ -2827,6 +2838,7 @@ declare namespace ts {
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
readonly interactiveInlayHints?: boolean;
readonly autoImportFileExcludePatterns?: string[];
/**
* Indicates whether imports should be organized in a case-insensitive manner.
@ -3395,7 +3407,7 @@ declare namespace ts {
markAsDirty(): void;
getScriptFileNames(): string[];
getLanguageService(): never;
getModuleResolutionHostForAutoImportProvider(): never;
getHostForAutoImportProvider(): never;
getProjectReferences(): readonly ts.ProjectReference[] | undefined;
getTypeAcquisition(): TypeAcquisition;
}
@ -4062,7 +4074,7 @@ declare namespace ts {
responseRequired?: boolean;
}
}
const versionMajorMinor = "5.1";
const versionMajorMinor = "5.2";
/** The version of the TypeScript compiler release */
const version: string;
/**
@ -4252,211 +4264,212 @@ declare namespace ts {
UndefinedKeyword = 157,
UniqueKeyword = 158,
UnknownKeyword = 159,
FromKeyword = 160,
GlobalKeyword = 161,
BigIntKeyword = 162,
OverrideKeyword = 163,
OfKeyword = 164,
QualifiedName = 165,
ComputedPropertyName = 166,
TypeParameter = 167,
Parameter = 168,
Decorator = 169,
PropertySignature = 170,
PropertyDeclaration = 171,
MethodSignature = 172,
MethodDeclaration = 173,
ClassStaticBlockDeclaration = 174,
Constructor = 175,
GetAccessor = 176,
SetAccessor = 177,
CallSignature = 178,
ConstructSignature = 179,
IndexSignature = 180,
TypePredicate = 181,
TypeReference = 182,
FunctionType = 183,
ConstructorType = 184,
TypeQuery = 185,
TypeLiteral = 186,
ArrayType = 187,
TupleType = 188,
OptionalType = 189,
RestType = 190,
UnionType = 191,
IntersectionType = 192,
ConditionalType = 193,
InferType = 194,
ParenthesizedType = 195,
ThisType = 196,
TypeOperator = 197,
IndexedAccessType = 198,
MappedType = 199,
LiteralType = 200,
NamedTupleMember = 201,
TemplateLiteralType = 202,
TemplateLiteralTypeSpan = 203,
ImportType = 204,
ObjectBindingPattern = 205,
ArrayBindingPattern = 206,
BindingElement = 207,
ArrayLiteralExpression = 208,
ObjectLiteralExpression = 209,
PropertyAccessExpression = 210,
ElementAccessExpression = 211,
CallExpression = 212,
NewExpression = 213,
TaggedTemplateExpression = 214,
TypeAssertionExpression = 215,
ParenthesizedExpression = 216,
FunctionExpression = 217,
ArrowFunction = 218,
DeleteExpression = 219,
TypeOfExpression = 220,
VoidExpression = 221,
AwaitExpression = 222,
PrefixUnaryExpression = 223,
PostfixUnaryExpression = 224,
BinaryExpression = 225,
ConditionalExpression = 226,
TemplateExpression = 227,
YieldExpression = 228,
SpreadElement = 229,
ClassExpression = 230,
OmittedExpression = 231,
ExpressionWithTypeArguments = 232,
AsExpression = 233,
NonNullExpression = 234,
MetaProperty = 235,
SyntheticExpression = 236,
SatisfiesExpression = 237,
TemplateSpan = 238,
SemicolonClassElement = 239,
Block = 240,
EmptyStatement = 241,
VariableStatement = 242,
ExpressionStatement = 243,
IfStatement = 244,
DoStatement = 245,
WhileStatement = 246,
ForStatement = 247,
ForInStatement = 248,
ForOfStatement = 249,
ContinueStatement = 250,
BreakStatement = 251,
ReturnStatement = 252,
WithStatement = 253,
SwitchStatement = 254,
LabeledStatement = 255,
ThrowStatement = 256,
TryStatement = 257,
DebuggerStatement = 258,
VariableDeclaration = 259,
VariableDeclarationList = 260,
FunctionDeclaration = 261,
ClassDeclaration = 262,
InterfaceDeclaration = 263,
TypeAliasDeclaration = 264,
EnumDeclaration = 265,
ModuleDeclaration = 266,
ModuleBlock = 267,
CaseBlock = 268,
NamespaceExportDeclaration = 269,
ImportEqualsDeclaration = 270,
ImportDeclaration = 271,
ImportClause = 272,
NamespaceImport = 273,
NamedImports = 274,
ImportSpecifier = 275,
ExportAssignment = 276,
ExportDeclaration = 277,
NamedExports = 278,
NamespaceExport = 279,
ExportSpecifier = 280,
MissingDeclaration = 281,
ExternalModuleReference = 282,
JsxElement = 283,
JsxSelfClosingElement = 284,
JsxOpeningElement = 285,
JsxClosingElement = 286,
JsxFragment = 287,
JsxOpeningFragment = 288,
JsxClosingFragment = 289,
JsxAttribute = 290,
JsxAttributes = 291,
JsxSpreadAttribute = 292,
JsxExpression = 293,
JsxNamespacedName = 294,
CaseClause = 295,
DefaultClause = 296,
HeritageClause = 297,
CatchClause = 298,
AssertClause = 299,
AssertEntry = 300,
ImportTypeAssertionContainer = 301,
PropertyAssignment = 302,
ShorthandPropertyAssignment = 303,
SpreadAssignment = 304,
EnumMember = 305,
/** @deprecated */ UnparsedPrologue = 306,
/** @deprecated */ UnparsedPrepend = 307,
/** @deprecated */ UnparsedText = 308,
/** @deprecated */ UnparsedInternalText = 309,
/** @deprecated */ UnparsedSyntheticReference = 310,
SourceFile = 311,
Bundle = 312,
/** @deprecated */ UnparsedSource = 313,
/** @deprecated */ InputFiles = 314,
JSDocTypeExpression = 315,
JSDocNameReference = 316,
JSDocMemberName = 317,
JSDocAllType = 318,
JSDocUnknownType = 319,
JSDocNullableType = 320,
JSDocNonNullableType = 321,
JSDocOptionalType = 322,
JSDocFunctionType = 323,
JSDocVariadicType = 324,
JSDocNamepathType = 325,
JSDoc = 326,
UsingKeyword = 160,
FromKeyword = 161,
GlobalKeyword = 162,
BigIntKeyword = 163,
OverrideKeyword = 164,
OfKeyword = 165,
QualifiedName = 166,
ComputedPropertyName = 167,
TypeParameter = 168,
Parameter = 169,
Decorator = 170,
PropertySignature = 171,
PropertyDeclaration = 172,
MethodSignature = 173,
MethodDeclaration = 174,
ClassStaticBlockDeclaration = 175,
Constructor = 176,
GetAccessor = 177,
SetAccessor = 178,
CallSignature = 179,
ConstructSignature = 180,
IndexSignature = 181,
TypePredicate = 182,
TypeReference = 183,
FunctionType = 184,
ConstructorType = 185,
TypeQuery = 186,
TypeLiteral = 187,
ArrayType = 188,
TupleType = 189,
OptionalType = 190,
RestType = 191,
UnionType = 192,
IntersectionType = 193,
ConditionalType = 194,
InferType = 195,
ParenthesizedType = 196,
ThisType = 197,
TypeOperator = 198,
IndexedAccessType = 199,
MappedType = 200,
LiteralType = 201,
NamedTupleMember = 202,
TemplateLiteralType = 203,
TemplateLiteralTypeSpan = 204,
ImportType = 205,
ObjectBindingPattern = 206,
ArrayBindingPattern = 207,
BindingElement = 208,
ArrayLiteralExpression = 209,
ObjectLiteralExpression = 210,
PropertyAccessExpression = 211,
ElementAccessExpression = 212,
CallExpression = 213,
NewExpression = 214,
TaggedTemplateExpression = 215,
TypeAssertionExpression = 216,
ParenthesizedExpression = 217,
FunctionExpression = 218,
ArrowFunction = 219,
DeleteExpression = 220,
TypeOfExpression = 221,
VoidExpression = 222,
AwaitExpression = 223,
PrefixUnaryExpression = 224,
PostfixUnaryExpression = 225,
BinaryExpression = 226,
ConditionalExpression = 227,
TemplateExpression = 228,
YieldExpression = 229,
SpreadElement = 230,
ClassExpression = 231,
OmittedExpression = 232,
ExpressionWithTypeArguments = 233,
AsExpression = 234,
NonNullExpression = 235,
MetaProperty = 236,
SyntheticExpression = 237,
SatisfiesExpression = 238,
TemplateSpan = 239,
SemicolonClassElement = 240,
Block = 241,
EmptyStatement = 242,
VariableStatement = 243,
ExpressionStatement = 244,
IfStatement = 245,
DoStatement = 246,
WhileStatement = 247,
ForStatement = 248,
ForInStatement = 249,
ForOfStatement = 250,
ContinueStatement = 251,
BreakStatement = 252,
ReturnStatement = 253,
WithStatement = 254,
SwitchStatement = 255,
LabeledStatement = 256,
ThrowStatement = 257,
TryStatement = 258,
DebuggerStatement = 259,
VariableDeclaration = 260,
VariableDeclarationList = 261,
FunctionDeclaration = 262,
ClassDeclaration = 263,
InterfaceDeclaration = 264,
TypeAliasDeclaration = 265,
EnumDeclaration = 266,
ModuleDeclaration = 267,
ModuleBlock = 268,
CaseBlock = 269,
NamespaceExportDeclaration = 270,
ImportEqualsDeclaration = 271,
ImportDeclaration = 272,
ImportClause = 273,
NamespaceImport = 274,
NamedImports = 275,
ImportSpecifier = 276,
ExportAssignment = 277,
ExportDeclaration = 278,
NamedExports = 279,
NamespaceExport = 280,
ExportSpecifier = 281,
MissingDeclaration = 282,
ExternalModuleReference = 283,
JsxElement = 284,
JsxSelfClosingElement = 285,
JsxOpeningElement = 286,
JsxClosingElement = 287,
JsxFragment = 288,
JsxOpeningFragment = 289,
JsxClosingFragment = 290,
JsxAttribute = 291,
JsxAttributes = 292,
JsxSpreadAttribute = 293,
JsxExpression = 294,
JsxNamespacedName = 295,
CaseClause = 296,
DefaultClause = 297,
HeritageClause = 298,
CatchClause = 299,
AssertClause = 300,
AssertEntry = 301,
ImportTypeAssertionContainer = 302,
PropertyAssignment = 303,
ShorthandPropertyAssignment = 304,
SpreadAssignment = 305,
EnumMember = 306,
/** @deprecated */ UnparsedPrologue = 307,
/** @deprecated */ UnparsedPrepend = 308,
/** @deprecated */ UnparsedText = 309,
/** @deprecated */ UnparsedInternalText = 310,
/** @deprecated */ UnparsedSyntheticReference = 311,
SourceFile = 312,
Bundle = 313,
/** @deprecated */ UnparsedSource = 314,
/** @deprecated */ InputFiles = 315,
JSDocTypeExpression = 316,
JSDocNameReference = 317,
JSDocMemberName = 318,
JSDocAllType = 319,
JSDocUnknownType = 320,
JSDocNullableType = 321,
JSDocNonNullableType = 322,
JSDocOptionalType = 323,
JSDocFunctionType = 324,
JSDocVariadicType = 325,
JSDocNamepathType = 326,
JSDoc = 327,
/** @deprecated Use SyntaxKind.JSDoc */
JSDocComment = 326,
JSDocText = 327,
JSDocTypeLiteral = 328,
JSDocSignature = 329,
JSDocLink = 330,
JSDocLinkCode = 331,
JSDocLinkPlain = 332,
JSDocTag = 333,
JSDocAugmentsTag = 334,
JSDocImplementsTag = 335,
JSDocAuthorTag = 336,
JSDocDeprecatedTag = 337,
JSDocClassTag = 338,
JSDocPublicTag = 339,
JSDocPrivateTag = 340,
JSDocProtectedTag = 341,
JSDocReadonlyTag = 342,
JSDocOverrideTag = 343,
JSDocCallbackTag = 344,
JSDocOverloadTag = 345,
JSDocEnumTag = 346,
JSDocParameterTag = 347,
JSDocReturnTag = 348,
JSDocThisTag = 349,
JSDocTypeTag = 350,
JSDocTemplateTag = 351,
JSDocTypedefTag = 352,
JSDocSeeTag = 353,
JSDocPropertyTag = 354,
JSDocThrowsTag = 355,
JSDocSatisfiesTag = 356,
SyntaxList = 357,
NotEmittedStatement = 358,
PartiallyEmittedExpression = 359,
CommaListExpression = 360,
SyntheticReferenceExpression = 361,
Count = 362,
JSDocComment = 327,
JSDocText = 328,
JSDocTypeLiteral = 329,
JSDocSignature = 330,
JSDocLink = 331,
JSDocLinkCode = 332,
JSDocLinkPlain = 333,
JSDocTag = 334,
JSDocAugmentsTag = 335,
JSDocImplementsTag = 336,
JSDocAuthorTag = 337,
JSDocDeprecatedTag = 338,
JSDocClassTag = 339,
JSDocPublicTag = 340,
JSDocPrivateTag = 341,
JSDocProtectedTag = 342,
JSDocReadonlyTag = 343,
JSDocOverrideTag = 344,
JSDocCallbackTag = 345,
JSDocOverloadTag = 346,
JSDocEnumTag = 347,
JSDocParameterTag = 348,
JSDocReturnTag = 349,
JSDocThisTag = 350,
JSDocTypeTag = 351,
JSDocTemplateTag = 352,
JSDocTypedefTag = 353,
JSDocSeeTag = 354,
JSDocPropertyTag = 355,
JSDocThrowsTag = 356,
JSDocSatisfiesTag = 357,
SyntaxList = 358,
NotEmittedStatement = 359,
PartiallyEmittedExpression = 360,
CommaListExpression = 361,
SyntheticReferenceExpression = 362,
Count = 363,
FirstAssignment = 64,
LastAssignment = 79,
FirstCompoundAssignment = 65,
@ -4464,15 +4477,15 @@ declare namespace ts {
FirstReservedWord = 83,
LastReservedWord = 118,
FirstKeyword = 83,
LastKeyword = 164,
LastKeyword = 165,
FirstFutureReservedWord = 119,
LastFutureReservedWord = 127,
FirstTypeNode = 181,
LastTypeNode = 204,
FirstTypeNode = 182,
LastTypeNode = 205,
FirstPunctuation = 19,
LastPunctuation = 79,
FirstToken = 0,
LastToken = 164,
LastToken = 165,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 9,
@ -4481,19 +4494,19 @@ declare namespace ts {
LastTemplateToken = 18,
FirstBinaryOperator = 30,
LastBinaryOperator = 79,
FirstStatement = 242,
LastStatement = 258,
FirstNode = 165,
FirstJSDocNode = 315,
LastJSDocNode = 356,
FirstJSDocTagNode = 333,
LastJSDocTagNode = 356
FirstStatement = 243,
LastStatement = 259,
FirstNode = 166,
FirstJSDocNode = 316,
LastJSDocNode = 357,
FirstJSDocTagNode = 334,
LastJSDocTagNode = 357
}
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken;
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword;
type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
@ -4503,32 +4516,35 @@ declare namespace ts {
None = 0,
Let = 1,
Const = 2,
NestedNamespace = 4,
Synthesized = 8,
Namespace = 16,
OptionalChain = 32,
ExportContext = 64,
ContainsThis = 128,
HasImplicitReturn = 256,
HasExplicitReturn = 512,
GlobalAugmentation = 1024,
HasAsyncFunctions = 2048,
DisallowInContext = 4096,
YieldContext = 8192,
DecoratorContext = 16384,
AwaitContext = 32768,
DisallowConditionalTypesContext = 65536,
ThisNodeHasError = 131072,
JavaScriptFile = 262144,
ThisNodeOrAnySubNodesHasError = 524288,
HasAggregatedChildData = 1048576,
JSDoc = 8388608,
JsonFile = 67108864,
BlockScoped = 3,
ReachabilityCheckFlags = 768,
ReachabilityAndEmitFlags = 2816,
ContextFlags = 50720768,
TypeExcludesFlags = 40960
Using = 4,
AwaitUsing = 6,
NestedNamespace = 8,
Synthesized = 16,
Namespace = 32,
OptionalChain = 64,
ExportContext = 128,
ContainsThis = 256,
HasImplicitReturn = 512,
HasExplicitReturn = 1024,
GlobalAugmentation = 2048,
HasAsyncFunctions = 4096,
DisallowInContext = 8192,
YieldContext = 16384,
DecoratorContext = 32768,
AwaitContext = 65536,
DisallowConditionalTypesContext = 131072,
ThisNodeHasError = 262144,
JavaScriptFile = 524288,
ThisNodeOrAnySubNodesHasError = 1048576,
HasAggregatedChildData = 2097152,
JSDoc = 16777216,
JsonFile = 134217728,
BlockScoped = 7,
Constant = 6,
ReachabilityCheckFlags = 1536,
ReachabilityAndEmitFlags = 5632,
ContextFlags = 101441536,
TypeExcludesFlags = 81920
}
enum ModifierFlags {
None = 0,
@ -5818,9 +5834,11 @@ declare namespace ts {
};
}) | ExportDeclaration & {
readonly isTypeOnly: true;
readonly moduleSpecifier: Expression;
} | NamespaceExport & {
readonly parent: ExportDeclaration & {
readonly isTypeOnly: true;
readonly moduleSpecifier: Expression;
};
};
type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration;
@ -6265,7 +6283,7 @@ declare namespace ts {
getSourceFileByPath(path: Path): SourceFile | undefined;
getCurrentDirectory(): string;
}
interface ParseConfigHost {
interface ParseConfigHost extends ModuleResolutionHost {
useCaseSensitiveFileNames: boolean;
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
/**
@ -6942,7 +6960,7 @@ declare namespace ts {
hasRestElement: boolean;
combinedFlags: ElementFlags;
readonly: boolean;
labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[];
labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[];
}
interface TupleTypeReference extends TypeReference {
target: TupleType;
@ -7583,7 +7601,14 @@ declare namespace ts {
All = 15,
ExcludeJSDocTypeAssertion = 16
}
type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function";
type ImmediatelyInvokedFunctionExpression = CallExpression & {
readonly expression: FunctionExpression;
};
type ImmediatelyInvokedArrowFunction = CallExpression & {
readonly expression: ParenthesizedExpression & {
readonly expression: ArrowFunction;
};
};
interface NodeFactory {
createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral;
@ -8053,8 +8078,8 @@ declare namespace ts {
createPostfixDecrement(operand: Expression): PostfixUnaryExpression;
createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression;
createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction;
createVoidZero(): VoidExpression;
createExportDefault(expression: Expression): ExportAssignment;
createExternalModuleExport(exportName: Identifier): ExportDeclaration;
@ -8384,6 +8409,7 @@ declare namespace ts {
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
readonly interactiveInlayHints?: boolean;
readonly allowRenameOfImportPath?: boolean;
readonly autoImportFileExcludePatterns?: string[];
readonly organizeImportsIgnoreCase?: "auto" | boolean;
@ -10366,11 +10392,18 @@ declare namespace ts {
Enum = "Enum"
}
interface InlayHint {
/** This property will be the empty string when displayParts is set. */
text: string;
position: number;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
displayParts?: InlayHintDisplayPart[];
}
interface InlayHintDisplayPart {
text: string;
span?: TextSpan;
file?: string;
}
interface TodoCommentDescriptor {
text: string;
@ -10802,6 +10835,7 @@ declare namespace ts {
kindModifiers?: string;
sortText: string;
insertText?: string;
filterText?: string;
isSnippet?: true;
/**
* An optional span that indicates the text to be replaced by this completion item.
@ -10961,6 +10995,10 @@ declare namespace ts {
variableElement = "var",
/** Inside function */
localVariableElement = "local var",
/** using foo = ... */
variableUsingElement = "using",
/** await using foo = ... */
variableAwaitUsingElement = "await using",
/**
* Inside module and script only
* function f() { }

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */
declare namespace ts {
const versionMajorMinor = "5.1";
const versionMajorMinor = "5.2";
/** The version of the TypeScript compiler release */
const version: string;
/**
@ -204,211 +204,212 @@ declare namespace ts {
UndefinedKeyword = 157,
UniqueKeyword = 158,
UnknownKeyword = 159,
FromKeyword = 160,
GlobalKeyword = 161,
BigIntKeyword = 162,
OverrideKeyword = 163,
OfKeyword = 164,
QualifiedName = 165,
ComputedPropertyName = 166,
TypeParameter = 167,
Parameter = 168,
Decorator = 169,
PropertySignature = 170,
PropertyDeclaration = 171,
MethodSignature = 172,
MethodDeclaration = 173,
ClassStaticBlockDeclaration = 174,
Constructor = 175,
GetAccessor = 176,
SetAccessor = 177,
CallSignature = 178,
ConstructSignature = 179,
IndexSignature = 180,
TypePredicate = 181,
TypeReference = 182,
FunctionType = 183,
ConstructorType = 184,
TypeQuery = 185,
TypeLiteral = 186,
ArrayType = 187,
TupleType = 188,
OptionalType = 189,
RestType = 190,
UnionType = 191,
IntersectionType = 192,
ConditionalType = 193,
InferType = 194,
ParenthesizedType = 195,
ThisType = 196,
TypeOperator = 197,
IndexedAccessType = 198,
MappedType = 199,
LiteralType = 200,
NamedTupleMember = 201,
TemplateLiteralType = 202,
TemplateLiteralTypeSpan = 203,
ImportType = 204,
ObjectBindingPattern = 205,
ArrayBindingPattern = 206,
BindingElement = 207,
ArrayLiteralExpression = 208,
ObjectLiteralExpression = 209,
PropertyAccessExpression = 210,
ElementAccessExpression = 211,
CallExpression = 212,
NewExpression = 213,
TaggedTemplateExpression = 214,
TypeAssertionExpression = 215,
ParenthesizedExpression = 216,
FunctionExpression = 217,
ArrowFunction = 218,
DeleteExpression = 219,
TypeOfExpression = 220,
VoidExpression = 221,
AwaitExpression = 222,
PrefixUnaryExpression = 223,
PostfixUnaryExpression = 224,
BinaryExpression = 225,
ConditionalExpression = 226,
TemplateExpression = 227,
YieldExpression = 228,
SpreadElement = 229,
ClassExpression = 230,
OmittedExpression = 231,
ExpressionWithTypeArguments = 232,
AsExpression = 233,
NonNullExpression = 234,
MetaProperty = 235,
SyntheticExpression = 236,
SatisfiesExpression = 237,
TemplateSpan = 238,
SemicolonClassElement = 239,
Block = 240,
EmptyStatement = 241,
VariableStatement = 242,
ExpressionStatement = 243,
IfStatement = 244,
DoStatement = 245,
WhileStatement = 246,
ForStatement = 247,
ForInStatement = 248,
ForOfStatement = 249,
ContinueStatement = 250,
BreakStatement = 251,
ReturnStatement = 252,
WithStatement = 253,
SwitchStatement = 254,
LabeledStatement = 255,
ThrowStatement = 256,
TryStatement = 257,
DebuggerStatement = 258,
VariableDeclaration = 259,
VariableDeclarationList = 260,
FunctionDeclaration = 261,
ClassDeclaration = 262,
InterfaceDeclaration = 263,
TypeAliasDeclaration = 264,
EnumDeclaration = 265,
ModuleDeclaration = 266,
ModuleBlock = 267,
CaseBlock = 268,
NamespaceExportDeclaration = 269,
ImportEqualsDeclaration = 270,
ImportDeclaration = 271,
ImportClause = 272,
NamespaceImport = 273,
NamedImports = 274,
ImportSpecifier = 275,
ExportAssignment = 276,
ExportDeclaration = 277,
NamedExports = 278,
NamespaceExport = 279,
ExportSpecifier = 280,
MissingDeclaration = 281,
ExternalModuleReference = 282,
JsxElement = 283,
JsxSelfClosingElement = 284,
JsxOpeningElement = 285,
JsxClosingElement = 286,
JsxFragment = 287,
JsxOpeningFragment = 288,
JsxClosingFragment = 289,
JsxAttribute = 290,
JsxAttributes = 291,
JsxSpreadAttribute = 292,
JsxExpression = 293,
JsxNamespacedName = 294,
CaseClause = 295,
DefaultClause = 296,
HeritageClause = 297,
CatchClause = 298,
AssertClause = 299,
AssertEntry = 300,
ImportTypeAssertionContainer = 301,
PropertyAssignment = 302,
ShorthandPropertyAssignment = 303,
SpreadAssignment = 304,
EnumMember = 305,
/** @deprecated */ UnparsedPrologue = 306,
/** @deprecated */ UnparsedPrepend = 307,
/** @deprecated */ UnparsedText = 308,
/** @deprecated */ UnparsedInternalText = 309,
/** @deprecated */ UnparsedSyntheticReference = 310,
SourceFile = 311,
Bundle = 312,
/** @deprecated */ UnparsedSource = 313,
/** @deprecated */ InputFiles = 314,
JSDocTypeExpression = 315,
JSDocNameReference = 316,
JSDocMemberName = 317,
JSDocAllType = 318,
JSDocUnknownType = 319,
JSDocNullableType = 320,
JSDocNonNullableType = 321,
JSDocOptionalType = 322,
JSDocFunctionType = 323,
JSDocVariadicType = 324,
JSDocNamepathType = 325,
JSDoc = 326,
UsingKeyword = 160,
FromKeyword = 161,
GlobalKeyword = 162,
BigIntKeyword = 163,
OverrideKeyword = 164,
OfKeyword = 165,
QualifiedName = 166,
ComputedPropertyName = 167,
TypeParameter = 168,
Parameter = 169,
Decorator = 170,
PropertySignature = 171,
PropertyDeclaration = 172,
MethodSignature = 173,
MethodDeclaration = 174,
ClassStaticBlockDeclaration = 175,
Constructor = 176,
GetAccessor = 177,
SetAccessor = 178,
CallSignature = 179,
ConstructSignature = 180,
IndexSignature = 181,
TypePredicate = 182,
TypeReference = 183,
FunctionType = 184,
ConstructorType = 185,
TypeQuery = 186,
TypeLiteral = 187,
ArrayType = 188,
TupleType = 189,
OptionalType = 190,
RestType = 191,
UnionType = 192,
IntersectionType = 193,
ConditionalType = 194,
InferType = 195,
ParenthesizedType = 196,
ThisType = 197,
TypeOperator = 198,
IndexedAccessType = 199,
MappedType = 200,
LiteralType = 201,
NamedTupleMember = 202,
TemplateLiteralType = 203,
TemplateLiteralTypeSpan = 204,
ImportType = 205,
ObjectBindingPattern = 206,
ArrayBindingPattern = 207,
BindingElement = 208,
ArrayLiteralExpression = 209,
ObjectLiteralExpression = 210,
PropertyAccessExpression = 211,
ElementAccessExpression = 212,
CallExpression = 213,
NewExpression = 214,
TaggedTemplateExpression = 215,
TypeAssertionExpression = 216,
ParenthesizedExpression = 217,
FunctionExpression = 218,
ArrowFunction = 219,
DeleteExpression = 220,
TypeOfExpression = 221,
VoidExpression = 222,
AwaitExpression = 223,
PrefixUnaryExpression = 224,
PostfixUnaryExpression = 225,
BinaryExpression = 226,
ConditionalExpression = 227,
TemplateExpression = 228,
YieldExpression = 229,
SpreadElement = 230,
ClassExpression = 231,
OmittedExpression = 232,
ExpressionWithTypeArguments = 233,
AsExpression = 234,
NonNullExpression = 235,
MetaProperty = 236,
SyntheticExpression = 237,
SatisfiesExpression = 238,
TemplateSpan = 239,
SemicolonClassElement = 240,
Block = 241,
EmptyStatement = 242,
VariableStatement = 243,
ExpressionStatement = 244,
IfStatement = 245,
DoStatement = 246,
WhileStatement = 247,
ForStatement = 248,
ForInStatement = 249,
ForOfStatement = 250,
ContinueStatement = 251,
BreakStatement = 252,
ReturnStatement = 253,
WithStatement = 254,
SwitchStatement = 255,
LabeledStatement = 256,
ThrowStatement = 257,
TryStatement = 258,
DebuggerStatement = 259,
VariableDeclaration = 260,
VariableDeclarationList = 261,
FunctionDeclaration = 262,
ClassDeclaration = 263,
InterfaceDeclaration = 264,
TypeAliasDeclaration = 265,
EnumDeclaration = 266,
ModuleDeclaration = 267,
ModuleBlock = 268,
CaseBlock = 269,
NamespaceExportDeclaration = 270,
ImportEqualsDeclaration = 271,
ImportDeclaration = 272,
ImportClause = 273,
NamespaceImport = 274,
NamedImports = 275,
ImportSpecifier = 276,
ExportAssignment = 277,
ExportDeclaration = 278,
NamedExports = 279,
NamespaceExport = 280,
ExportSpecifier = 281,
MissingDeclaration = 282,
ExternalModuleReference = 283,
JsxElement = 284,
JsxSelfClosingElement = 285,
JsxOpeningElement = 286,
JsxClosingElement = 287,
JsxFragment = 288,
JsxOpeningFragment = 289,
JsxClosingFragment = 290,
JsxAttribute = 291,
JsxAttributes = 292,
JsxSpreadAttribute = 293,
JsxExpression = 294,
JsxNamespacedName = 295,
CaseClause = 296,
DefaultClause = 297,
HeritageClause = 298,
CatchClause = 299,
AssertClause = 300,
AssertEntry = 301,
ImportTypeAssertionContainer = 302,
PropertyAssignment = 303,
ShorthandPropertyAssignment = 304,
SpreadAssignment = 305,
EnumMember = 306,
/** @deprecated */ UnparsedPrologue = 307,
/** @deprecated */ UnparsedPrepend = 308,
/** @deprecated */ UnparsedText = 309,
/** @deprecated */ UnparsedInternalText = 310,
/** @deprecated */ UnparsedSyntheticReference = 311,
SourceFile = 312,
Bundle = 313,
/** @deprecated */ UnparsedSource = 314,
/** @deprecated */ InputFiles = 315,
JSDocTypeExpression = 316,
JSDocNameReference = 317,
JSDocMemberName = 318,
JSDocAllType = 319,
JSDocUnknownType = 320,
JSDocNullableType = 321,
JSDocNonNullableType = 322,
JSDocOptionalType = 323,
JSDocFunctionType = 324,
JSDocVariadicType = 325,
JSDocNamepathType = 326,
JSDoc = 327,
/** @deprecated Use SyntaxKind.JSDoc */
JSDocComment = 326,
JSDocText = 327,
JSDocTypeLiteral = 328,
JSDocSignature = 329,
JSDocLink = 330,
JSDocLinkCode = 331,
JSDocLinkPlain = 332,
JSDocTag = 333,
JSDocAugmentsTag = 334,
JSDocImplementsTag = 335,
JSDocAuthorTag = 336,
JSDocDeprecatedTag = 337,
JSDocClassTag = 338,
JSDocPublicTag = 339,
JSDocPrivateTag = 340,
JSDocProtectedTag = 341,
JSDocReadonlyTag = 342,
JSDocOverrideTag = 343,
JSDocCallbackTag = 344,
JSDocOverloadTag = 345,
JSDocEnumTag = 346,
JSDocParameterTag = 347,
JSDocReturnTag = 348,
JSDocThisTag = 349,
JSDocTypeTag = 350,
JSDocTemplateTag = 351,
JSDocTypedefTag = 352,
JSDocSeeTag = 353,
JSDocPropertyTag = 354,
JSDocThrowsTag = 355,
JSDocSatisfiesTag = 356,
SyntaxList = 357,
NotEmittedStatement = 358,
PartiallyEmittedExpression = 359,
CommaListExpression = 360,
SyntheticReferenceExpression = 361,
Count = 362,
JSDocComment = 327,
JSDocText = 328,
JSDocTypeLiteral = 329,
JSDocSignature = 330,
JSDocLink = 331,
JSDocLinkCode = 332,
JSDocLinkPlain = 333,
JSDocTag = 334,
JSDocAugmentsTag = 335,
JSDocImplementsTag = 336,
JSDocAuthorTag = 337,
JSDocDeprecatedTag = 338,
JSDocClassTag = 339,
JSDocPublicTag = 340,
JSDocPrivateTag = 341,
JSDocProtectedTag = 342,
JSDocReadonlyTag = 343,
JSDocOverrideTag = 344,
JSDocCallbackTag = 345,
JSDocOverloadTag = 346,
JSDocEnumTag = 347,
JSDocParameterTag = 348,
JSDocReturnTag = 349,
JSDocThisTag = 350,
JSDocTypeTag = 351,
JSDocTemplateTag = 352,
JSDocTypedefTag = 353,
JSDocSeeTag = 354,
JSDocPropertyTag = 355,
JSDocThrowsTag = 356,
JSDocSatisfiesTag = 357,
SyntaxList = 358,
NotEmittedStatement = 359,
PartiallyEmittedExpression = 360,
CommaListExpression = 361,
SyntheticReferenceExpression = 362,
Count = 363,
FirstAssignment = 64,
LastAssignment = 79,
FirstCompoundAssignment = 65,
@ -416,15 +417,15 @@ declare namespace ts {
FirstReservedWord = 83,
LastReservedWord = 118,
FirstKeyword = 83,
LastKeyword = 164,
LastKeyword = 165,
FirstFutureReservedWord = 119,
LastFutureReservedWord = 127,
FirstTypeNode = 181,
LastTypeNode = 204,
FirstTypeNode = 182,
LastTypeNode = 205,
FirstPunctuation = 19,
LastPunctuation = 79,
FirstToken = 0,
LastToken = 164,
LastToken = 165,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 9,
@ -433,19 +434,19 @@ declare namespace ts {
LastTemplateToken = 18,
FirstBinaryOperator = 30,
LastBinaryOperator = 79,
FirstStatement = 242,
LastStatement = 258,
FirstNode = 165,
FirstJSDocNode = 315,
LastJSDocNode = 356,
FirstJSDocTagNode = 333,
LastJSDocTagNode = 356
FirstStatement = 243,
LastStatement = 259,
FirstNode = 166,
FirstJSDocNode = 316,
LastJSDocNode = 357,
FirstJSDocTagNode = 334,
LastJSDocTagNode = 357
}
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken;
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword;
type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
@ -455,32 +456,35 @@ declare namespace ts {
None = 0,
Let = 1,
Const = 2,
NestedNamespace = 4,
Synthesized = 8,
Namespace = 16,
OptionalChain = 32,
ExportContext = 64,
ContainsThis = 128,
HasImplicitReturn = 256,
HasExplicitReturn = 512,
GlobalAugmentation = 1024,
HasAsyncFunctions = 2048,
DisallowInContext = 4096,
YieldContext = 8192,
DecoratorContext = 16384,
AwaitContext = 32768,
DisallowConditionalTypesContext = 65536,
ThisNodeHasError = 131072,
JavaScriptFile = 262144,
ThisNodeOrAnySubNodesHasError = 524288,
HasAggregatedChildData = 1048576,
JSDoc = 8388608,
JsonFile = 67108864,
BlockScoped = 3,
ReachabilityCheckFlags = 768,
ReachabilityAndEmitFlags = 2816,
ContextFlags = 50720768,
TypeExcludesFlags = 40960
Using = 4,
AwaitUsing = 6,
NestedNamespace = 8,
Synthesized = 16,
Namespace = 32,
OptionalChain = 64,
ExportContext = 128,
ContainsThis = 256,
HasImplicitReturn = 512,
HasExplicitReturn = 1024,
GlobalAugmentation = 2048,
HasAsyncFunctions = 4096,
DisallowInContext = 8192,
YieldContext = 16384,
DecoratorContext = 32768,
AwaitContext = 65536,
DisallowConditionalTypesContext = 131072,
ThisNodeHasError = 262144,
JavaScriptFile = 524288,
ThisNodeOrAnySubNodesHasError = 1048576,
HasAggregatedChildData = 2097152,
JSDoc = 16777216,
JsonFile = 134217728,
BlockScoped = 7,
Constant = 6,
ReachabilityCheckFlags = 1536,
ReachabilityAndEmitFlags = 5632,
ContextFlags = 101441536,
TypeExcludesFlags = 81920
}
enum ModifierFlags {
None = 0,
@ -1770,9 +1774,11 @@ declare namespace ts {
};
}) | ExportDeclaration & {
readonly isTypeOnly: true;
readonly moduleSpecifier: Expression;
} | NamespaceExport & {
readonly parent: ExportDeclaration & {
readonly isTypeOnly: true;
readonly moduleSpecifier: Expression;
};
};
type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration;
@ -2217,7 +2223,7 @@ declare namespace ts {
getSourceFileByPath(path: Path): SourceFile | undefined;
getCurrentDirectory(): string;
}
interface ParseConfigHost {
interface ParseConfigHost extends ModuleResolutionHost {
useCaseSensitiveFileNames: boolean;
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
/**
@ -2894,7 +2900,7 @@ declare namespace ts {
hasRestElement: boolean;
combinedFlags: ElementFlags;
readonly: boolean;
labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[];
labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[];
}
interface TupleTypeReference extends TypeReference {
target: TupleType;
@ -3535,7 +3541,14 @@ declare namespace ts {
All = 15,
ExcludeJSDocTypeAssertion = 16
}
type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function";
type ImmediatelyInvokedFunctionExpression = CallExpression & {
readonly expression: FunctionExpression;
};
type ImmediatelyInvokedArrowFunction = CallExpression & {
readonly expression: ParenthesizedExpression & {
readonly expression: ArrowFunction;
};
};
interface NodeFactory {
createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral;
@ -4005,8 +4018,8 @@ declare namespace ts {
createPostfixDecrement(operand: Expression): PostfixUnaryExpression;
createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression;
createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction;
createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction;
createVoidZero(): VoidExpression;
createExportDefault(expression: Expression): ExportAssignment;
createExternalModuleExport(exportName: Identifier): ExportDeclaration;
@ -4336,6 +4349,7 @@ declare namespace ts {
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
readonly interactiveInlayHints?: boolean;
readonly allowRenameOfImportPath?: boolean;
readonly autoImportFileExcludePatterns?: string[];
readonly organizeImportsIgnoreCase?: "auto" | boolean;
@ -6402,11 +6416,18 @@ declare namespace ts {
Enum = "Enum"
}
interface InlayHint {
/** This property will be the empty string when displayParts is set. */
text: string;
position: number;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
displayParts?: InlayHintDisplayPart[];
}
interface InlayHintDisplayPart {
text: string;
span?: TextSpan;
file?: string;
}
interface TodoCommentDescriptor {
text: string;
@ -6838,6 +6859,7 @@ declare namespace ts {
kindModifiers?: string;
sortText: string;
insertText?: string;
filterText?: string;
isSnippet?: true;
/**
* An optional span that indicates the text to be replaced by this completion item.
@ -6997,6 +7019,10 @@ declare namespace ts {
variableElement = "var",
/** Inside function */
localVariableElement = "local var",
/** using foo = ... */
variableUsingElement = "using",
/** await using foo = ... */
variableAwaitUsingElement = "await using",
/**
* Inside module and script only
* function f() { }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

14
node_modules/typescript/package.json generated vendored
View file

@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "5.1.6",
"version": "5.2.2",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
@ -40,7 +40,7 @@
],
"devDependencies": {
"@esfx/canceltoken": "^1.0.0",
"@octokit/rest": "latest",
"@octokit/rest": "^19.0.13",
"@types/chai": "^4.3.4",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^8.1.0",
@ -51,19 +51,19 @@
"@types/node": "latest",
"@types/source-map-support": "^0.5.6",
"@types/which": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"@typescript-eslint/utils": "^5.33.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/utils": "^6.0.0",
"azure-devops-node-api": "^12.0.0",
"c8": "^7.14.0",
"chai": "^4.3.7",
"chalk": "^4.1.2",
"chokidar": "^3.5.3",
"del": "^6.1.1",
"diff": "^5.1.0",
"esbuild": "^0.17.2",
"esbuild": "^0.18.1",
"eslint": "^8.22.0",
"eslint-formatter-autolinkable-stylish": "^1.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-local": "^1.0.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-simple-import-sort": "^10.0.0",

120
package-lock.json generated
View file

@ -43,12 +43,12 @@
"@types/get-folder-size": "^2.0.0",
"@types/js-yaml": "^4.0.5",
"@types/node": "16.11.22",
"@types/semver": "^7.5.0",
"@types/semver": "^7.5.1",
"@types/sinon": "^10.0.16",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"ava": "^5.3.1",
"eslint": "^8.47.0",
"eslint": "^8.48.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-github": "^4.9.2",
@ -58,7 +58,7 @@
"nock": "^13.3.3",
"removeNPMAbsolutePaths": "3.0.1",
"sinon": "^15.2.0",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@ -505,9 +505,9 @@
}
},
"node_modules/@eslint/js": {
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz",
"integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==",
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz",
"integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -957,9 +957,9 @@
}
},
"node_modules/@types/semver": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz",
"integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==",
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz",
"integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==",
"dev": true
},
"node_modules/@types/sinon": {
@ -991,16 +991,16 @@
"integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz",
"integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.5.0.tgz",
"integrity": "sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/type-utils": "6.4.1",
"@typescript-eslint/utils": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/type-utils": "6.5.0",
"@typescript-eslint/utils": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -1026,15 +1026,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz",
"integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.5.0.tgz",
"integrity": "sha512-LMAVtR5GN8nY0G0BadkG0XIe4AcNMeyEy3DyhKGAh9k4pLSMBO7rF29JvDBpZGCmp5Pgz5RLHP6eCpSYZJQDuQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/typescript-estree": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4"
},
"engines": {
@ -1054,13 +1054,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz",
"integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz",
"integrity": "sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1"
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1071,13 +1071,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz",
"integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.5.0.tgz",
"integrity": "sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/utils": "6.4.1",
"@typescript-eslint/typescript-estree": "6.5.0",
"@typescript-eslint/utils": "6.5.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@ -1098,9 +1098,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz",
"integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.5.0.tgz",
"integrity": "sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1111,13 +1111,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz",
"integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz",
"integrity": "sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/visitor-keys": "6.4.1",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/visitor-keys": "6.5.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -1138,17 +1138,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz",
"integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.5.0.tgz",
"integrity": "sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.4.1",
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/typescript-estree": "6.4.1",
"@typescript-eslint/scope-manager": "6.5.0",
"@typescript-eslint/types": "6.5.0",
"@typescript-eslint/typescript-estree": "6.5.0",
"semver": "^7.5.4"
},
"engines": {
@ -1163,12 +1163,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz",
"integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==",
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz",
"integrity": "sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.4.1",
"@typescript-eslint/types": "6.5.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@ -2522,15 +2522,15 @@
}
},
"node_modules/eslint": {
"version": "8.47.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz",
"integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==",
"version": "8.48.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz",
"integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "^8.47.0",
"@eslint/js": "8.48.0",
"@humanwhocodes/config-array": "^0.11.10",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@ -6056,9 +6056,9 @@
}
},
"node_modules/typescript": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"dev": true,
"bin": {
"tsc": "bin/tsc",

View file

@ -58,12 +58,12 @@
"@types/get-folder-size": "^2.0.0",
"@types/js-yaml": "^4.0.5",
"@types/node": "16.11.22",
"@types/semver": "^7.5.0",
"@types/semver": "^7.5.1",
"@types/sinon": "^10.0.16",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"ava": "^5.3.1",
"eslint": "^8.47.0",
"eslint": "^8.48.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-github": "^4.9.2",
@ -73,7 +73,7 @@
"nock": "^13.3.3",
"removeNPMAbsolutePaths": "3.0.1",
"sinon": "^15.2.0",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
},
"overrides": {
"@actions/tool-cache": {