Skip to content

Commit a3f39ec

Browse files
authored
Fix microsoft#16521: mark thisArg as optional in typed array map function (microsoft#16526)
1 parent eaa8f48 commit a3f39ec

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lib/es5.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ interface Int8Array {
16351635
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
16361636
* If thisArg is omitted, undefined is used as the this value.
16371637
*/
1638-
map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg: any): Int8Array;
1638+
map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
16391639

16401640
/**
16411641
* Calls the specified callback function for all the elements in an array. The return value of
@@ -1902,7 +1902,7 @@ interface Uint8Array {
19021902
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
19031903
* If thisArg is omitted, undefined is used as the this value.
19041904
*/
1905-
map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg: any): Uint8Array;
1905+
map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
19061906

19071907
/**
19081908
* Calls the specified callback function for all the elements in an array. The return value of
@@ -2169,7 +2169,7 @@ interface Uint8ClampedArray {
21692169
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
21702170
* If thisArg is omitted, undefined is used as the this value.
21712171
*/
2172-
map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: any): Uint8ClampedArray;
2172+
map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
21732173

21742174
/**
21752175
* Calls the specified callback function for all the elements in an array. The return value of
@@ -2434,7 +2434,7 @@ interface Int16Array {
24342434
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
24352435
* If thisArg is omitted, undefined is used as the this value.
24362436
*/
2437-
map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg: any): Int16Array;
2437+
map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
24382438

24392439
/**
24402440
* Calls the specified callback function for all the elements in an array. The return value of
@@ -2702,7 +2702,7 @@ interface Uint16Array {
27022702
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
27032703
* If thisArg is omitted, undefined is used as the this value.
27042704
*/
2705-
map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg: any): Uint16Array;
2705+
map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
27062706

27072707
/**
27082708
* Calls the specified callback function for all the elements in an array. The return value of
@@ -3235,7 +3235,7 @@ interface Uint32Array {
32353235
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
32363236
* If thisArg is omitted, undefined is used as the this value.
32373237
*/
3238-
map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg: any): Uint32Array;
3238+
map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
32393239

32403240
/**
32413241
* Calls the specified callback function for all the elements in an array. The return value of
@@ -3502,7 +3502,7 @@ interface Float32Array {
35023502
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
35033503
* If thisArg is omitted, undefined is used as the this value.
35043504
*/
3505-
map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg: any): Float32Array;
3505+
map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
35063506

35073507
/**
35083508
* Calls the specified callback function for all the elements in an array. The return value of

0 commit comments

Comments
 (0)