forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into gabritto/issue46609
- Loading branch information
Showing
88 changed files
with
1,430 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
interface Array<T> { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): T | undefined; | ||
} | ||
|
||
interface ReadonlyArray<T> { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): T | undefined; | ||
} | ||
|
||
interface Int8Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Uint8Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Uint8ClampedArray { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Int16Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Uint16Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Int32Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Uint32Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Float32Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface Float64Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): number | undefined; | ||
} | ||
|
||
interface BigInt64Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): bigint | undefined; | ||
} | ||
|
||
interface BigUint64Array { | ||
/** | ||
* Returns the item located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): bigint | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference lib="es2021" /> | ||
/// <reference lib="es2022.array" /> | ||
/// <reference lib="es2022.error" /> | ||
/// <reference lib="es2022.object" /> | ||
/// <reference lib="es2022.string" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
interface ErrorOptions { | ||
cause?: Error; | ||
} | ||
|
||
interface ErrorConstructor { | ||
new(message?: string, options?: ErrorOptions): Error; | ||
(message?: string, options?: ErrorOptions): Error; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference lib="es2022" /> | ||
/// <reference lib="dom" /> | ||
/// <reference lib="webworker.importscripts" /> | ||
/// <reference lib="scripthost" /> | ||
/// <reference lib="dom.iterable" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
interface Object { | ||
/** | ||
* Determines whether an object has a property with the specified name. | ||
* @param o An object. | ||
* @param v A property name. | ||
*/ | ||
hasOwn(o: object, v: PropertyKey): boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
interface String { | ||
/** | ||
* Returns a new String consisting of the single UTF-16 code unit located at the specified index. | ||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item. | ||
*/ | ||
at(index: number): string | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/// <reference lib="es2021" /> | ||
/// <reference lib="es2022" /> | ||
/// <reference lib="esnext.intl" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.