From 4ef57f9bbd1e71af21cb857d184cadd2f92cc090 Mon Sep 17 00:00:00 2001 From: sosoba <2843525+sosoba@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:17:18 +0200 Subject: [PATCH 01/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73431=20[ora?= =?UTF-8?q?cledb]=20Fix=20sessionCallback=20error=20type=20by=20@sosoba?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/oracledb/index.d.ts | 2 +- types/oracledb/oracledb-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/oracledb/index.d.ts b/types/oracledb/index.d.ts index 033f3cee6c49a1..7dd1e6986d2b59 100644 --- a/types/oracledb/index.d.ts +++ b/types/oracledb/index.d.ts @@ -3295,7 +3295,7 @@ declare namespace OracleDB { */ sessionCallback?: | string - | ((connection: Connection, requestedTag: string, callback: (error?: DBError) => void) => void) + | ((connection: Connection, requestedTag: string, callback: (error?: unknown) => void) => void) | undefined; /** * Indicates whether the pool’s connections should share a cache of SODA metadata. This improves SODA performance by reducing round-trips to the database when opening collections. It has no effect on non-SODA operations. diff --git a/types/oracledb/oracledb-tests.ts b/types/oracledb/oracledb-tests.ts index c68e57542cd7c8..34f1f88b974a1f 100644 --- a/types/oracledb/oracledb-tests.ts +++ b/types/oracledb/oracledb-tests.ts @@ -24,7 +24,7 @@ const { DB_USER, } = process.env; -const initSession = (connection: oracledb.Connection, requestedTag: string, callback: () => void): void => { +const initSession = (connection: oracledb.Connection, requestedTag: string, callback: (e: unknown) => void): void => { connection.execute(`alter session set nls_date_format = 'YYYY-MM-DD' nls_language = AMERICAN`, callback); }; From 66b4a98178e912d970392aa07ba93696946ad3be Mon Sep 17 00:00:00 2001 From: wgsadmin Date: Fri, 8 Aug 2025 16:34:31 +0200 Subject: [PATCH 02/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73434=20chor?= =?UTF-8?q?e:=20update=20woosmap.map=20by=20@wgsadmin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: manz --- types/woosmap.map/index.d.ts | 4 ++++ types/woosmap.map/woosmap.map-tests.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/types/woosmap.map/index.d.ts b/types/woosmap.map/index.d.ts index 7783e74b894a15..31ada21938e864 100644 --- a/types/woosmap.map/index.d.ts +++ b/types/woosmap.map/index.d.ts @@ -1529,6 +1529,10 @@ declare namespace woosmap.map { * Disable the tilt control for the users, (default: false). */ disableTilt?: boolean; + /** + * Enables the markers to be selected using tab and keyboard arrows. + */ + enableMarkerAccessibleNavigation?: boolean; /** * This option controls how the gesture are handled * Depending on the value when gesture on the map is detected (scroll on desktop, one finger pan on mobile) diff --git a/types/woosmap.map/woosmap.map-tests.ts b/types/woosmap.map/woosmap.map-tests.ts index f6f8d1ef447b6c..acb2b647426f7b 100644 --- a/types/woosmap.map/woosmap.map-tests.ts +++ b/types/woosmap.map/woosmap.map-tests.ts @@ -20,6 +20,7 @@ const mapOptions = expectType({ ], }, ], + enableMarkerAccessibleNavigation: true, }) as woosmap.map.MapOptions; const map = new woosmap.map.Map(document.getElementById("mapContainer") as HTMLElement, mapOptions); From 4784d18fc8e2d43b34d581128808b1ff08fcbd8f Mon Sep 17 00:00:00 2001 From: DesselBane Date: Fri, 8 Aug 2025 17:05:58 +0200 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73433=20Add?= =?UTF-8?q?=20`round-tofixed`=20package=20types=20by=20@DesselBane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/round-tofixed/.npmignore | 5 +++++ types/round-tofixed/index.d.ts | 8 ++++++++ types/round-tofixed/package.json | 17 +++++++++++++++++ types/round-tofixed/round-tofixed-tests.ts | 13 +++++++++++++ types/round-tofixed/tsconfig.json | 19 +++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 types/round-tofixed/.npmignore create mode 100644 types/round-tofixed/index.d.ts create mode 100644 types/round-tofixed/package.json create mode 100644 types/round-tofixed/round-tofixed-tests.ts create mode 100644 types/round-tofixed/tsconfig.json diff --git a/types/round-tofixed/.npmignore b/types/round-tofixed/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/round-tofixed/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/round-tofixed/index.d.ts b/types/round-tofixed/index.d.ts new file mode 100644 index 00000000000000..9d5461470416b3 --- /dev/null +++ b/types/round-tofixed/index.d.ts @@ -0,0 +1,8 @@ +/** + * round number `x` to `digits` number of digits after decimal point + * @param val + * @param digits positive integer, defaults to 0 + */ +declare function roundToFixed(val: number, digits?: number): number; + +export = roundToFixed; diff --git a/types/round-tofixed/package.json b/types/round-tofixed/package.json new file mode 100644 index 00000000000000..7e15ed4f3ef686 --- /dev/null +++ b/types/round-tofixed/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "name": "@types/round-tofixed", + "version": "1.2.9999", + "projects": [ + "https://github.com/terrymorse58/round-tofixed#readme" + ], + "devDependencies": { + "@types/round-tofixed": "workspace:." + }, + "owners": [ + { + "name": "Dessel Bane", + "githubUsername": "DesselBane" + } + ] +} diff --git a/types/round-tofixed/round-tofixed-tests.ts b/types/round-tofixed/round-tofixed-tests.ts new file mode 100644 index 00000000000000..a45c85bad0dd95 --- /dev/null +++ b/types/round-tofixed/round-tofixed-tests.ts @@ -0,0 +1,13 @@ +import roundToFixed from "round-tofixed"; + +// $ExpectType number +const checkReturnTypeType = roundToFixed(4.99); + +// $ExpectType number +const checkBothArgs = roundToFixed(4.99, 3); + +// @ts-expect-error expect to fail on string for first arg +roundToFixed("foo"); + +// @ts-expect-error expect to fail on string for second arg +roundToFixed(3, "foo"); diff --git a/types/round-tofixed/tsconfig.json b/types/round-tofixed/tsconfig.json new file mode 100644 index 00000000000000..a1a4557480199e --- /dev/null +++ b/types/round-tofixed/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "round-tofixed-tests.ts" + ] +} From 5f0b6679b81b6aeb06b67e87fd9895e8e9ad239d Mon Sep 17 00:00:00 2001 From: Sander Knauff Date: Fri, 8 Aug 2025 17:26:27 +0200 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73429=20feat?= =?UTF-8?q?(qunit):=20add=20types=20for=20module.if=20by=20@SanderKnauff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/qunit/index.d.ts | 20 ++-- types/qunit/test/global-test.ts | 87 ++++++++++++++++ types/qunit/test/module-test.ts | 170 +++++++++++++++++++++++++++++++- 3 files changed, 270 insertions(+), 7 deletions(-) diff --git a/types/qunit/index.d.ts b/types/qunit/index.d.ts index 613310dfe9a149..53c68a6e7b911e 100644 --- a/types/qunit/index.d.ts +++ b/types/qunit/index.d.ts @@ -445,11 +445,19 @@ declare global { beforeEach(fn: (assert: Assert) => void | Promise): void; } - type moduleFunc1 = (name: string, hooks?: Hooks, nested?: (hooks: NestedHooks) => void) => void; - type moduleFunc2 = (name: string, nested?: (hooks: NestedHooks) => void) => void; - type ModuleOnly = { only: moduleFunc1 & moduleFunc2 }; - type ModuleSkip = { skip: moduleFunc1 & moduleFunc2 }; - type ModuleTodo = { todo: moduleFunc1 & moduleFunc2 }; + type moduleFunctionWithOptions = (name: string, options?: Hooks, nested?: (hooks: NestedHooks) => void) => void; + type moduleFunction = (name: string, nested?: (hooks: NestedHooks) => void) => void; + type conditionalModuleFunctionWithOptions = ( + name: string, + condition: boolean, + options?: Hooks, + nested?: (hooks: NestedHooks) => void, + ) => void; + type conditionalModuleFunction = (name: string, condition: boolean, nested?: (hooks: NestedHooks) => void) => void; + type ModuleOnly = { only: moduleFunction & moduleFunctionWithOptions }; + type ModuleSkip = { skip: moduleFunction & moduleFunctionWithOptions }; + type ModuleIf = { if: conditionalModuleFunction & conditionalModuleFunctionWithOptions }; + type ModuleTodo = { todo: moduleFunction & moduleFunctionWithOptions }; namespace QUnit { interface BeginDetails { @@ -739,7 +747,7 @@ declare global { * @param hookds Callbacks to run during test execution * @param nested A callback with grouped tests and nested modules to run under the current module label */ - module: moduleFunc1 & moduleFunc2 & ModuleOnly & ModuleSkip & ModuleTodo; + module: moduleFunction & moduleFunctionWithOptions & ModuleOnly & ModuleSkip & ModuleIf & ModuleTodo; /** * Register a callback to fire whenever a module ends. diff --git a/types/qunit/test/global-test.ts b/types/qunit/test/global-test.ts index 21b43b9544c26c..d85a3164108df5 100644 --- a/types/qunit/test/global-test.ts +++ b/types/qunit/test/global-test.ts @@ -172,6 +172,93 @@ QUnit.module("grouped tests argument hooks", function(hooks) { }); }); +QUnit.module.todo("unfinished module", function(hooks) { + hooks.beforeEach(function(assert) { + assert.ok(true, "beforeEach called"); + }); + + hooks.afterEach(function(assert) { + assert.ok(true, "afterEach called"); + }); + + QUnit.test("call hooks", function(assert) { + assert.expect(2); + }); + + QUnit.module.todo("nested unfinished module", { + // This will run after the parent module's beforeEach hook + beforeEach: assert => { + assert.ok(true, "nested beforeEach called"); + }, + // This will run before the parent module's afterEach + afterEach: assert => { + assert.ok(true, "nested afterEach called"); + }, + }); + + QUnit.test("call nested hooks", function(assert) { + assert.expect(4); + }); +}); + +QUnit.module.skip("skipped module", function(hooks) { + hooks.beforeEach(function(assert) { + assert.ok(true, "beforeEach called"); + }); + + hooks.afterEach(function(assert) { + assert.ok(true, "afterEach called"); + }); + + QUnit.test("call hooks", function(assert) { + assert.expect(2); + }); + + QUnit.module.skip("nested skipped module", { + // This will run after the parent module's beforeEach hook + beforeEach: assert => { + assert.ok(true, "nested beforeEach called"); + }, + // This will run before the parent module's afterEach + afterEach: assert => { + assert.ok(true, "nested afterEach called"); + }, + }); + + QUnit.test("call nested hooks", function(assert) { + assert.expect(4); + }); +}); + +QUnit.module.if("Conditional module", true, function(hooks) { + hooks.beforeEach(function(assert) { + assert.ok(true, "beforeEach called"); + }); + + hooks.afterEach(function(assert) { + assert.ok(true, "afterEach called"); + }); + + QUnit.test("call hooks", function(assert) { + assert.expect(2); + }); + + QUnit.module.if("nested conditional module", true, { + // This will run after the parent module's beforeEach hook + beforeEach: assert => { + assert.ok(true, "nested beforeEach called"); + }, + // This will run before the parent module's afterEach + afterEach: assert => { + assert.ok(true, "nested afterEach called"); + }, + }); + + QUnit.test("call nested hooks", function(assert) { + assert.expect(4); + }); +}); + QUnit.module.only("exclusive module", function(hooks) { hooks.beforeEach(function(assert) { assert.ok(true, "beforeEach called"); diff --git a/types/qunit/test/module-test.ts b/types/qunit/test/module-test.ts index ac5d9fd4e0ebe1..6dd69decf66ca7 100644 --- a/types/qunit/test/module-test.ts +++ b/types/qunit/test/module-test.ts @@ -33,7 +33,175 @@ QUnit.module("basic tests for importing QUnit", function(hooks) { assert.ok(true, "this is called if true"); }); - QUnit.module("skip", function() { + QUnit.module("nested", function() { + QUnit.test.each("each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with string object example", { case1: "foo", case2: "bar" }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with number array example", [1, 2], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.each("each with number object example", { case1: 1, case2: 2 }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.if.each("if.each with string array example", true, ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.skip.each("skip.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.todo.each("todo.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.only.each("only.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + }); + + QUnit.module.if("conditional", true, function() { + QUnit.test.each("each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with string object example", { case1: "foo", case2: "bar" }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with number array example", [1, 2], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.each("each with number object example", { case1: 1, case2: 2 }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.if.each("if.each with string array example", true, ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.skip.each("skip.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.todo.each("todo.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.only.each("only.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + }); + + QUnit.module.only("exclusive", function() { + QUnit.test.each("each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with string object example", { case1: "foo", case2: "bar" }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with number array example", [1, 2], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.each("each with number object example", { case1: 1, case2: 2 }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.if.each("if.each with string array example", true, ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.skip.each("skip.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.todo.each("todo.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.only.each("only.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + }); + + QUnit.module.skip("skip", function() { + QUnit.test.each("each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with string object example", { case1: "foo", case2: "bar" }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "string value"); + }); + + QUnit.test.each("each with number array example", [1, 2], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.each("each with number object example", { case1: 1, case2: 2 }, function(assert, data) { + assert.expect(3); + assert.strictEqual(data, 3); + }); + + QUnit.test.if.each("if.each with string array example", true, ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.skip.each("skip.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.todo.each("todo.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + + QUnit.test.only.each("only.each with string array example", ["foo", "bar"], function(assert, data) { + assert.expect(3); + assert.strictEqual(data, "foo"); + }); + }); + + QUnit.module.todo("nested", function() { QUnit.test.each("each with string array example", ["foo", "bar"], function(assert, data) { assert.expect(3); assert.strictEqual(data, "string value"); From 433c8cb2a19c49eb49fdda4dc10588b504d97378 Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:29:08 +0200 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73299=20[chr?= =?UTF-8?q?ome]=20update=20commands=20namespace=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 25 ++++++++++--------------- types/chrome/test/index.ts | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index c9cb9162f55c0a..9aa16042d59c3c 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1600,29 +1600,24 @@ declare namespace chrome { */ export namespace commands { export interface Command { - /** Optional. The name of the Extension Command */ - name?: string | undefined; - /** Optional. The Extension Command description */ - description?: string | undefined; - /** Optional. The shortcut active for this command, or blank if not active. */ - shortcut?: string | undefined; + /** The name of the Extension Command */ + name?: string; + /** The Extension Command description */ + description?: string; + /** The shortcut active for this command, or blank if not active. */ + shortcut?: string; } - export interface CommandEvent extends chrome.events.Event<(command: string, tab: chrome.tabs.Tab) => void> {} - /** - * Returns all the registered extension commands for this extension and their shortcut (if active). - * @return The `getAll` method provides its result via callback or returned as a `Promise` (MV3 only). + * Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function getAll(): Promise; - /** - * Returns all the registered extension commands for this extension and their shortcut (if active). - * @param callback Called to return the registered commands. - */ export function getAll(callback: (commands: Command[]) => void): void; /** Fired when a registered command is activated using a keyboard shortcut. */ - export var onCommand: CommandEvent; + export const onCommand: events.Event<(command: string, tab?: tabs.Tab) => void>; } //////////////////// diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index b246e19559fdab..2243c88b30fd74 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -3760,10 +3760,21 @@ function testCertificateProvider() { }); } -// https://developer.chrome.com/docs/extensions/reference/commands +// https://developer.chrome.com/docs/extensions/reference/api/commands async function testCommands() { - await chrome.commands.getAll(); - chrome.commands.getAll((commands) => {}); + chrome.commands.getAll(); // $ExpectType Promise + chrome.commands.getAll(([command]) => { // $ExpectType void + command.description; // $ExpectType string | undefined + command.name; // $ExpectType string | undefined + command.shortcut; // $ExpectType string | undefined + }); + // @ts-expect-error + chrome.commands.getAll(() => {}).then(() => {}); + + checkChromeEvent(chrome.commands.onCommand, (command, tab) => { + command; // $ExpectType string + tab; // $ExpectType Tab | undefined + }); } // https://developer.chrome.com/docs/extensions/reference/i18n From 177f5d94d61a9ed76f3f65e44e07369af769046d Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:34:57 +0200 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73298=20[chr?= =?UTF-8?q?ome]=20update=20browsingData=20namespace=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 216 ++++++++++++++----------------------- types/chrome/test/index.ts | 147 ++++++++++++++++++------- 2 files changed, 189 insertions(+), 174 deletions(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 9aa16042d59c3c..1cbf9af4fbc4ac 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1086,267 +1086,209 @@ declare namespace chrome { */ export namespace browsingData { export interface OriginTypes { - /** Optional. Extensions and packaged applications a user has installed (be _really_ careful!). */ + /** Extensions and packaged applications a user has installed (be _really_ careful!). */ extension?: boolean | undefined; - /** Optional. Websites that have been installed as hosted applications (be careful!). */ + /** Websites that have been installed as hosted applications (be careful!). */ protectedWeb?: boolean | undefined; - /** Optional. Normal websites. */ + /** Normal websites. */ unprotectedWeb?: boolean | undefined; } /** Options that determine exactly what data will be removed. */ export interface RemovalOptions { /** - * Optional. + * When present, data for origins in this list is excluded from deletion. Can't be used together with `origins`. Only supported for cookies, storage and cache. Cookies are excluded for the whole registrable domain. * @since Chrome 74 - * When present, data for origins in this list is excluded from deletion. Can't be used together with origins. Only supported for cookies, storage and cache. Cookies are excluded for the whole registrable domain. */ excludeOrigins?: string[] | undefined; - /** - * Optional. - * An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you _really_ want to remove application data before adding 'protectedWeb' or 'extensions'. - */ + /** An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you _really_ want to remove application data before adding 'protectedWeb' or 'extensions'. */ originTypes?: OriginTypes | undefined; /** - * Optional. - * @since Chrome 74 * When present, only data for origins in this list is deleted. Only supported for cookies, storage and cache. Cookies are cleared for the whole registrable domain. + * @since Chrome 74 */ - origins?: string[] | undefined; - /** - * Optional. - * Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the {@link Date.getTime} method). If absent, defaults to 0 (which would remove all browsing data). - */ + origins?: [string, ...string[]] | undefined; + /** Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the {@link Date.getTime getTime} method of the JavaScript `Date` object). If absent, defaults to 0 (which would remove all browsing data). */ since?: number | undefined; } - /** - * @since Chrome 27 - * A set of data types. Missing data types are interpreted as false. - */ + /** A set of data types. Missing data types are interpreted as `false`. */ export interface DataTypeSet { - /** Optional. Websites' WebSQL data. */ + /** Websites' WebSQL data. */ webSQL?: boolean | undefined; - /** Optional. Websites' IndexedDB data. */ + /** Websites' IndexedDB data. */ indexedDB?: boolean | undefined; - /** Optional. The browser's cookies. */ + /** The browser's cookies. */ cookies?: boolean | undefined; - /** Optional. Stored passwords. */ + /** Stored passwords. */ passwords?: boolean | undefined; /** - * @deprecated Deprecated since Chrome 76. - * Support for server-bound certificates has been removed. This data type will be ignored. - * - * Optional. Server-bound certificates. + * Server-bound certificates. + * @deprecated since Chrome 76. Support for server-bound certificates has been removed. This data type will be ignored. */ serverBoundCertificates?: boolean | undefined; - /** Optional. The browser's download list. */ + /** The browser's download list. */ downloads?: boolean | undefined; - /** Optional. The browser's cache. Note: when removing data, this clears the entire cache: it is not limited to the range you specify. */ + /** The browser's cache. */ cache?: boolean | undefined; - /** Optional. The browser's cacheStorage. */ + /** Cache storage. */ cacheStorage?: boolean | undefined; - /** Optional. Websites' appcaches. */ + /** Websites' appcaches. */ appcache?: boolean | undefined; - /** Optional. Websites' file systems. */ + /** Websites' file systems. */ fileSystems?: boolean | undefined; /** - * @deprecated Deprecated since Chrome 88. - * Support for Flash has been removed. This data type will be ignored. - * - * Optional. Plugins' data. + * Plugins' data. + * @deprecated since Chrome 88. Support for Flash has been removed. This data type will be ignored. */ pluginData?: boolean | undefined; - /** Optional. Websites' local storage data. */ + /** Websites' local storage data. */ localStorage?: boolean | undefined; - /** Optional. The browser's stored form data. */ + /** The browser's stored form data. */ formData?: boolean | undefined; - /** Optional. The browser's history. */ + /** The browser's history. */ history?: boolean | undefined; - /** - * Optional. - * @since Chrome 39 - * Service Workers. - */ + /** Service Workers. */ serviceWorkers?: boolean | undefined; } export interface SettingsResult { options: RemovalOptions; - /** All of the types will be present in the result, with values of true if they are both selected to be removed and permitted to be removed, otherwise false. */ + /** All of the types will be present in the result, with values of `true` if they are both selected to be removed and permitted to be removed, otherwise `false`. */ dataToRemove: DataTypeSet; - /** All of the types will be present in the result, with values of true if they are permitted to be removed (e.g., by enterprise policy) and false if not. */ + /** All of the types will be present in the result, with values of `true` if they are permitted to be removed (e.g., by enterprise policy) and `false` if not. */ dataRemovalPermitted: DataTypeSet; } /** - * @since Chrome 26 * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here. - * @return The `settings` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function settings(): Promise; - /** - * @since Chrome 26 - * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here. - */ export function settings(callback: (result: SettingsResult) => void): void; + /** - * @deprecated Deprecated since Chrome 88. - * Support for Flash has been removed. This function has no effect. - * * Clears plugins' data. - * @return The `removePluginData` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. - */ - export function removePluginData(options: RemovalOptions): Promise; - /** - * @deprecated Deprecated since Chrome 88. - * Support for Flash has been removed. This function has no effect. * - * Clears plugins' data. - * @param callback Called when plugins' data has been cleared. + * Can return its result via Promise in Manifest V3 or later since Chrome 96. + * @deprecated since Chrome 88. Support for Flash has been removed. This function has no effect */ + export function removePluginData(options: RemovalOptions): Promise; export function removePluginData(options: RemovalOptions, callback: () => void): void; + /** - * @since Chrome 72 * Clears websites' service workers. - * @return The `removeServiceWorkers` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. - */ - export function removeServiceWorkers(options: RemovalOptions): Promise; - /** + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. * @since Chrome 72 - * Clears websites' service workers. - * @param callback Called when the browser's service workers have been cleared. */ + export function removeServiceWorkers(options: RemovalOptions): Promise; export function removeServiceWorkers(options: RemovalOptions, callback: () => void): void; + /** * Clears the browser's stored form data (autofill). - * @return The `removeFormData` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeFormData(options: RemovalOptions): Promise; - /** - * Clears the browser's stored form data (autofill). - * @param callback Called when the browser's form data has been cleared. - */ export function removeFormData(options: RemovalOptions, callback: () => void): void; + /** * Clears websites' file system data. - * @return The `removeFileSystems` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeFileSystems(options: RemovalOptions): Promise; - /** - * Clears websites' file system data. - * @param callback Called when websites' file systems have been cleared. - */ export function removeFileSystems(options: RemovalOptions, callback: () => void): void; + /** * Clears various types of browsing data stored in a user's profile. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. * @param dataToRemove The set of data types to remove. - * @return The `remove` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. */ export function remove(options: RemovalOptions, dataToRemove: DataTypeSet): Promise; - /** - * Clears various types of browsing data stored in a user's profile. - * @param dataToRemove The set of data types to remove. - * @param callback Called when deletion has completed. - */ export function remove(options: RemovalOptions, dataToRemove: DataTypeSet, callback: () => void): void; + /** * Clears the browser's stored passwords. - * @return The `removePasswords` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removePasswords(options: RemovalOptions): Promise; - /** - * Clears the browser's stored passwords. - * @param callback Called when the browser's passwords have been cleared. - */ export function removePasswords(options: RemovalOptions, callback: () => void): void; + /** * Clears the browser's cookies and server-bound certificates modified within a particular timeframe. - * @return The `removeCookies` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeCookies(options: RemovalOptions): Promise; - /** - * Clears the browser's cookies and server-bound certificates modified within a particular timeframe. - * @param callback Called when the browser's cookies and server-bound certificates have been cleared. - */ export function removeCookies(options: RemovalOptions, callback: () => void): void; + /** * Clears websites' WebSQL data. - * @return The `removeWebSQL` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeWebSQL(options: RemovalOptions): Promise; - /** - * Clears websites' WebSQL data. - * @param callback Called when websites' WebSQL databases have been cleared. - */ export function removeWebSQL(options: RemovalOptions, callback: () => void): void; + /** * Clears websites' appcache data. - * @return The `removeAppcache` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeAppcache(options: RemovalOptions): Promise; - /** - * Clears websites' appcache data. - * @param callback Called when websites' appcache data has been cleared. - */ export function removeAppcache(options: RemovalOptions, callback: () => void): void; - /** Clears websites' cache storage data. - * @return The `removeCacheStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + + /** + * Clears websites' cache storage data. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeCacheStorage(options: RemovalOptions): Promise; - /** Clears websites' cache storage data. - * @param callback Called when websites' appcache data has been cleared. - */ export function removeCacheStorage(options: RemovalOptions, callback: () => void): void; + /** * Clears the browser's list of downloaded files (not the downloaded files themselves). - * @return The `removeDownloads` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeDownloads(options: RemovalOptions): Promise; - /** - * Clears the browser's list of downloaded files (not the downloaded files themselves). - * @param callback Called when the browser's list of downloaded files has been cleared. - */ export function removeDownloads(options: RemovalOptions, callback: () => void): void; + /** * Clears websites' local storage data. - * @return The `removeLocalStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeLocalStorage(options: RemovalOptions): Promise; - /** - * Clears websites' local storage data. - * @param callback Called when websites' local storage has been cleared. - */ export function removeLocalStorage(options: RemovalOptions, callback: () => void): void; + /** * Clears the browser's cache. - * @return The `removeCache` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeCache(options: RemovalOptions): Promise; - /** - * Clears the browser's cache. - * @param callback Called when the browser's cache has been cleared. - */ export function removeCache(options: RemovalOptions, callback: () => void): void; + /** * Clears the browser's history. - * @return The `removeHistory` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeHistory(options: RemovalOptions): Promise; - /** - * Clears the browser's history. - * @param callback Called when the browser's history has cleared. - */ export function removeHistory(options: RemovalOptions, callback: () => void): void; + /** * Clears websites' IndexedDB data. - * @return The `removeIndexedDB` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. + * + * Can return its result via Promise in Manifest V3 or later since Chrome 96. */ export function removeIndexedDB(options: RemovalOptions): Promise; - /** - * Clears websites' IndexedDB data. - * @param callback Called when websites' IndexedDB data has been cleared. - */ export function removeIndexedDB(options: RemovalOptions, callback: () => void): void; } diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index 2243c88b30fd74..257ed56750dd4c 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -3632,46 +3632,119 @@ function testEnterpriseHardwarePlatform() { chrome.enterprise.hardwarePlatform.getHardwarePlatformInfo((info) => {}).then((info) => {}); } -// https://developer.chrome.com/docs/extensions/reference/browsingData +// https://developer.chrome.com/docs/extensions/reference/api/browsingData function testBrowsingData() { + const removalOptions: chrome.browsingData.RemovalOptions = { + excludeOrigins: [], + originTypes: { + extension: true, + protectedWeb: true, + unprotectedWeb: true, + }, + origins: ["https://example.com"], + since: 0, + }; + + const dataTypeSet: chrome.browsingData.DataTypeSet = { + appcache: true, + cache: true, + cacheStorage: true, + cookies: true, + downloads: true, + fileSystems: true, + formData: true, + history: true, + indexedDB: true, + localStorage: true, + passwords: true, + pluginData: true, + serviceWorkers: true, + webSQL: true, + }; + + chrome.browsingData.remove(removalOptions, dataTypeSet); // $ExpectType Promise + chrome.browsingData.remove(removalOptions, dataTypeSet, () => {}); // $ExpectType void // @ts-expect-error - chrome.browsingData.removeServiceWorkers(); - chrome.browsingData.removeServiceWorkers({}); - chrome.browsingData.removeServiceWorkers({}, () => {}); - chrome.browsingData.settings((result) => {}); - chrome.browsingData.removePluginData({}, () => {}); - chrome.browsingData.removeServiceWorkers({}, () => {}); - chrome.browsingData.removeFormData({}, () => {}); - chrome.browsingData.removeFileSystems({}, () => {}); - chrome.browsingData.remove({}, {}, () => {}); - chrome.browsingData.removePasswords({}, () => {}); - chrome.browsingData.removeCookies({}, () => {}); - chrome.browsingData.removeWebSQL({}, () => {}); - chrome.browsingData.removeAppcache({}, () => {}); - chrome.browsingData.removeCacheStorage({}, () => {}); - chrome.browsingData.removeDownloads({}, () => {}); - chrome.browsingData.removeCache({}, () => {}); - chrome.browsingData.removeHistory({}, () => {}); - chrome.browsingData.removeIndexedDB({}, () => {}); -} + chrome.browsingData.remove(removalOptions, dataTypeSet, () => {}).then(() => {}); + + chrome.browsingData.removeAppcache(removalOptions); // $ExpectType Promise + chrome.browsingData.removeAppcache(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeAppcache(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeCache(removalOptions); // $ExpectType Promise + chrome.browsingData.removeCache(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeCache(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeCacheStorage(removalOptions); // $ExpectType Promise + chrome.browsingData.removeCacheStorage(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeCacheStorage(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeCookies(removalOptions); // $ExpectType Promise + chrome.browsingData.removeCookies(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeCookies(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeDownloads(removalOptions); // $ExpectType Promise + chrome.browsingData.removeDownloads(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeDownloads(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeFileSystems(removalOptions); // $ExpectType Promise + chrome.browsingData.removeFileSystems(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeFileSystems(removalOptions, () => {}).then(() => {}); -// https://developer.chrome.com/docs/extensions/reference/browsingData -async function testBrowsingDataForPromise() { - await chrome.browsingData.settings(); - await chrome.browsingData.removePluginData({}); - await chrome.browsingData.removeServiceWorkers({}); - await chrome.browsingData.removeFormData({}); - await chrome.browsingData.removeFileSystems({}); - await chrome.browsingData.remove({}, {}); - await chrome.browsingData.removePasswords({}); - await chrome.browsingData.removeCookies({}); - await chrome.browsingData.removeWebSQL({}); - await chrome.browsingData.removeAppcache({}); - await chrome.browsingData.removeCacheStorage({}); - await chrome.browsingData.removeDownloads({}); - await chrome.browsingData.removeCache({}); - await chrome.browsingData.removeHistory({}); - await chrome.browsingData.removeIndexedDB({}); + chrome.browsingData.removeFormData(removalOptions); // $ExpectType Promise + chrome.browsingData.removeFormData(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeFormData(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeHistory(removalOptions); // $ExpectType Promise + chrome.browsingData.removeHistory(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeHistory(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeIndexedDB(removalOptions); // $ExpectType Promise + chrome.browsingData.removeIndexedDB(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeIndexedDB(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeLocalStorage(removalOptions); // $ExpectType Promise + chrome.browsingData.removeLocalStorage(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeLocalStorage(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removePasswords(removalOptions); // $ExpectType Promise + chrome.browsingData.removePasswords(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removePasswords(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removePluginData(removalOptions); // $ExpectType Promise + chrome.browsingData.removePluginData(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removePluginData(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeServiceWorkers(removalOptions); // $ExpectType Promise + chrome.browsingData.removeServiceWorkers(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeServiceWorkers(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.removeWebSQL(removalOptions); // $ExpectType Promise + chrome.browsingData.removeWebSQL(removalOptions, () => {}); // $ExpectType void + // @ts-expect-error + chrome.browsingData.removeWebSQL(removalOptions, () => {}).then(() => {}); + + chrome.browsingData.settings(); // $ExpectType Promise + chrome.browsingData.settings((result) => { // $ExpectType void + result.dataRemovalPermitted; // $ExpectType DataTypeSet + result.dataToRemove; // $ExpectType DataTypeSet + result.options; // $ExpectType RemovalOptions + }); + // @ts-expect-error + chrome.browsingData.settings((result) => {}).then((result) => {}); } // https://developer.chrome.com/docs/extensions/reference/api/certificateProvider From 3557a9848f783dca38b15e99a3d5773191bcaef8 Mon Sep 17 00:00:00 2001 From: Erwan Jugand <47392755+erwanjugand@users.noreply.github.com> Date: Fri, 8 Aug 2025 18:01:47 +0200 Subject: [PATCH 07/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73392=20[chr?= =?UTF-8?q?ome]=20update=20typos=20by=20@erwanjugand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chrome/index.d.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 1cbf9af4fbc4ac..94844f700847cc 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -2863,7 +2863,7 @@ declare namespace chrome { export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {} - /** Represents a panel created by extension. */ + /** Represents a panel created by an extension. */ export interface ExtensionPanel { /** * Appends a button to the status bar of the panel. @@ -8280,10 +8280,7 @@ declare namespace chrome { */ relatedWebsiteSetsEnabled: chrome.types.ChromeSetting; - /** - * If disabled, Chrome blocks third-party sites from setting cookies. - * The value of this preference is of type boolean, and the default value is `true`. - */ + /** If disabled, Chrome blocks third-party sites from setting cookies. The value of this preference is of type boolean, and the default value is `true`. Extensions may not enable this API in Incognito mode, where third-party cookies are blocked and can only be allowed at the site level. If you try setting this API to true in Incognito, it will throw an error. */ thirdPartyCookiesAllowed: chrome.types.ChromeSetting; /** @@ -9852,14 +9849,14 @@ declare namespace chrome { */ get(callback: (items: T) => void): void; /** - * Sets the desired access level for the storage area. The default will be only trusted contexts. + * Sets the desired access level for the storage area. By default, session storage is restricted to trusted contexts (extension pages and service workers), while managed, local, and sync storage allow access from both trusted and untrusted contexts. * @param accessOptions An object containing an accessLevel key which contains the access level of the storage area. * @return A void Promise. * @since Chrome 102 */ setAccessLevel(accessOptions: { accessLevel: AccessLevel }): Promise; /** - * Sets the desired access level for the storage area. The default will be only trusted contexts. + * Sets the desired access level for the storage area. By default, session storage is restricted to trusted contexts (extension pages and service workers), while managed, local, and sync storage allow access from both trusted and untrusted contexts. * @param accessOptions An object containing an accessLevel key which contains the access level of the storage area. * @param callback Optional. * @since Chrome 102 From 2df55396cca06c944853caed3b8cdfd17455c23e Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 8 Aug 2025 09:07:38 -0700 Subject: [PATCH 08/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73421=20Move?= =?UTF-8?q?=20Chromecast=20SDK=20enums=20to=20const=20enum=20by=20@joeypar?= =?UTF-8?q?rish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chromecast-caf-receiver/.eslintrc.json | 5 ++ .../cast.framework.d.ts | 6 +- .../cast.framework.events.d.ts | 6 +- .../cast.framework.messages.d.ts | 64 +++++++++---------- .../cast.framework.system.d.ts | 16 ++--- .../cast.framework.ui.d.ts | 16 ++--- 6 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 types/chromecast-caf-receiver/.eslintrc.json diff --git a/types/chromecast-caf-receiver/.eslintrc.json b/types/chromecast-caf-receiver/.eslintrc.json new file mode 100644 index 00000000000000..39d4cc857bbf89 --- /dev/null +++ b/types/chromecast-caf-receiver/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@definitelytyped/no-const-enum": "off" + } +} diff --git a/types/chromecast-caf-receiver/cast.framework.d.ts b/types/chromecast-caf-receiver/cast.framework.d.ts index a50a83ec7dd5af..f7b75e35eac5ce 100644 --- a/types/chromecast-caf-receiver/cast.framework.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.d.ts @@ -11,7 +11,7 @@ export import system = system; export import messages = messages; export as namespace framework; -export enum LoggerLevel { +export const enum LoggerLevel { DEBUG = 0, VERBOSE = 500, INFO = 800, @@ -24,7 +24,7 @@ export enum LoggerLevel { * Content protection type. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework#.ContentProtection */ -export enum ContentProtection { +export const enum ContentProtection { NONE = "none", CLEARKEY = "clearkey", PLAYREADY = "playready", @@ -997,7 +997,7 @@ export class NetworkRequestInfo { * * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework#.ShakaVariant */ -export enum ShakaVariant { +export const enum ShakaVariant { /** * The standard, default build. */ diff --git a/types/chromecast-caf-receiver/cast.framework.events.d.ts b/types/chromecast-caf-receiver/cast.framework.events.d.ts index b2560465b0100b..59da95ce50094d 100644 --- a/types/chromecast-caf-receiver/cast.framework.events.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.events.d.ts @@ -17,7 +17,7 @@ export as namespace events; * Player event types for @see{@link framework.PlayerManager}. * https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.events#.EventType */ -export enum EventType { +export const enum EventType { ALL = "*", ABORT = "ABORT", CAN_PLAY = "CAN_PLAY", @@ -97,7 +97,7 @@ export enum EventType { TRACKS_CHANGED = "TRACKS_CHANGED", } -export enum DetailedErrorCode { +export const enum DetailedErrorCode { MEDIA_UNKNOWN = 100, MEDIA_ABORTED = 101, MEDIA_DECODE = 102, @@ -144,7 +144,7 @@ export enum DetailedErrorCode { * The error severity. Follows the same naming scheme and numbering as Shaka Player. * https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.events#.EventType */ -export enum ErrorSeverity { +export const enum ErrorSeverity { RECOVERABLE = 1, CRITICAL = 2, } diff --git a/types/chromecast-caf-receiver/cast.framework.messages.d.ts b/types/chromecast-caf-receiver/cast.framework.messages.d.ts index 266180f49991a5..6f5cf7c3bbd53a 100644 --- a/types/chromecast-caf-receiver/cast.framework.messages.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.messages.d.ts @@ -6,7 +6,7 @@ export as namespace messages; * Possible caption mimetype of text track. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.CaptionMimeType} */ -export enum CaptionMimeType { +export const enum CaptionMimeType { CEA608 = "text/cea608", TTML = "application/ttml+xml", TTML_MP4 = "application/mp4", @@ -17,7 +17,7 @@ export enum CaptionMimeType { * Commands supported by {@link framework.messages.MediaStatus.supportedMediaCommands}. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.Command} */ -export enum Command { +export const enum Command { PAUSE = 1, SEEK = 2, STREAM_VOLUME = 4, @@ -43,7 +43,7 @@ export enum Command { * Possible types of container metadata. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ContainerType} */ -export enum ContainerType { +export const enum ContainerType { GENERIC_CONTAINER = 0, AUDIOBOOK_CONTAINER = 1, } @@ -52,7 +52,7 @@ export enum ContainerType { * Provides content filtering mode. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ContentFilteringMode} */ -export enum ContentFilteringMode { +export const enum ContentFilteringMode { FILTER_EXPLICIT = "FILTER_EXPLICIT", } @@ -60,7 +60,7 @@ export enum ContentFilteringMode { * Represents media error message reasons. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ErrorReason} */ -export enum ErrorReason { +export const enum ErrorReason { APP_ERROR = "APP_ERROR", AUTHENTICATION_EXPIRED = "AUTHENTICATION_EXPIRED", CONCURRENT_STREAM_LIMIT = "CONCURRENT_STREAM_LIMIT", @@ -86,7 +86,7 @@ export enum ErrorReason { * Represents media error message types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ErrorType} */ -export enum ErrorType { +export const enum ErrorType { ERROR = "ERROR", INVALID_PLAYER_STATE = "INVALID_PLAYER_STATE", INVALID_REQUEST = "INVALID_REQUEST", @@ -98,7 +98,7 @@ export enum ErrorType { * Extended player state information. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.ExtendedPlayerState} */ -export enum ExtendedPlayerState { +export const enum ExtendedPlayerState { LOADING = "LOADING", } @@ -106,7 +106,7 @@ export enum ExtendedPlayerState { * Focus states. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.FocusState} */ -export enum FocusState { +export const enum FocusState { IN_FOCUS = "IN_FOCUS", NOT_IN_FOCUS = "NOT_IN_FOCUS", } @@ -115,7 +115,7 @@ export enum FocusState { * The Get Status flag options determine the amount of data that must be included in the media status response. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.GetStatusOptions} */ -export enum GetStatusOptions { +export const enum GetStatusOptions { NO_METADATA = 1, NO_QUEUE_ITEMS = 2, } @@ -124,7 +124,7 @@ export enum GetStatusOptions { * Represents video High Dynamic Range (HDR) types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.HdrType} */ -export enum HdrType { +export const enum HdrType { DV = "dv", HDR = "hdr", SDR = "sdr", @@ -134,7 +134,7 @@ export enum HdrType { * Format of an HLS audio segment. * [Documentation]{@link https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.HlsSegmentFormat} */ -export enum HlsSegmentFormat { +export const enum HlsSegmentFormat { AAC = "aac", AC3 = "ac3", E_AC3 = "e_ac3", @@ -149,7 +149,7 @@ export enum HlsSegmentFormat { * Format of an HLS audio segment. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.HlsSegmentFormat} */ -export enum HlsVideoSegmentFormat { +export const enum HlsVideoSegmentFormat { FMP4 = "fmp4", MPEG2_TS = "mpeg2_ts", } @@ -158,7 +158,7 @@ export enum HlsVideoSegmentFormat { * The reason for the player to be in IDLE state. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.IdleReason} */ -export enum IdleReason { +export const enum IdleReason { CANCELLED = "CANCELLED", ERROR = "ERROR", FINISHED = "FINISHED", @@ -169,7 +169,7 @@ export enum IdleReason { * The media category. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MediaCategory} */ -export enum MediaCategory { +export const enum MediaCategory { AUDIO = "AUDIO", IMAGE = "IMAGE", VIDEO = "VIDEO", @@ -179,7 +179,7 @@ export enum MediaCategory { * Represents media message types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MessageType} */ -export enum MessageType { +export const enum MessageType { CLOUD_STATUS = "CLOUD_STATUS", CUSTOM_COMMAND = "CUSTOM_COMMAND", CUSTOM_STATE = "CUSTOM_STATE", @@ -230,7 +230,7 @@ export enum MessageType { * Possible types of media metadata. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.MetadataType} */ -export enum MetadataType { +export const enum MetadataType { GENERIC = 0, MOVIE = 1, TV_SHOW = 2, @@ -243,7 +243,7 @@ export enum MetadataType { * String IDs used by {@link framework.PlayerManager#playString} * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.PlayStringId */ -export enum PlayStringId { +export const enum PlayStringId { FREE_TRIAL_ABOUT_TO_EXPIRE = "FREE_TRIAL_ABOUT_TO_EXPIRE", PLAYING_ALTERNATE_MIX = "PLAYING_ALTERNATE_MIX", STREAM_HIJACKED = "STREAM_HIJACKED", @@ -254,7 +254,7 @@ export enum PlayStringId { * Represents the player state. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.PlayerState} */ -export enum PlayerState { +export const enum PlayerState { BUFFERING = "BUFFERING", IDLE = "IDLE", PAUSED = "PAUSED", @@ -265,7 +265,7 @@ export enum PlayerState { * Queue change types used by QUEUE_CHANGE outgoing message. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.QueueChangeType} */ -export enum QueueChangeType { +export const enum QueueChangeType { INSERT = "INSERT", ITEMS_CHANGE = "ITEMS_CHANGE", NO_CHANGE = "NO_CHANGE", @@ -277,7 +277,7 @@ export enum QueueChangeType { * Types of media container/queue. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.QueueType} */ -export enum QueueType { +export const enum QueueType { ALBUM = "ALBUM", AUDIOBOOK = "AUDIOBOOK", LIVE_TV = "LIVE_TV", @@ -293,7 +293,7 @@ export enum QueueType { * Behavior of the queue when all items have been played. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.RepeatMode} */ -export enum RepeatMode { +export const enum RepeatMode { REPEAT_ALL = "REPEAT_ALL", REPEAT_ALL_AND_SHUFFLE = "REPEAT_ALL_AND_SHUFFLE", REPEAT_OFF = "REPEAT_OFF", @@ -304,7 +304,7 @@ export enum RepeatMode { * Represents the playback state after a SEEK request. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.SeekResumeState} */ -export enum SeekResumeState { +export const enum SeekResumeState { PLAYBACK_PAUSE = "PLAYBACK_PAUSE", PLAYBACK_START = "PLAYBACK_START", } @@ -313,7 +313,7 @@ export enum SeekResumeState { * The streaming protocol types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.StreamingProtocolType} */ -export enum StreamingProtocolType { +export const enum StreamingProtocolType { UNKNOWN = 0, MPEG_DASH = 1, HLS = 2, @@ -324,7 +324,7 @@ export enum StreamingProtocolType { * Represents the stream types. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.StreamType} */ -export enum StreamType { +export const enum StreamType { BUFFERED = "BUFFERED", LIVE = "LIVE", NONE = "NONE", @@ -334,7 +334,7 @@ export enum StreamType { * Possible text track edge type. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackEdgeType} */ -export enum TextTrackEdgeType { +export const enum TextTrackEdgeType { DEPRESSED = "DEPRESSED", DROP_SHADOW = "DROP_SHADOW", NONE = "NONE", @@ -346,7 +346,7 @@ export enum TextTrackEdgeType { * Text track font generic family. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackFontGenericFamily} */ -export enum TextTrackFontGenericFamily { +export const enum TextTrackFontGenericFamily { CASUAL = "CASUAL", CURSIVE = "CURSIVE", MONOSPACED_SANS_SERIF = "MONOSPACED_SANS_SERIF", @@ -360,7 +360,7 @@ export enum TextTrackFontGenericFamily { * Possible text track font style. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackFontStyle} */ -export enum TextTrackFontStyle { +export const enum TextTrackFontStyle { BOLD = "BOLD", BOLD_ITALIC = "BOLD_ITALIC", ITALIC = "ITALIC", @@ -371,7 +371,7 @@ export enum TextTrackFontStyle { * Possible text track type (follows the HTML5 text track type definitions). * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackType} */ -export enum TextTrackType { +export const enum TextTrackType { CAPTIONS = "CAPTIONS", CHAPTERS = "CHAPTERS", DESCRIPTIONS = "DESCRIPTIONS", @@ -383,7 +383,7 @@ export enum TextTrackType { * Text track window type. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TextTrackWindowType} */ -export enum TextTrackWindowType { +export const enum TextTrackWindowType { NONE = "NONE", NORMAL = "NORMAL", ROUNDED_CORNERS = "ROUNDED_CORNERS", @@ -393,7 +393,7 @@ export enum TextTrackWindowType { * Possible media track type. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.TrackType} */ -export enum TrackType { +export const enum TrackType { AUDIO = "AUDIO", TEXT = "TEXT", VIDEO = "VIDEO", @@ -403,7 +403,7 @@ export enum TrackType { * User actions. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.UserAction} */ -export enum UserAction { +export const enum UserAction { DISLIKE = "DISLIKE", FLAG = "FLAG", FOLLOW = "FOLLOW", @@ -416,7 +416,7 @@ export enum UserAction { * Context information for the user action. * [Documentation]{@link https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.messages#.UserActionContext} */ -export enum UserActionContext { +export const enum UserActionContext { ALBUM = "ALBUM", ARTIST = "ARTIST", CHANNEL = "CHANNEL", diff --git a/types/chromecast-caf-receiver/cast.framework.system.d.ts b/types/chromecast-caf-receiver/cast.framework.system.d.ts index 851ab18146f085..848bad2c24ad64 100644 --- a/types/chromecast-caf-receiver/cast.framework.system.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.system.d.ts @@ -4,7 +4,7 @@ export as namespace system; * System events dispatched by {@link framework.CastReceiverContext}. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.EventType */ -export enum EventType { +export const enum EventType { ALLOW_GROUP_CHANGE = "allowgroupchange", /** * Fired when there is a system error. @@ -61,7 +61,7 @@ export enum EventType { * Represents the current system state. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.SystemState */ -export enum SystemState { +export const enum SystemState { /** * The application has not been requested to start yet. */ @@ -92,7 +92,7 @@ export enum SystemState { * Types of custom messages. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.MessageType */ -export enum MessageType { +export const enum MessageType { /** * Messages are free-form strings. The application is responsible for encoding/decoding the information transmitted. */ @@ -108,7 +108,7 @@ export enum MessageType { * if the cast platform was unable to determine the state yet. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.StandbyState */ -export enum StandbyState { +export const enum StandbyState { NOT_STANDBY = "notstandby", STANDBY = "standby", UNKNOWN = "unknown", @@ -118,7 +118,7 @@ export enum StandbyState { * Represents the disconnect reason. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.DisconnectReason */ -export enum DisconnectReason { +export const enum DisconnectReason { /** * There was a protocol error. */ @@ -141,7 +141,7 @@ export enum DisconnectReason { * Represent where the receiver was launched from. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.LaunchedFrom */ -export enum LaunchedFrom { +export const enum LaunchedFrom { /** * App was launched by Cast V2 request. */ @@ -164,7 +164,7 @@ export enum LaunchedFrom { * Device capabilities. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.DeviceCapabilities */ -export enum DeviceCapabilities { +export const enum DeviceCapabilities { APP_FOREGROUND = "app_foreground", /** * Audio Assistant support. For example, Google Home and Google Home Mini. @@ -218,7 +218,7 @@ export enum DeviceCapabilities { * It may be UNKNOWN if the cast platform was unable to determine the state yet. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.system#.VisibilityState */ -export enum VisibilityState { +export const enum VisibilityState { NOT_VISIBLE = "notvisible", UNKNOWN = "unknown", VISIBLE = "visible", diff --git a/types/chromecast-caf-receiver/cast.framework.ui.d.ts b/types/chromecast-caf-receiver/cast.framework.ui.d.ts index dbb39af8746e50..9e8084796e0afd 100644 --- a/types/chromecast-caf-receiver/cast.framework.ui.d.ts +++ b/types/chromecast-caf-receiver/cast.framework.ui.d.ts @@ -20,7 +20,7 @@ export type ContentType = "video" | "audio" | "image"; * UI state of receiver application. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.State */ -export enum State { +export const enum State { LAUNCHING = "launching", IDLE = "idle", LOADING = "loading", @@ -33,7 +33,7 @@ export enum State { * Player data changed event types. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.PlayerDataEventType */ -export enum PlayerDataEventType { +export const enum PlayerDataEventType { ACTIVE_TRACK_IDS_CHANGED = "activeTrackIdsChanged", ANY_CHANGE = "*", APPLICATION_DATA_CHANGED = "applicationDataChanged", @@ -517,7 +517,7 @@ export class UiConfig { * Aspect ratio of all images in the media browse carousel. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.BrowseImageAspectRatio */ -export enum BrowseImageAspectRatio { +export const enum BrowseImageAspectRatio { /** * Square images. */ @@ -541,7 +541,7 @@ export enum BrowseImageAspectRatio { * available for the browse item. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.BrowseImageType */ -export enum BrowseImageType { +export const enum BrowseImageType { /** * A playlist that consists of songs by a specific * music artist or band, or radio seeded by an artist @@ -627,7 +627,7 @@ export enum BrowseImageType { * Badge that will be displayed on top of the browse item image. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.BrowseMediaBadge */ -export enum BrowseMediaBadge { +export const enum BrowseMediaBadge { /** * LIVE indicator badge. Should be used if stream is a live * content. @@ -639,7 +639,7 @@ export enum BrowseMediaBadge { * Predefined buttons for the Media Controls overlay * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.ControlsButton */ -export enum ControlsButton { +export const enum ControlsButton { /** * Turn on/off closed captions. */ @@ -720,7 +720,7 @@ export enum ControlsButton { * Touch Controls interface. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.ControlsSlot */ -export enum ControlsSlot { +export const enum ControlsSlot { /** * Side left slot. Deprecated, use SLOT_SECONDARY_1 instead. * @@ -774,7 +774,7 @@ export enum ControlsSlot { * Device display type. * @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.ui#.DisplayType */ -export enum DisplayType { +export const enum DisplayType { TV = "tv", TOUCH = "touch", } From 6c28e277ae69300479fb9f3d96ea16c206ecd983 Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Fri, 8 Aug 2025 18:08:05 +0200 Subject: [PATCH 09/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73315=20`dom?= =?UTF-8?q?-webcodecs`:=20Add=20`rotation`=20field=20to=20`VideoFrame`=20o?= =?UTF-8?q?bject=20by=20@JonnyBurger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/dom-webcodecs/webcodecs.generated.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/dom-webcodecs/webcodecs.generated.d.ts b/types/dom-webcodecs/webcodecs.generated.d.ts index b6142344df5eaa..077462b3da5603 100644 --- a/types/dom-webcodecs/webcodecs.generated.d.ts +++ b/types/dom-webcodecs/webcodecs.generated.d.ts @@ -426,6 +426,7 @@ interface VideoFrame { readonly format: VideoPixelFormat | null; readonly timestamp: number; readonly visibleRect: DOMRectReadOnly | null; + readonly rotation?: number; allocationSize(options?: VideoFrameCopyToOptions): number; clone(): VideoFrame; close(): void; From 665b45174b5a0ecf28a9889012b61e410efcf544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Fri, 8 Aug 2025 17:13:45 +0100 Subject: [PATCH 10/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73415=20node?= =?UTF-8?q?:=20remove=20TS=205.1=20support=20by=20@Renegade334?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node/package.json | 3 - .../node/ts5.1/compatibility/disposable.d.ts | 12 --- types/node/ts5.1/index.d.ts | 98 ------------------- types/node/ts5.1/tsconfig.dom.json | 22 ----- types/node/ts5.1/tsconfig.json | 24 ----- types/node/ts5.1/tsconfig.non-dom.json | 21 ---- types/node/ts5.1/tsconfig.webworker.json | 22 ----- 7 files changed, 202 deletions(-) delete mode 100644 types/node/ts5.1/compatibility/disposable.d.ts delete mode 100644 types/node/ts5.1/index.d.ts delete mode 100644 types/node/ts5.1/tsconfig.dom.json delete mode 100644 types/node/ts5.1/tsconfig.json delete mode 100644 types/node/ts5.1/tsconfig.non-dom.json delete mode 100644 types/node/ts5.1/tsconfig.webworker.json diff --git a/types/node/package.json b/types/node/package.json index ffd5cacc72b239..491cc4e767dc0b 100644 --- a/types/node/package.json +++ b/types/node/package.json @@ -10,9 +10,6 @@ "tsconfigs": ["tsconfig.dom.json", "tsconfig.non-dom.json", "tsconfig.webworker.json"], "types": "index", "typesVersions": { - "<=5.1": { - "*": ["ts5.1/*"] - }, "<=5.6": { "*": ["ts5.6/*"] }, diff --git a/types/node/ts5.1/compatibility/disposable.d.ts b/types/node/ts5.1/compatibility/disposable.d.ts deleted file mode 100644 index bcedc52bc39937..00000000000000 --- a/types/node/ts5.1/compatibility/disposable.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -interface SymbolConstructor { - readonly dispose: unique symbol; - readonly asyncDispose: unique symbol; -} - -interface Disposable { - [Symbol.dispose](): void; -} - -interface AsyncDisposable { - [Symbol.asyncDispose](): PromiseLike; -} diff --git a/types/node/ts5.1/index.d.ts b/types/node/ts5.1/index.d.ts deleted file mode 100644 index 1b1f88a5c66985..00000000000000 --- a/types/node/ts5.1/index.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * 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. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.1. - -// Reference required TypeScript libraries: -/// - -// TypeScript library polyfills required for TypeScript <=5.1: -/// - -// TypeScript library polyfills required for TypeScript <=5.6: -/// - -// Iterator definitions required for compatibility with TypeScript <5.6: -/// - -// Definitions for Node.js modules specific to TypeScript <=5.6: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/types/node/ts5.1/tsconfig.dom.json b/types/node/ts5.1/tsconfig.dom.json deleted file mode 100644 index 12ad0841e262fe..00000000000000 --- a/types/node/ts5.1/tsconfig.dom.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "files": [ - "index.d.ts", - "../node-tests.ts", - "../node-tests-dom.ts" - ], - "compilerOptions": { - "module": "commonjs", - "target": "esnext", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/types/node/ts5.1/tsconfig.json b/types/node/ts5.1/tsconfig.json deleted file mode 100644 index 496ad698cd748c..00000000000000 --- a/types/node/ts5.1/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "files": [ - "index.d.ts", - "../node-tests.ts", - "../node-tests-dom.ts", - "../node-tests-non-dom.ts", - "../node-tests-webworker.ts" - ], - "compilerOptions": { - "module": "commonjs", - "target": "esnext", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/types/node/ts5.1/tsconfig.non-dom.json b/types/node/ts5.1/tsconfig.non-dom.json deleted file mode 100644 index bf8b5605af51db..00000000000000 --- a/types/node/ts5.1/tsconfig.non-dom.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "files": [ - "index.d.ts", - "../node-tests.ts", - "../node-tests-non-dom.ts" - ], - "compilerOptions": { - "module": "commonjs", - "target": "esnext", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/types/node/ts5.1/tsconfig.webworker.json b/types/node/ts5.1/tsconfig.webworker.json deleted file mode 100644 index 0a371b60020b17..00000000000000 --- a/types/node/ts5.1/tsconfig.webworker.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "files": [ - "index.d.ts", - "../node-tests.ts", - "../node-tests-webworker.ts" - ], - "compilerOptions": { - "module": "commonjs", - "target": "esnext", - "lib": [ - "es6", - "webworker" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} From 1bbf59219cb28b73f5a110d5a16b2e0bba0d4041 Mon Sep 17 00:00:00 2001 From: Johan Levin Date: Fri, 8 Aug 2025 18:21:22 +0200 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73418=20[nod?= =?UTF-8?q?e]=20Export=20the=20QueuingStrategy=20interface=20in=20stream/w?= =?UTF-8?q?eb=20by=20@johan13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node/stream/web.d.ts | 4 ++++ types/node/v18/stream/web.d.ts | 4 ++++ types/node/v20/stream/web.d.ts | 4 ++++ types/node/v22/stream/web.d.ts | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/types/node/stream/web.d.ts b/types/node/stream/web.d.ts index 16cc1a24bc514e..881e29c089fdb1 100644 --- a/types/node/stream/web.d.ts +++ b/types/node/stream/web.d.ts @@ -6,6 +6,8 @@ type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").CountQueuingStrategy; type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} : import("stream/web").DecompressionStream; +type _QueuingStrategy = typeof globalThis extends { onmessage: any } ? {} + : import("stream/web").QueuingStrategy; type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").ReadableByteStreamController; type _ReadableStream = typeof globalThis extends { onmessage: any } ? {} @@ -487,6 +489,8 @@ declare module "stream/web" { } : typeof import("stream/web").DecompressionStream; + interface QueuingStrategy extends _QueuingStrategy {} + interface ReadableByteStreamController extends _ReadableByteStreamController {} /** * `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`. diff --git a/types/node/v18/stream/web.d.ts b/types/node/v18/stream/web.d.ts index ab123b8d03935b..f428a4b9fdb41e 100644 --- a/types/node/v18/stream/web.d.ts +++ b/types/node/v18/stream/web.d.ts @@ -6,6 +6,8 @@ type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").CountQueuingStrategy; type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} : import("stream/web").DecompressionStream; +type _QueuingStrategy = typeof globalThis extends { onmessage: any } ? {} + : import("stream/web").QueuingStrategy; type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").ReadableByteStreamController; type _ReadableStream = typeof globalThis extends { onmessage: any } ? {} @@ -457,6 +459,8 @@ declare module "stream/web" { } : typeof import("stream/web").DecompressionStream; + interface QueuingStrategy extends _QueuingStrategy {} + interface ReadableByteStreamController extends _ReadableByteStreamController {} var ReadableByteStreamController: typeof globalThis extends { onmessage: any; ReadableByteStreamController: infer T } ? T diff --git a/types/node/v20/stream/web.d.ts b/types/node/v20/stream/web.d.ts index a6e6b5774f89b3..1b713a94165b14 100644 --- a/types/node/v20/stream/web.d.ts +++ b/types/node/v20/stream/web.d.ts @@ -6,6 +6,8 @@ type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").CountQueuingStrategy; type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} : import("stream/web").DecompressionStream; +type _QueuingStrategy = typeof globalThis extends { onmessage: any } ? {} + : import("stream/web").QueuingStrategy; type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").ReadableByteStreamController; type _ReadableStream = typeof globalThis extends { onmessage: any } ? {} @@ -463,6 +465,8 @@ declare module "stream/web" { } : typeof import("stream/web").DecompressionStream; + interface QueuingStrategy extends _QueuingStrategy {} + interface ReadableByteStreamController extends _ReadableByteStreamController {} var ReadableByteStreamController: typeof globalThis extends { onmessage: any; ReadableByteStreamController: infer T } ? T diff --git a/types/node/v22/stream/web.d.ts b/types/node/v22/stream/web.d.ts index 16cc1a24bc514e..881e29c089fdb1 100644 --- a/types/node/v22/stream/web.d.ts +++ b/types/node/v22/stream/web.d.ts @@ -6,6 +6,8 @@ type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").CountQueuingStrategy; type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} : import("stream/web").DecompressionStream; +type _QueuingStrategy = typeof globalThis extends { onmessage: any } ? {} + : import("stream/web").QueuingStrategy; type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {} : import("stream/web").ReadableByteStreamController; type _ReadableStream = typeof globalThis extends { onmessage: any } ? {} @@ -487,6 +489,8 @@ declare module "stream/web" { } : typeof import("stream/web").DecompressionStream; + interface QueuingStrategy extends _QueuingStrategy {} + interface ReadableByteStreamController extends _ReadableByteStreamController {} /** * `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`.