From b5f938ddeea434639e2a4a50a3b60899e2e2c584 Mon Sep 17 00:00:00 2001 From: Magicapple <1540796514@qq.com> Date: Thu, 24 Sep 2026 09:24:57 +0800 Subject: [PATCH 1/3] fix(dom): accept typed arrays in DOMMatrix constructor The DOMMatrix and DOMMatrixReadOnly constructors accept Float32Array and Float64Array in all browsers (documented on MDN), but the current geometry spec IDL lists only 'sequence' for the constructor, so the generated lib.dom.d.ts loses typed array support. Add constructor overrides restoring 'string | number[] | Float32Array | Float64Array' for both interfaces. Fixes microsoft/TypeScript#60862 --- baselines/dom.generated.d.ts | 4 ++-- baselines/serviceworker.generated.d.ts | 4 ++-- baselines/sharedworker.generated.d.ts | 4 ++-- baselines/webworker.generated.d.ts | 4 ++-- inputfiles/overridingTypes.jsonc | 32 ++++++++++++++++++++++++++ unittests/files/dommatrix.ts | 11 +++++++++ 6 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 unittests/files/dommatrix.ts diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index f3b5e3c02..7b001a05c 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -12013,7 +12013,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -12205,7 +12205,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index fd87652cd..b3250816f 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -3057,7 +3057,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3242,7 +3242,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 7aa724ad6..0f46e4dc2 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -2838,7 +2838,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3023,7 +3023,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 07959870c..daabc02f2 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -3564,7 +3564,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3749,7 +3749,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 8dabe6754..3f7949567 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -275,6 +275,38 @@ } } }, + "DOMMatrix": { + // Browsers still accept typed arrays in the constructor, and MDN documents + // `Float32Array` / `Float64Array` variants. The current spec IDL only lists + // `sequence`, so the support must be added via override. + // https://github.com/microsoft/TypeScript/issues/60862 + "constructor": { + "signature": { + "0": { + "param": [ + { + "name": "init", + "overrideType": "string | number[] | Float32Array | Float64Array" + } + ] + } + } + } + }, + "DOMMatrixReadOnly": { + "constructor": { + "signature": { + "0": { + "param": [ + { + "name": "init", + "overrideType": "string | number[] | Float32Array | Float64Array" + } + ] + } + } + } + }, "HTMLElement": { "properties": { "property": { diff --git a/unittests/files/dommatrix.ts b/unittests/files/dommatrix.ts new file mode 100644 index 000000000..c36424ab3 --- /dev/null +++ b/unittests/files/dommatrix.ts @@ -0,0 +1,11 @@ +// DOMMatrix constructor accepts typed arrays in all browsers. +// https://github.com/microsoft/TypeScript/issues/60862 +new DOMMatrix(new Float32Array(16)); +new DOMMatrix(new Float64Array(16)); +new DOMMatrixReadOnly(new Float32Array(16)); +new DOMMatrixReadOnly(new Float64Array(16)); + +// Existing overloads keep working. +new DOMMatrix(); +new DOMMatrix("matrix(1, 0, 0, 1, 0, 0)"); +new DOMMatrix([1, 0, 0, 1, 0, 0]); From 99b24c2b185aaa9822143f9ecc860f3481d65da5 Mon Sep 17 00:00:00 2001 From: Magicapple <1540796514@qq.com> Date: Thu, 24 Sep 2026 09:41:25 +0800 Subject: [PATCH 2/3] fix(test): update ts5.5 baselines missed in recursive copy --- baselines/ts5.5/dom.generated.d.ts | 4 ++-- baselines/ts5.5/serviceworker.generated.d.ts | 4 ++-- baselines/ts5.5/sharedworker.generated.d.ts | 4 ++-- baselines/ts5.5/webworker.generated.d.ts | 4 ++-- baselines/ts5.6/dom.generated.d.ts | 4 ++-- baselines/ts5.6/serviceworker.generated.d.ts | 4 ++-- baselines/ts5.6/sharedworker.generated.d.ts | 4 ++-- baselines/ts5.6/webworker.generated.d.ts | 4 ++-- baselines/ts5.9/dom.generated.d.ts | 4 ++-- baselines/ts5.9/serviceworker.generated.d.ts | 4 ++-- baselines/ts5.9/sharedworker.generated.d.ts | 4 ++-- baselines/ts5.9/webworker.generated.d.ts | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index aef6f6750..c5730a5a9 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -12002,7 +12002,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -12194,7 +12194,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index e7aa90dc7..e45540610 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -3054,7 +3054,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3239,7 +3239,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index ad5d84c20..760e064ed 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -2835,7 +2835,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3020,7 +3020,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index f06292a87..e93737389 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -3561,7 +3561,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3746,7 +3746,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 3138a8b64..6ba70be14 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -12010,7 +12010,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -12202,7 +12202,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index e7aa90dc7..e45540610 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -3054,7 +3054,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3239,7 +3239,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index ad5d84c20..760e064ed 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -2835,7 +2835,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3020,7 +3020,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index f06292a87..e93737389 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -3561,7 +3561,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3746,7 +3746,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 2c94c0304..d9fa1cc25 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -12010,7 +12010,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -12202,7 +12202,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 42cc0a76c..7babafb50 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -3054,7 +3054,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3239,7 +3239,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index d1ba1c70d..79227298b 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -2835,7 +2835,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3020,7 +3020,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index b97d90878..a22674387 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -3561,7 +3561,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3746,7 +3746,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * From ef34ea03d897d10bc9fff34b02f2aff4e517d96f Mon Sep 17 00:00:00 2001 From: Magicapple <1540796514@qq.com> Date: Thu, 24 Sep 2026 12:48:39 +0800 Subject: [PATCH 3/3] refactor(dom): use additionalTypes for DOMMatrix constructor Following review feedback: appending 'Float32Array' / 'Float64Array' via additionalTypes keeps the IDL-derived union members intact and lets the generator emit the version-appropriate syntax (Float32Array for the current target, plain Float32Array for the ts5.5/ts5.6 targets). --- baselines/dom.generated.d.ts | 4 ++-- baselines/serviceworker.generated.d.ts | 4 ++-- baselines/sharedworker.generated.d.ts | 4 ++-- baselines/ts5.9/dom.generated.d.ts | 4 ++-- baselines/ts5.9/serviceworker.generated.d.ts | 4 ++-- baselines/ts5.9/sharedworker.generated.d.ts | 4 ++-- baselines/ts5.9/webworker.generated.d.ts | 4 ++-- baselines/webworker.generated.d.ts | 4 ++-- inputfiles/overridingTypes.jsonc | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 7b001a05c..42523d8a9 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -12013,7 +12013,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -12205,7 +12205,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index b3250816f..1f2772d4b 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -3057,7 +3057,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3242,7 +3242,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 0f46e4dc2..c184e7f08 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -2838,7 +2838,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3023,7 +3023,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index d9fa1cc25..ad495fd39 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -12010,7 +12010,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -12202,7 +12202,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 7babafb50..c58858f2f 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -3054,7 +3054,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3239,7 +3239,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index 79227298b..9fe996fc9 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -2835,7 +2835,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3020,7 +3020,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index a22674387..99b9de107 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -3561,7 +3561,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3746,7 +3746,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index daabc02f2..82f012dd5 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -3564,7 +3564,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3749,7 +3749,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; + new(init?: string | number[] | Float32Array | Float64Array): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 3f7949567..9d6bd8a2c 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -286,7 +286,7 @@ "param": [ { "name": "init", - "overrideType": "string | number[] | Float32Array | Float64Array" + "additionalTypes": ["Float32Array", "Float64Array"] } ] } @@ -300,7 +300,7 @@ "param": [ { "name": "init", - "overrideType": "string | number[] | Float32Array | Float64Array" + "additionalTypes": ["Float32Array", "Float64Array"] } ] }