Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12013,7 +12013,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -12205,7 +12205,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3057,7 +3057,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -3242,7 +3242,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -3023,7 +3023,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.5/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.5/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.5/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.6/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.6/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.6/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12010,7 +12010,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -12202,7 +12202,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.9/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -3239,7 +3239,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.9/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2835,7 +2835,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -3020,7 +3020,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/ts5.9/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3561,7 +3561,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -3746,7 +3746,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
4 changes: 2 additions & 2 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3564,7 +3564,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {

declare var DOMMatrix: {
prototype: DOMMatrix;
new(init?: string | number[]): DOMMatrix;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down Expand Up @@ -3749,7 +3749,7 @@ interface DOMMatrixReadOnly {

declare var DOMMatrixReadOnly: {
prototype: DOMMatrixReadOnly;
new(init?: string | number[]): DOMMatrixReadOnly;
new(init?: string | number[] | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>): 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.
*
Expand Down
32 changes: 32 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -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<unrestricted double>`, so the support must be added via override.
// https://github.com/microsoft/TypeScript/issues/60862
"constructor": {
"signature": {
"0": {
"param": [
{
"name": "init",
"additionalTypes": ["Float32Array", "Float64Array"]
}
]
}
}
}
},
"DOMMatrixReadOnly": {
"constructor": {
"signature": {
"0": {
"param": [
{
"name": "init",
"additionalTypes": ["Float32Array", "Float64Array"]
}
]
}
}
}
},
"HTMLElement": {
"properties": {
"property": {
Expand Down
11 changes: 11 additions & 0 deletions unittests/files/dommatrix.ts
Original file line number Diff line number Diff line change
@@ -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]);
Loading