-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Introduce ES2024 target and fix some types #58573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
541081d
fix(dts): add missing types to support resizable arraybuffer
indrajitbnikam e675236
fix(dts): add separate file to add missing arrayBuffer and sharedArra…
indrajitbnikam 51cbc24
fix: update the baselines
indrajitbnikam 7cb5130
Merge branch 'main' into feat/update-types
petamoriken 0d5841a
Update JSDoc
petamoriken 2b68ab7
Update: migrate to ES2024
petamoriken 2161140
Fix ES2017 types
petamoriken 965a2cb
Update: add ES2024 ArrayBuffer transfer
petamoriken c7afa96
Fix ES2024 types
petamoriken 67d6277
Update src/lib/libs.json
petamoriken ae9f93f
Add test cases
petamoriken c2e6381
Tweak
petamoriken 4a3a8fc
Update baselines
petamoriken dc52cdf
Fix the mistake
petamoriken 378fdb9
Update baselines
petamoriken bfc5b41
Fix `ArrayBuffer.prototype.slice` type
petamoriken eb7a391
Tweak
petamoriken 8e19150
Tweak
petamoriken 0d60852
Introduce ES2024 target
petamoriken 5a38111
Update baselines
petamoriken e306c6a
Tweak MDN URLs
petamoriken 689e5ee
Merge branch 'main' into feat/update-types
petamoriken 3dd8b73
Merge branch 'main' into feat/update-types
petamoriken 6b5d953
Fix: move `Atomics.waitAsync` types to ES2024
petamoriken 99c1684
Update baselines
petamoriken ffa4c9b
Tweak
petamoriken 5b0e12a
Fix
petamoriken 1f67edc
Update baselines
petamoriken fbd2e18
Merge branch 'main' into feat/update-types
petamoriken 5dd9ddb
Merge branch 'main' into feat/update-types
petamoriken c41d45c
update suggestions
petamoriken f0e156a
Update NOTE comments
petamoriken 1b26a55
Merge branch 'main' into feat/update-types
petamoriken 2e0a288
Update src/lib/es2024.collection.d.ts
petamoriken 59ce25d
Merge branch 'main' into feat/update-types
petamoriken 25ede1f
tweak
petamoriken f354580
add ES2024 Atomics.wait test for ES2022 lib
petamoriken dee70c4
update baselines
petamoriken 604956a
update es2024SharedMemory.ts
petamoriken eeffd20
update baselines
petamoriken c5efb87
fix
petamoriken 5e73d09
Merge branch 'main' into feat/update-types
petamoriken d40ae6d
Merge branch 'main' into feat/update-types
petamoriken 1b35d86
Fix `Iterable`
petamoriken aa80f7c
Merge branch 'main' into feat/update-types
petamoriken 58d0298
Merge branch 'main' into feat/update-types
petamoriken d336661
update comments
petamoriken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update: migrate to ES2024
- Loading branch information
commit 2b68ab70bd3ac9f239729ed6c3ee2d166ff45723
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,26 @@ | ||
| interface ArrayBuffer { | ||
| /** | ||
| * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. | ||
| * | ||
| * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) | ||
| */ | ||
| get maxByteLength(): number; | ||
|
|
||
| /** | ||
| * Returns true if this ArrayBuffer can be resized. | ||
| * | ||
| * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) | ||
| */ | ||
| get resizable(): boolean; | ||
|
|
||
| /** | ||
| * Resizes the ArrayBuffer to the specified size (in bytes). | ||
| * | ||
| * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) | ||
| */ | ||
| resize(newByteLength: number): undefined; | ||
| } | ||
|
|
||
| interface ArrayBufferConstructor { | ||
| new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer; | ||
| } |
This file contains hidden or 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,11 @@ | ||
| interface MapConstructor { | ||
| /** | ||
| * Groups members of an iterable according to the return value of the passed callback. | ||
| * @param items An iterable. | ||
| * @param keySelector A callback which will be invoked for each item in items. | ||
| */ | ||
| groupBy<K, T>( | ||
| items: Iterable<T>, | ||
|
petamoriken marked this conversation as resolved.
|
||
| keySelector: (item: T, index: number) => K, | ||
| ): Map<K, T[]>; | ||
| } | ||
This file contains hidden or 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,6 @@ | ||
| /// <reference lib="es2023" /> | ||
| /// <reference lib="es2024.arraybuffer" /> | ||
| /// <reference lib="es2024.collection" /> | ||
| /// <reference lib="es2024.object" /> | ||
| /// <reference lib="es2024.promise" /> | ||
| /// <reference lib="es2024.sharedmemory" /> |
This file contains hidden or 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,6 @@ | ||
| /// <reference lib="es2024" /> | ||
| /// <reference lib="dom" /> | ||
| /// <reference lib="webworker.importscripts" /> | ||
| /// <reference lib="scripthost" /> | ||
| /// <reference lib="dom.iterable" /> | ||
| /// <reference lib="dom.asynciterable" /> |
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,27 @@ | ||
| interface SharedArrayBuffer { | ||
| /** | ||
| * Returns true if this SharedArrayBuffer can be grown. | ||
| * | ||
| * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) | ||
| */ | ||
| get growable(): number; | ||
|
|
||
| /** | ||
| * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. | ||
| * | ||
| * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) | ||
| */ | ||
| get maxByteLength(): number; | ||
|
|
||
| /** | ||
| * Grows the SharedArrayBuffer to the specified size (in bytes). | ||
| * | ||
| * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) | ||
| */ | ||
| grow(newByteLength: number): undefined; | ||
| } | ||
|
|
||
| interface SharedArrayBufferConstructor { | ||
| new (); | ||
| new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer; | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.