Merge remote-tracking branch 'origin/releases/v3' into backport-v2.25.11-b611370bb

This commit is contained in:
github-actions[bot]
2024-06-28 14:46:06 +00:00
214 changed files with 201331 additions and 418727 deletions
+55 -49
View File
@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "3.25.10",
"version": "3.25.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
@@ -871,6 +871,12 @@
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"node_modules/@types/console-log-level": {
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/@types/console-log-level/-/console-log-level-1.4.5.tgz",
"integrity": "sha512-ANoa0gMtzWhKKMYbBt+NM11VqbuwJwpMEkvuZTJ1JcQ7C6Qw/yjV5R4yPkOPjFAULcvX8wenC9BnI5K9jExmiw==",
"dev": true
},
"node_modules/@types/get-folder-size": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/get-folder-size/-/get-folder-size-2.0.0.tgz",
@@ -946,21 +952,21 @@
}
},
"node_modules/@types/uuid": {
"version": "9.0.8",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz",
"integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ=="
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.0.tgz",
"integrity": "sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.1.tgz",
"integrity": "sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/type-utils": "7.13.0",
"@typescript-eslint/utils": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"@typescript-eslint/scope-manager": "7.13.1",
"@typescript-eslint/type-utils": "7.13.1",
"@typescript-eslint/utils": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
@@ -984,15 +990,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.0.tgz",
"integrity": "sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.1.tgz",
"integrity": "sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"@typescript-eslint/scope-manager": "7.13.1",
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/typescript-estree": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1",
"debug": "^4.3.4"
},
"engines": {
@@ -1012,13 +1018,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz",
"integrity": "sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz",
"integrity": "sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0"
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -1029,13 +1035,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.0.tgz",
"integrity": "sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.1.tgz",
"integrity": "sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "7.13.0",
"@typescript-eslint/utils": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.1",
"@typescript-eslint/utils": "7.13.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.3.0"
},
@@ -1056,9 +1062,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.0.tgz",
"integrity": "sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.1.tgz",
"integrity": "sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==",
"dev": true,
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -1069,13 +1075,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz",
"integrity": "sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz",
"integrity": "sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -1121,15 +1127,15 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.0.tgz",
"integrity": "sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.1.tgz",
"integrity": "sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.0"
"@typescript-eslint/scope-manager": "7.13.1",
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/typescript-estree": "7.13.1"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
@@ -1143,12 +1149,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz",
"integrity": "sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==",
"version": "7.13.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz",
"integrity": "sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/types": "7.13.1",
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
@@ -6002,9 +6008,9 @@
}
},
"node_modules/typescript": {
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
+35
View File
@@ -0,0 +1,35 @@
# Installation
> `npm install --save @types/console-log-level`
# Summary
This package contains type definitions for console-log-level (https://github.com/watson/console-log-level).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/console-log-level.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/console-log-level/index.d.ts)
````ts
type PrefixFunction = (level: string) => string;
declare namespace consoleLogLevel {
type LogLevelNames = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
type Logger = Record<LogLevelNames, (...args: any[]) => void>;
}
interface Options {
level?: consoleLogLevel.LogLevelNames | undefined;
prefix?: string | PrefixFunction | undefined;
stderr?: boolean | undefined;
}
declare function consoleLogLevel(opts?: Options): consoleLogLevel.Logger;
export = consoleLogLevel;
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Dependencies: none
# Credits
These definitions were written by [Ali Ijaz Sheikh](https://github.com/ofrobots).
+16
View File
@@ -0,0 +1,16 @@
type PrefixFunction = (level: string) => string;
declare namespace consoleLogLevel {
type LogLevelNames = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
type Logger = Record<LogLevelNames, (...args: any[]) => void>;
}
interface Options {
level?: consoleLogLevel.LogLevelNames | undefined;
prefix?: string | PrefixFunction | undefined;
stderr?: boolean | undefined;
}
declare function consoleLogLevel(opts?: Options): consoleLogLevel.Logger;
export = consoleLogLevel;
+25
View File
@@ -0,0 +1,25 @@
{
"name": "@types/console-log-level",
"version": "1.4.5",
"description": "TypeScript definitions for console-log-level",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/console-log-level",
"license": "MIT",
"contributors": [
{
"name": "Ali Ijaz Sheikh",
"githubUsername": "ofrobots",
"url": "https://github.com/ofrobots"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/console-log-level"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "4aaa5b0263072004b98521522a9d5c08abdc34951b84d0a13d9d731f4867899e",
"typeScriptVersion": "4.5"
}
+1 -1
View File
@@ -8,7 +8,7 @@ This package contains type definitions for uuid (https://github.com/uuidjs/uuid)
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid.
### Additional Details
* Last updated: Thu, 25 Jan 2024 23:07:19 GMT
* Last updated: Thu, 20 Jun 2024 21:07:25 GMT
* Dependencies: none
# Credits
+7
View File
@@ -1,12 +1,19 @@
import uuid from "./index.js";
export import v1 = uuid.v1;
export import v1ToV6 = uuid.v1ToV6;
export import v3 = uuid.v3;
export import v4 = uuid.v4;
export import v5 = uuid.v5;
export import v6 = uuid.v6;
export import v6ToV1 = uuid.v6ToV1;
export import v7 = uuid.v7;
export import NIL = uuid.NIL;
export import MAX = uuid.MAX;
export import version = uuid.version;
export import validate = uuid.validate;
export import stringify = uuid.stringify;
export import parse = uuid.parse;
export import V1Options = uuid.V1Options;
export import V4Options = uuid.V4Options;
export import V6Options = uuid.V6Options;
export import V7Options = uuid.V7Options;
+27
View File
@@ -29,11 +29,22 @@ interface V1RngOptions extends V1BaseOptions, RngOptions {}
export type V1Options = V1RandomOptions | V1RngOptions;
export type V4Options = RandomOptions | RngOptions;
export type V6Options = V1Options;
interface V7BaseOptions {
msecs?: number | Date | undefined;
seq?: number;
}
export type V7Options = (RandomOptions | RngOptions) & V7BaseOptions;
type VToV = ((uuid: string) => string) & ((uuid: OutputBuffer) => Uint8Array);
type v1String = (options?: V1Options) => string;
type v1Buffer = <T extends OutputBuffer>(options: V1Options | null | undefined, buffer: T, offset?: number) => T;
type v1 = v1Buffer & v1String;
type v1ToV6 = VToV;
type v4String = (options?: V4Options) => string;
type v4Buffer = <T extends OutputBuffer>(options: V4Options | null | undefined, buffer: T, offset?: number) => T;
type v4 = v4Buffer & v4String;
@@ -68,7 +79,18 @@ interface v5Static {
}
type v5 = v5Buffer & v5String & v5Static;
type v6String = (options?: V6Options) => string;
type v6Buffer = <T extends OutputBuffer>(options: V6Options | null | undefined, buffer: T, offset?: number) => T;
type v6 = v6Buffer & v6String;
type v6ToV1 = VToV;
type v7String = (options?: V7Options) => string;
type v7Buffer = <T extends OutputBuffer>(options: V7Options | null | undefined, buffer: T, offset?: number) => T;
type v7 = v7Buffer & v7String;
type NIL = string;
type MAX = string;
type parse = (uuid: string) => Uint8Array;
type stringify = (buffer: InputBuffer, offset?: number) => string;
@@ -76,11 +98,16 @@ type validate = (uuid: string) => boolean;
type version = (uuid: string) => number;
export const NIL: NIL;
export const MAX: MAX;
export const parse: parse;
export const stringify: stringify;
export const v1: v1;
export const v1ToV6: v1ToV6;
export const v3: v3;
export const v4: v4;
export const v5: v5;
export const v6: v6;
export const v6ToV1: v6ToV1;
export const v7: v7;
export const validate: validate;
export const version: version;
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@types/uuid",
"version": "9.0.8",
"version": "10.0.0",
"description": "TypeScript definitions for uuid",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid",
"license": "MIT",
@@ -49,6 +49,6 @@
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "ee6ba7ad17fbbead7a508faf213a9ad0f49c12929e8c6b0f05fb35129bc72d61",
"typeScriptVersion": "4.6"
"typesPublisherContentHash": "08fbc5ff7d23aaac1e81b5acf98181d2544ce6ffd5578e9879e2a75f0c087d54",
"typeScriptVersion": "4.7"
}
@@ -2,6 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getMemberHeadLoc_1 = require("../util/getMemberHeadLoc");
exports.default = (0, util_1.createRule)({
name: 'explicit-member-accessibility',
meta: {
@@ -119,7 +120,7 @@ exports.default = (0, util_1.createRule)({
}
else if (check === 'explicit' && !methodDefinition.accessibility) {
context.report({
loc: getMissingAccessibilityReportLoc(methodDefinition),
loc: (0, getMemberHeadLoc_1.getMemberHeadLoc)(context.sourceCode, methodDefinition),
messageId: 'missingAccessibility',
data: {
type: nodeType,
@@ -163,57 +164,6 @@ exports.default = (0, util_1.createRule)({
}
return { range: keywordRange, rangeToRemove };
}
/**
* For missing accessibility modifiers, we want to report any keywords
* out in front of the key, and the key itself, but not anything afterwards,
* i.e. parens, type annotations, method bodies, or `?`.
*/
function getMissingAccessibilityReportLoc(node) {
let start;
if (node.decorators.length === 0) {
start = node.loc.start;
}
else {
const lastDecorator = node.decorators[node.decorators.length - 1];
const nextToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(lastDecorator), util_1.NullThrowsReasons.MissingToken('token', 'last decorator'));
start = nextToken.loc.start;
}
let end;
if (!node.computed) {
end = node.key.loc.end;
}
else {
const closingBracket = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.key, token => token.value === ']'), util_1.NullThrowsReasons.MissingToken(']', node.type));
end = closingBracket.loc.end;
}
return {
start: structuredClone(start),
end: structuredClone(end),
};
}
/**
* For missing accessibility modifiers, we want to report any keywords
* out in front of the key, and the key itself, but not anything afterwards,
* i.e. parens, type annotations, method bodies, or `?`.
*/
function getMissingAccessibilityReportLocForParameterProperty(node, nodeName) {
// Parameter properties have a weirdly different AST structure
// than other class members.
let start;
if (node.decorators.length === 0) {
start = structuredClone(node.loc.start);
}
else {
const lastDecorator = node.decorators[node.decorators.length - 1];
const nextToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(lastDecorator), util_1.NullThrowsReasons.MissingToken('token', 'last decorator'));
start = structuredClone(nextToken.loc.start);
}
const end = context.sourceCode.getLocFromIndex(node.parameter.range[0] + nodeName.length);
return {
start,
end,
};
}
/**
* Creates a fixer that adds an accessibility modifier keyword
*/
@@ -270,7 +220,7 @@ exports.default = (0, util_1.createRule)({
else if (propCheck === 'explicit' &&
!propertyDefinition.accessibility) {
context.report({
loc: getMissingAccessibilityReportLoc(propertyDefinition),
loc: (0, getMemberHeadLoc_1.getMemberHeadLoc)(context.sourceCode, propertyDefinition),
messageId: 'missingAccessibility',
data: {
type: nodeType,
@@ -299,7 +249,7 @@ exports.default = (0, util_1.createRule)({
case 'explicit': {
if (!node.accessibility) {
context.report({
loc: getMissingAccessibilityReportLocForParameterProperty(node, nodeName),
loc: (0, getMemberHeadLoc_1.getParameterPropertyHeadLoc)(context.sourceCode, node, nodeName),
messageId: 'missingAccessibility',
data: {
type: nodeType,
File diff suppressed because one or more lines are too long
@@ -26,6 +26,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
function createDataType(type) {
const isErrorType = tsutils.isIntrinsicErrorType(type);
return isErrorType ? '`error` typed' : '`any`';
}
exports.default = (0, util_1.createRule)({
name: 'no-unsafe-member-access',
meta: {
@@ -36,12 +40,12 @@ exports.default = (0, util_1.createRule)({
requiresTypeChecking: true,
},
messages: {
unsafeMemberExpression: 'Unsafe member access {{property}} on an `any` value.',
unsafeMemberExpression: 'Unsafe member access {{property}} on an {{type}} value.',
unsafeThisMemberExpression: [
'Unsafe member access {{property}} on an `any` value. `this` is typed as `any`.',
'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.',
].join('\n'),
unsafeComputedMemberAccess: 'Computed name {{property}} resolves to an any value.',
unsafeComputedMemberAccess: 'Computed name {{property}} resolves to an {{type}} value.',
},
schema: [],
},
@@ -84,6 +88,7 @@ exports.default = (0, util_1.createRule)({
messageId,
data: {
property: node.computed ? `[${propertyName}]` : `.${propertyName}`,
type: createDataType(type),
},
});
}
@@ -111,6 +116,7 @@ exports.default = (0, util_1.createRule)({
messageId: 'unsafeComputedMemberAccess',
data: {
property: `[${propertyName}]`,
type: createDataType(type),
},
});
}
@@ -1 +1 @@
{"version":3,"file":"no-unsafe-member-access.js","sourceRoot":"","sources":["../../src/rules/no-unsafe-member-access.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,sDAAwC;AAExC,kCAMiB;AAOjB,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,mDAAmD;YAChE,WAAW,EAAE,aAAa;YAC1B,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,sBAAsB,EACpB,sDAAsD;YACxD,0BAA0B,EAAE;gBAC1B,gFAAgF;gBAChF,2HAA2H;aAC5H,CAAC,IAAI,CAAC,IAAI,CAAC;YACZ,0BAA0B,EACxB,sDAAsD;SACzD;QAC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EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,YAAY,EAAE;wBAClE,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC;qBAC3B;iBACF,CAAC,CAAC;YACL,CAAC;YAED,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO;YACL,qFAAqF;YACrF,iEAAiE,EAC/D,qBAAqB;YACvB,gDAAgD,CAC9C,IAAyB;gBAEzB;gBACE,OAAO;gBACP,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO;oBACpC,oBAAoB;oBACpB,+FAA+F;oBAC/F,uEAAuE;oBACvE,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB,EAC7C,CAAC;oBACD,6DAA6D;oBAC7D,OAAO;gBACT,CAAC;gBAED,MAAM,IAAI,GAAG,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBAE9C,IAAI,IAAA,oBAAa,EAAC,IAAI,CAAC,EAAE,CAAC;oBACxB,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACtD,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,4BAA4B;wBACvC,IAAI,EAAE;4BACJ,QAAQ,EAAE,IAAI,YAAY,GAAG;4BAC7B,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC;yBAC3B;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -27,6 +27,7 @@ const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getMemberHeadLoc_1 = require("../util/getMemberHeadLoc");
const functionScopeBoundaries = [
utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
utils_1.AST_NODE_TYPES.FunctionDeclaration,
@@ -121,12 +122,6 @@ exports.default = (0, util_1.createRule)({
return tsutils.isFunctionScopeBoundary(tsNode);
}
function getEsNodesFromViolatingNode(violatingNode) {
if (ts.isParameterPropertyDeclaration(violatingNode, violatingNode.parent)) {
return {
esNode: services.tsNodeToESTreeNodeMap.get(violatingNode.name),
nameNode: services.tsNodeToESTreeNodeMap.get(violatingNode.name),
};
}
return {
esNode: services.tsNodeToESTreeNodeMap.get(violatingNode),
nameNode: services.tsNodeToESTreeNodeMap.get(violatingNode.name),
@@ -140,13 +135,27 @@ exports.default = (0, util_1.createRule)({
const finalizedClassScope = (0, util_1.nullThrows)(classScopeStack.pop(), 'Stack should exist on class exit');
for (const violatingNode of finalizedClassScope.finalizeUnmodifiedPrivateNonReadonlys()) {
const { esNode, nameNode } = getEsNodesFromViolatingNode(violatingNode);
const reportNodeOrLoc = (() => {
switch (esNode.type) {
case utils_1.AST_NODE_TYPES.MethodDefinition:
case utils_1.AST_NODE_TYPES.PropertyDefinition:
case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
return { loc: (0, getMemberHeadLoc_1.getMemberHeadLoc)(context.sourceCode, esNode) };
case utils_1.AST_NODE_TYPES.TSParameterProperty:
return {
loc: (0, getMemberHeadLoc_1.getParameterPropertyHeadLoc)(context.sourceCode, esNode, nameNode.name),
};
default:
return { node: esNode };
}
})();
context.report({
...reportNodeOrLoc,
data: {
name: context.sourceCode.getText(nameNode),
},
fix: fixer => fixer.insertTextBefore(nameNode, 'readonly '),
messageId: 'preferReadonly',
node: esNode,
});
}
},
File diff suppressed because one or more lines are too long
+36 -2
View File
@@ -32,7 +32,7 @@ exports.default = (0, util_1.createRule)({
name: 'return-await',
meta: {
docs: {
description: 'Enforce consistent returning of awaited values',
description: 'Enforce consistent awaiting of returned promises',
requiresTypeChecking: true,
extendsBaseRule: 'no-return-await',
},
@@ -67,6 +67,39 @@ exports.default = (0, util_1.createRule)({
function exitFunction() {
scopeInfoStack.pop();
}
function affectsExplicitResourceManagement(node) {
// just need to determine if there is a `using` declaration in scope.
let scope = context.sourceCode.getScope(node);
const functionScope = scope.variableScope;
while (true) {
for (const variable of scope.variables) {
if (variable.defs.length !== 1) {
// This can't be the case for `using` or `await using` since it's
// an error to redeclare those more than once in the same scope,
// unlike, say, `var` declarations.
continue;
}
const declaration = variable.defs[0];
const declaratorNode = declaration.node;
const declarationNode = declaratorNode.parent;
// if it's a using/await using declaration, and it comes _before_ the
// node we're checking, it affects control flow for that node.
if (['using', 'await using'].includes(declarationNode.kind) &&
declaratorNode.range[1] < node.range[0]) {
return true;
}
}
if (scope === functionScope) {
// We've checked all the relevant scopes
break;
}
// This should always exist, since the rule should only be checking
// contexts in which `return` statements are legal, which should always
// be inside a function.
scope = (0, util_1.nullThrows)(scope.upper, 'Expected parent scope to exist. return-await should only operate on return statements within functions');
}
return false;
}
/**
* Tests whether a node is inside of an explicit error handling context
* (try/catch/finally) in a way that throwing an exception will have an
@@ -201,7 +234,8 @@ exports.default = (0, util_1.createRule)({
});
return;
}
const affectsErrorHandling = affectsExplicitErrorHandling(expression);
const affectsErrorHandling = affectsExplicitErrorHandling(expression) ||
affectsExplicitResourceManagement(node);
const useAutoFix = !affectsErrorHandling;
if (option === 'always') {
if (!isAwait && isThenable) {
File diff suppressed because one or more lines are too long
@@ -0,0 +1,81 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParameterPropertyHeadLoc = exports.getMemberHeadLoc = void 0;
const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils");
/**
* Generates report loc suitable for reporting on how a class member is
* declared, rather than how it's implemented.
*
* ```ts
* class A {
* abstract method(): void;
* ~~~~~~~~~~~~~~~
*
* concreteMethod(): void {
* ~~~~~~~~~~~~~~
* // code
* }
*
* abstract private property?: string;
* ~~~~~~~~~~~~~~~~~~~~~~~~~
*
* @decorator override concreteProperty = 'value';
* ~~~~~~~~~~~~~~~~~~~~~~~~~
* }
* ```
*/
function getMemberHeadLoc(sourceCode, node) {
let start;
if (node.decorators.length === 0) {
start = node.loc.start;
}
else {
const lastDecorator = node.decorators[node.decorators.length - 1];
const nextToken = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(lastDecorator), eslint_utils_1.NullThrowsReasons.MissingToken('token', 'last decorator'));
start = nextToken.loc.start;
}
let end;
if (!node.computed) {
end = node.key.loc.end;
}
else {
const closingBracket = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(node.key, token => token.value === ']'), eslint_utils_1.NullThrowsReasons.MissingToken(']', node.type));
end = closingBracket.loc.end;
}
return {
start: structuredClone(start),
end: structuredClone(end),
};
}
exports.getMemberHeadLoc = getMemberHeadLoc;
/**
* Generates report loc suitable for reporting on how a parameter property is
* declared.
*
* ```ts
* class A {
* constructor(private property: string = 'value') {
* ~~~~~~~~~~~~~~~~
* }
* ```
*/
function getParameterPropertyHeadLoc(sourceCode, node, nodeName) {
// Parameter properties have a weirdly different AST structure
// than other class members.
let start;
if (node.decorators.length === 0) {
start = structuredClone(node.loc.start);
}
else {
const lastDecorator = node.decorators[node.decorators.length - 1];
const nextToken = (0, eslint_utils_1.nullThrows)(sourceCode.getTokenAfter(lastDecorator), eslint_utils_1.NullThrowsReasons.MissingToken('token', 'last decorator'));
start = structuredClone(nextToken.loc.start);
}
const end = sourceCode.getLocFromIndex(node.parameter.range[0] + nodeName.length);
return {
start,
end,
};
}
exports.getParameterPropertyHeadLoc = getParameterPropertyHeadLoc;
//# sourceMappingURL=getMemberHeadLoc.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getMemberHeadLoc.js","sourceRoot":"","sources":["../../src/util/getMemberHeadLoc.ts"],"names":[],"mappings":";;;AACA,wEAG+C;AAE/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,gBAAgB,CAC9B,UAAyC,EACzC,IAIyC;IAEzC,IAAI,KAAwB,CAAC;IAE7B,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,KAAK,GAAG,IAAI,CAAC,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K,CAAC,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAClE,MAAM,SAAS,GAAG,IAAA,yBAAU,EAC1B,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,EACvC,gCAAiB,CAAC,YAAY,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAC1D,CAAC;QACF,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CACpC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAC1C,CAAC;IAEF,OAAO;QACL,KAAK;QACL,GAAG;KACJ,CAAC;AACJ,CAAC;AA7BD,kEA6BC"}
+17 -6
View File
@@ -1,5 +1,5 @@
---
description: 'Enforce consistent returning of awaited values.'
description: 'Enforce consistent awaiting of returned promises.'
---
import Tabs from '@theme/Tabs';
@@ -9,12 +9,14 @@ import TabItem from '@theme/TabItem';
>
> See **https://typescript-eslint.io/rules/return-await** for documentation.
Returning an awaited promise can make sense for better stack trace information as well as for consistent error handling (returned promises will not be caught in an async function try/catch).
This rule builds on top of the [`eslint/no-return-await`](https://eslint.org/docs/rules/no-return-await) rule.
It expands upon the base rule to add support for optionally requiring `return await` in certain cases.
The extended rule is named `return-await` instead of `no-return-await` because the extended rule can enforce the positive or the negative. Additionally, while the core rule is now deprecated, the extended rule is still useful in many contexts.
The extended rule is named `return-await` instead of `no-return-await` because the extended rule can enforce the positive or the negative. Additionally, while the core rule is now deprecated, the extended rule is still useful in many contexts:
- Returning an awaited promise [improves stack trace information](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#improving_stack_trace).
- When the `return` statement is in `try...catch`, awaiting the promise also allows the promise's rejection to be caught instead of leaving the error to the caller.
- Contrary to popular belief, `return await promise;` is [at least as fast as directly returning the promise](https://github.com/tc39/proposal-faster-promise-adoption).
## Options
@@ -35,8 +37,7 @@ Listing the error-handling cases exhaustively:
- if you `return` a promise within a `catch`, and there is _no_ `finally`, then it must _not_ be `await`ed.
- if you `return` a promise within a `catch`, and there _is_ a `finally`, then it _must_ be `await`ed.
- if you `return` a promise within a `finally`, then it must not be `await`ed.
Examples of code with `in-try-catch`:
- if you `return` a promise between a `using` or `await using` declaration and the end of its scope, it must be `await`ed, since it behaves equivalently to code wrapped in a `try` block.
<Tabs>
<TabItem value="❌ Incorrect">
@@ -95,6 +96,11 @@ async function invalidInTryCatch5() {
async function invalidInTryCatch6() {
return await 'value';
}
async function invalidInTryCatch7() {
using x = createDisposable();
return Promise.reject('using in scope');
}
```
</TabItem>
@@ -151,6 +157,11 @@ async function validInTryCatch5() {
async function validInTryCatch6() {
return 'value';
}
async function validInTryCatch7() {
using x = createDisposable();
return await Promise.reject('using in scope');
}
```
</TabItem>
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin",
"version": "7.13.0",
"version": "7.13.1",
"description": "TypeScript plugin for ESLint",
"files": [
"dist",
@@ -60,10 +60,10 @@
},
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/type-utils": "7.13.0",
"@typescript-eslint/utils": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"@typescript-eslint/scope-manager": "7.13.1",
"@typescript-eslint/type-utils": "7.13.1",
"@typescript-eslint/utils": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
@@ -74,8 +74,8 @@
"@types/marked": "^5.0.2",
"@types/mdast": "^4.0.3",
"@types/natural-compare": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "7.13.0",
"@typescript-eslint/rule-tester": "7.13.0",
"@typescript-eslint/rule-schema-to-typescript-types": "7.13.1",
"@typescript-eslint/rule-tester": "7.13.1",
"ajv": "^6.12.6",
"cross-env": "^7.0.3",
"cross-fetch": "*",
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/parser",
"version": "7.13.0",
"version": "7.13.1",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
@@ -52,10 +52,10 @@
"eslint": "^8.56.0"
},
"dependencies": {
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"@typescript-eslint/scope-manager": "7.13.1",
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/typescript-estree": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1",
"debug": "^4.3.4"
},
"devDependencies": {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/scope-manager",
"version": "7.13.0",
"version": "7.13.1",
"description": "TypeScript scope analyser for ESLint",
"files": [
"dist",
@@ -46,13 +46,13 @@
"typecheck": "npx nx typecheck"
},
"dependencies": {
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0"
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1"
},
"devDependencies": {
"@jest/types": "29.6.3",
"@types/glob": "*",
"@typescript-eslint/typescript-estree": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.1",
"glob": "*",
"jest-specific-snapshot": "*",
"make-dir": "*",
+3 -1
View File
@@ -12,5 +12,7 @@ export declare function getTypeFlags(type: ts.Type): ts.TypeFlags;
* parts and get the flags of every union constituent. If this is not desired,
* use the `isTypeFlag` function from tsutils.
*/
export declare function isTypeFlagSet(type: ts.Type, flagsToCheck: ts.TypeFlags, isReceiver?: boolean): boolean;
export declare function isTypeFlagSet(type: ts.Type, flagsToCheck: ts.TypeFlags,
/** @deprecated This params is not used and will be removed in the future.*/
isReceiver?: boolean): boolean;
//# sourceMappingURL=typeFlagUtils.d.ts.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"typeFlagUtils.d.ts","sourceRoot":"","sources":["../src/typeFlagUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,SAAS,CAOxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,YAAY,EAAE,EAAE,CAAC,SAAS,EAC1B,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CAQT"}
{"version":3,"file":"typeFlagUtils.d.ts","sourceRoot":"","sources":["../src/typeFlagUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,SAAS,CAOxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,YAAY,EAAE,EAAE,CAAC,SAAS;AAC1B,4EAA4E;AAC5E,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CAST"}
+4 -1
View File
@@ -48,8 +48,11 @@ exports.getTypeFlags = getTypeFlags;
* parts and get the flags of every union constituent. If this is not desired,
* use the `isTypeFlag` function from tsutils.
*/
function isTypeFlagSet(type, flagsToCheck, isReceiver) {
function isTypeFlagSet(type, flagsToCheck,
/** @deprecated This params is not used and will be removed in the future.*/
isReceiver) {
const flags = getTypeFlags(type);
// eslint-disable-next-line deprecation/deprecation -- not used
if (isReceiver && flags & ANY_OR_UNKNOWN) {
return true;
}
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"typeFlagUtils.js","sourceRoot":"","sources":["../src/typeFlag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OAAO,KAAK,CAAC;AACf,CAAC;AAPD,oCAOC;AAED;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAC3B,IAAa,EACb,YAA0B;AAC1B,4EAA4E;AAC5E,UAAoB;IAEpB,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAEjC,+DAA+D;IAC/D,IAAI,UAAU,IAAI,KAAK,GAAG,cAAc,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC;AAdD,sCAcC"}
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/type-utils",
"version": "7.13.0",
"version": "7.13.1",
"description": "Type utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@@ -46,14 +46,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@typescript-eslint/typescript-estree": "7.13.0",
"@typescript-eslint/utils": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.1",
"@typescript-eslint/utils": "7.13.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.3.0"
},
"devDependencies": {
"@jest/types": "29.6.3",
"@typescript-eslint/parser": "7.13.0",
"@typescript-eslint/parser": "7.13.1",
"ajv": "^6.12.6",
"downlevel-dts": "*",
"jest": "29.7.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/types",
"version": "7.13.0",
"version": "7.13.1",
"description": "Types for the TypeScript-ESTree AST spec",
"files": [
"dist",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/typescript-estree",
"version": "7.13.0",
"version": "7.13.1",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
@@ -54,8 +54,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/visitor-keys": "7.13.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/utils",
"version": "7.13.0",
"version": "7.13.1",
"description": "Utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@@ -68,9 +68,9 @@
},
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.0"
"@typescript-eslint/scope-manager": "7.13.1",
"@typescript-eslint/types": "7.13.1",
"@typescript-eslint/typescript-estree": "7.13.1"
},
"peerDependencies": {
"eslint": "^8.56.0"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/visitor-keys",
"version": "7.13.0",
"version": "7.13.1",
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [
"dist",
@@ -47,7 +47,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/types": "7.13.1",
"eslint-visitor-keys": "^3.4.3"
},
"devDependencies": {
+1 -1
View File
@@ -4,7 +4,7 @@
[![GitHub Actions CI](https://github.com/microsoft/TypeScript/workflows/CI/badge.svg)](https://github.com/microsoft/TypeScript/actions?query=workflow%3ACI)
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
+5
View File
@@ -26,3 +26,8 @@ interface FileSystemDirectoryHandle {
keys(): AsyncIterableIterator<string>;
values(): AsyncIterableIterator<FileSystemHandle>;
}
interface ReadableStream<R = any> {
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
}
+211 -33
View File
@@ -219,6 +219,9 @@ interface ChannelSplitterOptions extends AudioNodeOptions {
interface CheckVisibilityOptions {
checkOpacity?: boolean;
checkVisibilityCSS?: boolean;
contentVisibilityAuto?: boolean;
opacityProperty?: boolean;
visibilityProperty?: boolean;
}
interface ClientQueryOptions {
@@ -285,6 +288,10 @@ interface ConstrainULongRange extends ULongRange {
ideal?: number;
}
interface ContentVisibilityAutoStateChangeEventInit extends EventInit {
skipped?: boolean;
}
interface ConvolverOptions extends AudioNodeOptions {
buffer?: AudioBuffer | null;
disableNormalization?: boolean;
@@ -574,6 +581,8 @@ interface GainOptions extends AudioNodeOptions {
interface GamepadEffectParameters {
duration?: number;
leftTrigger?: number;
rightTrigger?: number;
startDelay?: number;
strongMagnitude?: number;
weakMagnitude?: number;
@@ -1376,8 +1385,8 @@ interface RTCIceCandidateInit {
}
interface RTCIceCandidatePair {
local?: RTCIceCandidate;
remote?: RTCIceCandidate;
local: RTCIceCandidate;
remote: RTCIceCandidate;
}
interface RTCIceCandidatePairStats extends RTCStats {
@@ -1637,6 +1646,17 @@ interface ReadableStreamGetReaderOptions {
mode?: ReadableStreamReaderMode;
}
interface ReadableStreamIteratorOptions {
/**
* Asynchronously iterates over the chunks in the stream's internal queue.
*
* Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's return() method is called, e.g. by breaking out of the loop.
*
* By default, calling the async iterator's return() method will also cancel the stream. To prevent this, use the stream's values() method, passing true for the preventCancel option.
*/
preventCancel?: boolean;
}
interface ReadableStreamReadDoneResult<T> {
done: true;
value?: T;
@@ -1768,21 +1788,22 @@ interface ScrollToOptions extends ScrollOptions {
interface SecurityPolicyViolationEventInit extends EventInit {
blockedURI?: string;
columnNumber?: number;
disposition: SecurityPolicyViolationEventDisposition;
documentURI: string;
effectiveDirective: string;
disposition?: SecurityPolicyViolationEventDisposition;
documentURI?: string;
effectiveDirective?: string;
lineNumber?: number;
originalPolicy: string;
originalPolicy?: string;
referrer?: string;
sample?: string;
sourceFile?: string;
statusCode: number;
violatedDirective: string;
statusCode?: number;
violatedDirective?: string;
}
interface ShadowRootInit {
delegatesFocus?: boolean;
mode: ShadowRootMode;
serializable?: boolean;
slotAssignment?: SlotAssignmentMode;
}
@@ -2207,6 +2228,8 @@ interface ARIAMixin {
ariaAtomic: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaAutoComplete) */
ariaAutoComplete: string | null;
ariaBrailleLabel: string | null;
ariaBrailleRoleDescription: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaBusy) */
ariaBusy: string | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaChecked) */
@@ -2339,6 +2362,8 @@ declare var AbortSignal: {
new(): AbortSignal;
/** [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/any_static) */
any(signals: AbortSignal[]): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
timeout(milliseconds: number): AbortSignal;
};
@@ -3788,6 +3813,16 @@ declare var CSSScale: {
new(x: CSSNumberish, y: CSSNumberish, z?: CSSNumberish): CSSScale;
};
interface CSSScopeRule extends CSSGroupingRule {
readonly end: string | null;
readonly start: string | null;
}
declare var CSSScopeRule: {
prototype: CSSScopeRule;
new(): CSSScopeRule;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew) */
interface CSSSkew extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew/ax) */
@@ -3823,6 +3858,15 @@ declare var CSSSkewY: {
new(ay: CSSNumericValue): CSSSkewY;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStartingStyleRule) */
interface CSSStartingStyleRule extends CSSGroupingRule {
}
declare var CSSStartingStyleRule: {
prototype: CSSStartingStyleRule;
new(): CSSStartingStyleRule;
};
/**
* An object that is a CSS declaration block, and exposes style information and various style-related methods and properties.
*
@@ -4048,6 +4092,7 @@ interface CSSStyleDeclaration {
clipRule: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color) */
color: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) */
colorInterpolation: string;
colorInterpolationFilters: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-scheme) */
@@ -4092,6 +4137,8 @@ interface CSSStyleDeclaration {
containerType: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/content) */
content: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/content-visibility) */
contentVisibility: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/counter-increment) */
counterIncrement: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/counter-reset) */
@@ -4593,6 +4640,8 @@ interface CSSStyleDeclaration {
textUnderlinePosition: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-wrap) */
textWrap: string;
textWrapMode: string;
textWrapStyle: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/top) */
top: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/touch-action) */
@@ -4607,6 +4656,8 @@ interface CSSStyleDeclaration {
transformStyle: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/transition) */
transition: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/transition-behavior) */
transitionBehavior: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/transition-delay) */
transitionDelay: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/transition-duration) */
@@ -5028,6 +5079,8 @@ interface CSSStyleDeclaration {
webkitUserSelect: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/white-space) */
whiteSpace: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/white-space-collapse) */
whiteSpaceCollapse: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/widows) */
widows: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/width) */
@@ -5046,6 +5099,8 @@ interface CSSStyleDeclaration {
y: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/z-index) */
zIndex: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/zoom) */
zoom: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyPriority) */
getPropertyPriority(property: string): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleDeclaration/getPropertyValue) */
@@ -5809,6 +5864,17 @@ declare var ConstantSourceNode: {
new(context: BaseAudioContext, options?: ConstantSourceOptions): ConstantSourceNode;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContentVisibilityAutoStateChangeEvent) */
interface ContentVisibilityAutoStateChangeEvent extends Event {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContentVisibilityAutoStateChangeEvent/skipped) */
readonly skipped: boolean;
}
declare var ContentVisibilityAutoStateChangeEvent: {
prototype: ContentVisibilityAutoStateChangeEvent;
new(type: string, eventInitDict?: ContentVisibilityAutoStateChangeEventInit): ContentVisibilityAutoStateChangeEvent;
};
/**
* An AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output.
*
@@ -5970,6 +6036,16 @@ declare var CustomEvent: {
new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */
interface CustomStateSet {
forEach(callbackfn: (value: string, key: string, parent: CustomStateSet) => void, thisArg?: any): void;
}
declare var CustomStateSet: {
prototype: CustomStateSet;
new(): CustomStateSet;
};
/**
* An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
*
@@ -7158,6 +7234,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent;
createEvent(eventInterface: "CloseEvent"): CloseEvent;
createEvent(eventInterface: "CompositionEvent"): CompositionEvent;
createEvent(eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent;
createEvent(eventInterface: "CustomEvent"): CustomEvent;
createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
@@ -7419,6 +7496,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
declare var Document: {
prototype: Document;
new(): Document;
parseHTMLUnsafe(html: string): Document;
};
/**
@@ -7869,6 +7947,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non
setAttributeNode(attr: Attr): Attr | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS) */
setAttributeNodeNS(attr: Attr): Attr | null;
setHTMLUnsafe(html: string): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture) */
setPointerCapture(pointerId: number): void;
/**
@@ -7933,6 +8012,8 @@ interface ElementInternals extends ARIAMixin {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ElementInternals/shadowRoot)
*/
readonly shadowRoot: ShadowRoot | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ElementInternals/states) */
readonly states: CustomStateSet;
/**
* Returns the error message that would be shown to the user if internals's target element was to be checked for validity.
*
@@ -8711,7 +8792,6 @@ declare var GainNode: {
/**
* This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad)
*/
@@ -8730,7 +8810,7 @@ interface Gamepad {
readonly mapping: GamepadMappingType;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/timestamp) */
readonly timestamp: DOMHighResTimeStamp;
readonly vibrationActuator: GamepadHapticActuator | null;
readonly vibrationActuator: GamepadHapticActuator;
}
declare var Gamepad: {
@@ -8740,7 +8820,6 @@ declare var Gamepad: {
/**
* An individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadButton)
*/
@@ -8760,7 +8839,6 @@ declare var GamepadButton: {
/**
* This Gamepad API interface contains references to gamepads connected to the system, which is what the gamepad events Window.gamepadconnected and Window.gamepaddisconnected are fired in response to.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadEvent)
*/
@@ -8780,8 +8858,6 @@ declare var GamepadEvent: {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator)
*/
interface GamepadHapticActuator {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/type) */
readonly type: GamepadHapticActuatorType;
playEffect(type: GamepadHapticEffectType, params?: GamepadEffectParameters): Promise<GamepadHapticsResult>;
reset(): Promise<GamepadHapticsResult>;
}
@@ -9492,6 +9568,7 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/name)
*/
name: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/ping) */
ping: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/referrerPolicy) */
referrerPolicy: string;
@@ -9569,6 +9646,7 @@ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/noHref)
*/
noHref: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/ping) */
ping: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLAreaElement/referrerPolicy) */
referrerPolicy: string;
@@ -10164,7 +10242,11 @@ declare var HTMLElement: {
interface HTMLEmbedElement extends HTMLElement {
/** @deprecated */
align: string;
/** Sets or retrieves the height of the object. */
/**
* Sets or retrieves the height of the object.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement/height)
*/
height: string;
/**
* Sets or retrieves the name of the object.
@@ -10174,7 +10256,11 @@ interface HTMLEmbedElement extends HTMLElement {
/** Sets or retrieves a URL to be loaded by the object. */
src: string;
type: string;
/** Sets or retrieves the width of the object. */
/**
* Sets or retrieves the width of the object.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLEmbedElement/width)
*/
width: string;
getSVGDocument(): Document | null;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -10747,6 +10833,7 @@ interface HTMLIFrameElement extends HTMLElement {
*/
align: string;
allow: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allowFullscreen) */
allowFullscreen: boolean;
/**
* Retrieves the document object of the page or frame.
@@ -10773,6 +10860,7 @@ interface HTMLIFrameElement extends HTMLElement {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/height)
*/
height: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/loading) */
loading: string;
/**
* Sets or retrieves a URI to a long description of the object.
@@ -11012,7 +11100,11 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement {
checked: boolean;
/** Sets or retrieves the state of the check box or radio button. */
defaultChecked: boolean;
/** Sets or retrieves the initial contents of the object. */
/**
* Sets or retrieves the initial contents of the object.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/defaultValue)
*/
defaultValue: string;
dirName: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/disabled) */
@@ -11071,12 +11163,25 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/list)
*/
readonly list: HTMLDataListElement | null;
/** Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. */
/**
* Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/max)
*/
max: string;
/** Sets or retrieves the maximum number of characters that the user can enter in a text control. */
/**
* Sets or retrieves the maximum number of characters that the user can enter in a text control.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/maxLength)
*/
maxLength: number;
/** Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. */
/**
* Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/min)
*/
min: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/minLength) */
minLength: number;
/**
* Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
@@ -11107,16 +11212,28 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement {
required: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionDirection) */
selectionDirection: "forward" | "backward" | "none" | null;
/** Gets or sets the end position or offset of a text selection. */
/**
* Gets or sets the end position or offset of a text selection.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionEnd)
*/
selectionEnd: number | null;
/** Gets or sets the starting position or offset of a text selection. */
/**
* Gets or sets the starting position or offset of a text selection.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionStart)
*/
selectionStart: number | null;
size: number;
/** The address or URL of the a media resource that is to be considered. */
src: string;
/** Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. */
step: string;
/** Returns the content type of the object. */
/**
* Returns the content type of the object.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/type)
*/
type: string;
/**
* Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
@@ -11135,7 +11252,11 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/validity)
*/
readonly validity: ValidityState;
/** Returns the value of the data at the cursor's current position. */
/**
* Returns the value of the data at the cursor's current position.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/value)
*/
value: string;
/** Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based. */
valueAsDate: Date | null;
@@ -11695,16 +11816,31 @@ declare var HTMLMenuElement: {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement)
*/
interface HTMLMetaElement extends HTMLElement {
/** Gets or sets meta-information to associate with httpEquiv or name. */
/**
* Gets or sets meta-information to associate with httpEquiv or name.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/content)
*/
content: string;
/** Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header. */
/**
* Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/httpEquiv)
*/
httpEquiv: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/media) */
media: string;
/** Sets or retrieves the value specified in the content attribute of the meta object. */
/**
* Sets or retrieves the value specified in the content attribute of the meta object.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/name)
*/
name: string;
/**
* Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
* @deprecated
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/scheme)
*/
scheme: string;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -11916,6 +12052,7 @@ interface HTMLObjectElement extends HTMLElement {
type: string;
/**
* Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
* @deprecated
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/useMap)
*/
@@ -12470,7 +12607,7 @@ interface HTMLSelectElement extends HTMLElement {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/type)
*/
readonly type: string;
readonly type: "select-one" | "select-multiple";
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*
@@ -12582,6 +12719,7 @@ declare var HTMLSlotElement: {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement)
*/
interface HTMLSourceElement extends HTMLElement {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/height) */
height: number;
/**
* Gets or sets the intended media type of the media source.
@@ -12605,6 +12743,7 @@ interface HTMLSourceElement extends HTMLElement {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/type)
*/
type: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSourceElement/width) */
width: number;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -13246,7 +13385,11 @@ interface HTMLTextAreaElement extends HTMLElement {
selectionStart: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/textLength) */
readonly textLength: number;
/** Retrieves the type of control. */
/**
* Retrieves the type of control.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/type)
*/
readonly type: string;
/** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */
readonly validationMessage: string;
@@ -13469,11 +13612,13 @@ interface HTMLVideoElement extends HTMLMediaElement {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/width)
*/
width: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/cancelVideoFrameCallback) */
cancelVideoFrameCallback(handle: number): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/getVideoPlaybackQuality) */
getVideoPlaybackQuality(): VideoPlaybackQuality;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/requestPictureInPicture) */
requestPictureInPicture(): Promise<PictureInPictureWindow>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/requestVideoFrameCallback) */
requestVideoFrameCallback(callback: VideoFrameRequestCallback): number;
addEventListener<K extends keyof HTMLVideoElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -14555,6 +14700,29 @@ declare var KeyframeEffect: {
new(source: KeyframeEffect): KeyframeEffect;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint) */
interface LargestContentfulPaint extends PerformanceEntry {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/element) */
readonly element: Element | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/id) */
readonly id: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/loadTime) */
readonly loadTime: DOMHighResTimeStamp;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/renderTime) */
readonly renderTime: DOMHighResTimeStamp;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/size) */
readonly size: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/url) */
readonly url: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LargestContentfulPaint/toJSON) */
toJSON(): any;
}
declare var LargestContentfulPaint: {
prototype: LargestContentfulPaint;
new(): LargestContentfulPaint;
};
interface LinkStyle {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/sheet) */
readonly sheet: CSSStyleSheet | null;
@@ -21392,6 +21560,8 @@ interface ShadowRootEventMap {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot) */
interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/clonable) */
readonly clonable: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/delegatesFocus) */
readonly delegatesFocus: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/host) */
@@ -21401,6 +21571,7 @@ interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
onslotchange: ((this: ShadowRoot, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/slotAssignment) */
readonly slotAssignment: SlotAssignmentMode;
setHTMLUnsafe(html: string): void;
/** Throws a "NotSupportedError" DOMException if context object is a shadow root. */
addEventListener<K extends keyof ShadowRootEventMap>(type: K, listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -25921,7 +26092,11 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler
readonly window: Window & typeof globalThis;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/alert) */
alert(message?: any): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/blur) */
/**
* @deprecated
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/blur)
*/
blur(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/cancelIdleCallback) */
cancelIdleCallback(handle: number): void;
@@ -27546,7 +27721,11 @@ declare var visualViewport: VisualViewport | null;
declare var window: Window & typeof globalThis;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/alert) */
declare function alert(message?: any): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/blur) */
/**
* @deprecated
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/blur)
*/
declare function blur(): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/cancelIdleCallback) */
declare function cancelIdleCallback(handle: number): void;
@@ -28293,8 +28472,7 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
type FontFaceSetLoadStatus = "loaded" | "loading";
type FullscreenNavigationUI = "auto" | "hide" | "show";
type GamepadHapticActuatorType = "vibration";
type GamepadHapticEffectType = "dual-rumble";
type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble";
type GamepadHapticsResult = "complete" | "preempted";
type GamepadMappingType = "" | "standard" | "xr-standard";
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
+8
View File
@@ -20,6 +20,11 @@ and limitations under the License.
/// Window Iterable APIs
/////////////////////////////
interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}
interface AudioParam {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
@@ -83,6 +88,9 @@ interface CanvasPathDrawingStyles {
setLineDash(segments: Iterable<number>): void;
}
interface CustomStateSet extends Set<string> {
}
interface DOMRectList {
[Symbol.iterator](): IterableIterator<DOMRect>;
}
+40
View File
@@ -60,6 +60,8 @@ interface Array<T> {
* @param end If not specified, length of the this object is used as its default value.
*/
copyWithin(target: number, start: number, end?: number): this;
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
}
interface ArrayConstructor {
@@ -360,6 +362,8 @@ interface ReadonlyArray<T> {
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number;
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
}
interface RegExp {
@@ -555,3 +559,39 @@ interface StringConstructor {
*/
raw(template: { raw: readonly string[] | ArrayLike<string>; }, ...substitutions: any[]): string;
}
interface Int8Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Uint8Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Uint8ClampedArray {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Int16Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Uint16Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Int32Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Uint32Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Float32Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
interface Float64Array {
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
}
+16 -4
View File
@@ -55,10 +55,22 @@ declare namespace Intl {
const PluralRules: PluralRulesConstructor;
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";
type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType;
interface NumberFormatPartTypeRegistry {
literal: never;
nan: never;
infinity: never;
percent: never;
integer: never;
group: never;
decimal: never;
fraction: never;
plusSign: never;
minusSign: never;
percentSign: never;
currency: never;
}
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
interface NumberFormatPart {
type: NumberFormatPartTypes;
+1 -1
View File
@@ -18,6 +18,6 @@ and limitations under the License.
declare namespace Intl {
interface DateTimeFormatPartTypesRegistry {
unknown: any;
unknown: never;
}
}
+2 -3
View File
@@ -369,7 +369,7 @@ interface BigInt64Array {
subarray(begin?: number, end?: number): BigInt64Array;
/** Converts the array to a string by using the current locale. */
toLocaleString(): string;
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
/** Returns a string representation of the array. */
toString(): string;
@@ -641,7 +641,7 @@ interface BigUint64Array {
subarray(begin?: number, end?: number): BigUint64Array;
/** Converts the array to a string by using the current locale. */
toLocaleString(): string;
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
/** Returns a string representation of the array. */
toString(): string;
@@ -723,6 +723,5 @@ interface DataView {
declare namespace Intl {
interface NumberFormat {
format(value: number | bigint): string;
resolvedOptions(): ResolvedNumberFormatOptions;
}
}
+32 -7
View File
@@ -241,24 +241,49 @@ declare namespace Intl {
): UnicodeBCP47LocaleIdentifier[];
};
interface NumberFormatOptionsStyleRegistry {
unit: never;
}
interface NumberFormatOptionsCurrencyDisplayRegistry {
narrowSymbol: never;
}
interface NumberFormatOptionsSignDisplayRegistry {
auto: never;
never: never;
always: never;
exceptZero: never;
}
type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry;
interface NumberFormatOptions {
numberingSystem?: string | undefined;
compactDisplay?: "short" | "long" | undefined;
notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
signDisplay?: "auto" | "never" | "always" | "exceptZero" | undefined;
signDisplay?: NumberFormatOptionsSignDisplay | undefined;
unit?: string | undefined;
unitDisplay?: "short" | "long" | "narrow" | undefined;
currencyDisplay?: string | undefined;
currencySign?: string | undefined;
currencySign?: "standard" | "accounting" | undefined;
}
interface ResolvedNumberFormatOptions {
compactDisplay?: "short" | "long";
notation?: "standard" | "scientific" | "engineering" | "compact";
signDisplay?: "auto" | "never" | "always" | "exceptZero";
notation: "standard" | "scientific" | "engineering" | "compact";
signDisplay: NumberFormatOptionsSignDisplay;
unit?: string;
unitDisplay?: "short" | "long" | "narrow";
currencyDisplay?: string;
currencySign?: string;
currencySign?: "standard" | "accounting";
}
interface NumberFormatPartTypeRegistry {
compact: never;
exponentInteger: never;
exponentMinusSign: never;
exponentSeparator: never;
unit: never;
unknown: never;
}
interface DateTimeFormatOptions {
+1 -1
View File
@@ -60,7 +60,7 @@ interface FinalizationRegistry<T> {
* @param unregisterToken The token that was used as the unregisterToken argument when calling
* register to register the target value.
*/
unregister(unregisterToken: WeakKey): void;
unregister(unregisterToken: WeakKey): boolean;
}
interface FinalizationRegistryConstructor {
+1 -1
View File
@@ -32,7 +32,7 @@ interface RegExpIndicesArray extends Array<[number, number]> {
interface RegExp {
/**
* Returns a Boolean value indicating the state of the hasIndices flag (d) used with with a regular expression.
* Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression.
* Default is false. Read-only.
*/
readonly hasIndices: boolean;
+1
View File
@@ -19,3 +19,4 @@ and limitations under the License.
/// <reference lib="es2022" />
/// <reference lib="es2023.array" />
/// <reference lib="es2023.collection" />
/// <reference lib="es2023.intl" />
+56
View File
@@ -0,0 +1,56 @@
/*! *****************************************************************************
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"/>
declare namespace Intl {
interface NumberFormatOptionsUseGroupingRegistry {
min2: never;
auto: never;
always: never;
}
interface NumberFormatOptionsSignDisplayRegistry {
negative: never;
}
interface NumberFormatOptions {
roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined;
roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined;
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined;
}
interface ResolvedNumberFormatOptions {
roundingPriority: "auto" | "morePrecision" | "lessPrecision";
roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000;
trailingZeroDisplay: "auto" | "stripIfInteger";
}
interface NumberRangeFormatPart extends NumberFormatPart {
source: "startRange" | "endRange" | "shared";
}
type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity";
interface NumberFormat {
format(value: number | bigint | StringNumericLiteral): string;
formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[];
formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string;
formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[];
}
}
+31 -9
View File
@@ -818,7 +818,7 @@ interface Date {
getMilliseconds(): number;
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
getUTCMilliseconds(): number;
/** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
/** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */
getTimezoneOffset(): number;
/**
* Sets the date and time value in the Date object.
@@ -4433,12 +4433,33 @@ declare namespace Intl {
var Collator: CollatorConstructor;
interface NumberFormatOptionsStyleRegistry {
decimal: never;
percent: never;
currency: never;
}
type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry;
interface NumberFormatOptionsCurrencyDisplayRegistry {
code: never;
symbol: never;
name: never;
}
type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry;
interface NumberFormatOptionsUseGroupingRegistry {}
type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean;
type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false;
interface NumberFormatOptions {
localeMatcher?: string | undefined;
style?: string | undefined;
localeMatcher?: "lookup" | "best fit" | undefined;
style?: NumberFormatOptionsStyle | undefined;
currency?: string | undefined;
currencySign?: string | undefined;
useGrouping?: boolean | undefined;
currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
useGrouping?: NumberFormatOptionsUseGrouping | undefined;
minimumIntegerDigits?: number | undefined;
minimumFractionDigits?: number | undefined;
maximumFractionDigits?: number | undefined;
@@ -4449,14 +4470,15 @@ declare namespace Intl {
interface ResolvedNumberFormatOptions {
locale: string;
numberingSystem: string;
style: string;
style: NumberFormatOptionsStyle;
currency?: string;
currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
minimumIntegerDigits: number;
minimumFractionDigits: number;
maximumFractionDigits: number;
minimumFractionDigits?: number;
maximumFractionDigits?: number;
minimumSignificantDigits?: number;
maximumSignificantDigits?: number;
useGrouping: boolean;
useGrouping: ResolvedNumberFormatOptionsUseGrouping;
}
interface NumberFormat {
+35
View File
@@ -0,0 +1,35 @@
/*! *****************************************************************************
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 ArrayConstructor {
/**
* Creates an array from an async iterator or iterable object.
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
*/
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
/**
* Creates an array from an async iterator or iterable object.
*
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
* @param mapfn A mapping function to call on every element of itarableOrArrayLike.
* Each return value is awaited before being added to result array.
* @param thisArg Value of 'this' used when executing mapfn.
*/
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
}
+77
View File
@@ -27,3 +27,80 @@ interface MapConstructor {
keySelector: (item: T, index: number) => K,
): Map<K, T[]>;
}
interface ReadonlySetLike<T> {
/**
* Despite its name, returns an iterator of the values in the set-like.
*/
keys(): Iterator<T>;
/**
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
*/
has(value: T): boolean;
/**
* @returns the number of (unique) elements in the set-like.
*/
readonly size: number;
}
interface Set<T> {
/**
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
*/
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a new Set containing all the elements which are both in this Set and in the argument.
*/
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
/**
* @returns a new Set containing all the elements in this Set which are not also in the argument.
*/
difference<U>(other: ReadonlySetLike<U>): Set<T>;
/**
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
*/
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
*/
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
*/
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether this Set has no elements in common with the argument.
*/
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
}
interface ReadonlySet<T> {
/**
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
*/
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a new Set containing all the elements which are both in this Set and in the argument.
*/
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
/**
* @returns a new Set containing all the elements in this Set which are not also in the argument.
*/
difference<U>(other: ReadonlySetLike<U>): Set<T>;
/**
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
*/
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
*/
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
*/
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether this Set has no elements in common with the argument.
*/
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
}
+3
View File
@@ -23,3 +23,6 @@ and limitations under the License.
/// <reference lib="esnext.promise" />
/// <reference lib="esnext.object" />
/// <reference lib="esnext.collection" />
/// <reference lib="esnext.array" />
/// <reference lib="esnext.regexp" />
/// <reference lib="esnext.string" />
+1 -8
View File
@@ -17,12 +17,5 @@ and limitations under the License.
/// <reference no-default-lib="true"/>
declare namespace Intl {
interface NumberRangeFormatPart extends NumberFormatPart {
source: "startRange" | "endRange" | "shared";
}
interface NumberFormat {
formatRange(start: number | bigint, end: number | bigint): string;
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
}
// Empty
}
+25
View File
@@ -0,0 +1,25 @@
/*! *****************************************************************************
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 RegExp {
/**
* Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression.
* Default is false. Read-only.
*/
readonly unicodeSets: boolean;
}
+29
View File
@@ -0,0 +1,29 @@
/*! *****************************************************************************
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 String {
/**
* Returns true if all leading surrogates and trailing surrogates appear paired and in order.
*/
isWellFormed(): boolean;
/**
* Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD).
*/
toWellFormed(): string;
}
+5
View File
@@ -26,3 +26,8 @@ interface FileSystemDirectoryHandle {
keys(): AsyncIterableIterator<string>;
values(): AsyncIterableIterator<FileSystemHandle>;
}
interface ReadableStream<R = any> {
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
}
+20 -6
View File
@@ -550,6 +550,17 @@ interface ReadableStreamGetReaderOptions {
mode?: ReadableStreamReaderMode;
}
interface ReadableStreamIteratorOptions {
/**
* Asynchronously iterates over the chunks in the stream's internal queue.
*
* Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's return() method is called, e.g. by breaking out of the loop.
*
* By default, calling the async iterator's return() method will also cancel the stream. To prevent this, use the stream's values() method, passing true for the preventCancel option.
*/
preventCancel?: boolean;
}
interface ReadableStreamReadDoneResult<T> {
done: true;
value?: T;
@@ -647,16 +658,16 @@ interface RsaPssParams extends Algorithm {
interface SecurityPolicyViolationEventInit extends EventInit {
blockedURI?: string;
columnNumber?: number;
disposition: SecurityPolicyViolationEventDisposition;
documentURI: string;
effectiveDirective: string;
disposition?: SecurityPolicyViolationEventDisposition;
documentURI?: string;
effectiveDirective?: string;
lineNumber?: number;
originalPolicy: string;
originalPolicy?: string;
referrer?: string;
sample?: string;
sourceFile?: string;
statusCode: number;
violatedDirective: string;
statusCode?: number;
violatedDirective?: string;
}
interface StorageEstimate {
@@ -971,6 +982,8 @@ declare var AbortSignal: {
new(): AbortSignal;
/** [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/any_static) */
any(signals: AbortSignal[]): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
timeout(milliseconds: number): AbortSignal;
};
@@ -5221,6 +5234,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
/**
* This ServiceWorker API interface represents the global execution context of a service worker.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
*/
+5
View File
@@ -20,6 +20,11 @@ and limitations under the License.
/// Worker Iterable APIs
/////////////////////////////
interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}
interface CSSNumericArray {
[Symbol.iterator](): IterableIterator<CSSNumericValue>;
entries(): IterableIterator<[number, CSSNumericValue]>;
+9113 -7494
View File
File diff suppressed because one or more lines are too long
+137 -191149
View File
File diff suppressed because one or more lines are too long
+2841 -3315
View File
File diff suppressed because it is too large Load Diff
+187496 -183441
View File
File diff suppressed because one or more lines are too long
+24 -32444
View File
File diff suppressed because one or more lines are too long
+23 -23
View File
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "5.4.5",
"version": "5.5.2",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
@@ -39,10 +39,11 @@
"!**/.gitattributes"
],
"devDependencies": {
"@dprint/formatter": "^0.3.0",
"@dprint/typescript": "0.91.0",
"@esfx/canceltoken": "^1.0.0",
"@octokit/rest": "^20.0.2",
"@types/chai": "^4.3.11",
"@types/glob": "^8.1.0",
"@octokit/rest": "^20.1.1",
"@types/chai": "^4.3.16",
"@types/microsoft__typescript-etw": "^0.1.3",
"@types/minimist": "^1.2.5",
"@types/mocha": "^10.0.6",
@@ -50,35 +51,33 @@
"@types/node": "latest",
"@types/source-map-support": "^0.5.10",
"@types/which": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@typescript-eslint/utils": "^6.19.0",
"azure-devops-node-api": "^12.3.0",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"@typescript-eslint/utils": "^7.11.0",
"azure-devops-node-api": "^13.0.0",
"c8": "^9.1.0",
"chai": "^4.4.1",
"chalk": "^4.1.2",
"chokidar": "^3.5.3",
"diff": "^5.1.0",
"dprint": "^0.45.0",
"esbuild": "^0.20.0",
"eslint": "^8.56.0",
"chokidar": "^3.6.0",
"diff": "^5.2.0",
"dprint": "^0.46.1",
"esbuild": "^0.21.4",
"eslint": "^8.57.0",
"eslint-formatter-autolinkable-stylish": "^1.3.0",
"eslint-plugin-local": "^3.1.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"fast-xml-parser": "^4.3.3",
"glob": "^10.3.10",
"eslint-plugin-local": "^4.2.2",
"fast-xml-parser": "^4.4.0",
"glob": "^10.4.1",
"hereby": "^1.8.9",
"jsonc-parser": "^3.2.0",
"jsonc-parser": "^3.2.1",
"minimist": "^1.2.8",
"mocha": "^10.2.0",
"mocha": "^10.4.0",
"mocha-fivemat-progress-reporter": "^0.1.0",
"ms": "^2.1.3",
"node-fetch": "^3.3.2",
"playwright": "^1.41.0",
"playwright": "^1.44.1",
"source-map-support": "^0.5.21",
"tslib": "^2.6.2",
"typescript": "5.4.0-dev.20240119",
"typescript": "^5.4.5",
"which": "^3.0.1"
},
"overrides": {
@@ -112,5 +111,6 @@
"volta": {
"node": "20.1.0",
"npm": "8.19.4"
}
},
"gitHead": "ce2e60e4ea15a65992e54a9e8877d16be9d42abb"
}