forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 14
Add .findLast() and .findLastIndex() #69
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
mkubilayk
merged 2 commits into
bloomberg:oss-hackathon-48829
from
m-basov:add-find-last
Jun 22, 2022
+1,503
−48
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference lib="es2022" /> | ||
/// <reference lib="es2023.array" /> |
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,5 @@ | ||
/// <reference lib="es2023" /> | ||
/// <reference lib="dom" /> | ||
/// <reference lib="webworker.importscripts" /> | ||
/// <reference lib="scripthost" /> | ||
/// <reference lib="dom.iterable" /> |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/// <reference lib="es2022" /> | ||
/// <reference lib="es2023" /> | ||
/// <reference lib="esnext.intl" /> |
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
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
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
18 changes: 18 additions & 0 deletions
18
tests/baselines/reference/callChainWithSuper(target=es2023).js
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,18 @@ | ||
//// [callChainWithSuper.ts] | ||
// GH#34952 | ||
class Base { method?() {} } | ||
class Derived extends Base { | ||
method1() { return super.method?.(); } | ||
method2() { return super["method"]?.(); } | ||
} | ||
|
||
//// [callChainWithSuper.js] | ||
"use strict"; | ||
// GH#34952 | ||
class Base { | ||
method() { } | ||
} | ||
class Derived extends Base { | ||
method1() { return super.method?.(); } | ||
method2() { return super["method"]?.(); } | ||
} |
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
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,53 @@ | ||
//// [findLast.ts] | ||
[0].findLast((item) => item === 0); | ||
new Int8Array().findLast((item) => item === 0); | ||
new Uint8Array().findLast((item) => item === 0); | ||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
new Int16Array().findLast((item) => item === 0); | ||
new Uint16Array().findLast((item) => item === 0); | ||
new Int32Array().findLast((item) => item === 0); | ||
new Uint32Array().findLast((item) => item === 0); | ||
new Float32Array().findLast((item) => item === 0); | ||
new Float64Array().findLast((item) => item === 0); | ||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
|
||
[0].findLastIndex((item) => item === 0); | ||
new Int8Array().findLastIndex((item) => item === 0); | ||
new Uint8Array().findLastIndex((item) => item === 0); | ||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
new Int16Array().findLastIndex((item) => item === 0); | ||
new Uint16Array().findLastIndex((item) => item === 0); | ||
new Int32Array().findLastIndex((item) => item === 0); | ||
new Uint32Array().findLastIndex((item) => item === 0); | ||
new Float32Array().findLastIndex((item) => item === 0); | ||
new Float64Array().findLastIndex((item) => item === 0); | ||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); | ||
|
||
|
||
//// [findLast.js] | ||
[0].findLast((item) => item === 0); | ||
new Int8Array().findLast((item) => item === 0); | ||
new Uint8Array().findLast((item) => item === 0); | ||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
new Int16Array().findLast((item) => item === 0); | ||
new Uint16Array().findLast((item) => item === 0); | ||
new Int32Array().findLast((item) => item === 0); | ||
new Uint32Array().findLast((item) => item === 0); | ||
new Float32Array().findLast((item) => item === 0); | ||
new Float64Array().findLast((item) => item === 0); | ||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
[0].findLastIndex((item) => item === 0); | ||
new Int8Array().findLastIndex((item) => item === 0); | ||
new Uint8Array().findLastIndex((item) => item === 0); | ||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
new Int16Array().findLastIndex((item) => item === 0); | ||
new Uint16Array().findLastIndex((item) => item === 0); | ||
new Int32Array().findLastIndex((item) => item === 0); | ||
new Uint32Array().findLastIndex((item) => item === 0); | ||
new Float32Array().findLastIndex((item) => item === 0); | ||
new Float64Array().findLastIndex((item) => item === 0); | ||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); |
171 changes: 171 additions & 0 deletions
171
tests/baselines/reference/findLast(target=es2023).symbols
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,171 @@ | ||
=== tests/cases/compiler/findLast.ts === | ||
[0].findLast((item) => item === 0); | ||
>[0].findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 0, 14)) | ||
>item : Symbol(item, Decl(findLast.ts, 0, 14)) | ||
|
||
new Int8Array().findLast((item) => item === 0); | ||
>new Int8Array().findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 1, 26)) | ||
>item : Symbol(item, Decl(findLast.ts, 1, 26)) | ||
|
||
new Uint8Array().findLast((item) => item === 0); | ||
>new Uint8Array().findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 2, 27)) | ||
>item : Symbol(item, Decl(findLast.ts, 2, 27)) | ||
|
||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
>new Uint8ClampedArray().findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 3, 34)) | ||
>item : Symbol(item, Decl(findLast.ts, 3, 34)) | ||
|
||
new Int16Array().findLast((item) => item === 0); | ||
>new Int16Array().findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 4, 27)) | ||
>item : Symbol(item, Decl(findLast.ts, 4, 27)) | ||
|
||
new Uint16Array().findLast((item) => item === 0); | ||
>new Uint16Array().findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 5, 28)) | ||
>item : Symbol(item, Decl(findLast.ts, 5, 28)) | ||
|
||
new Int32Array().findLast((item) => item === 0); | ||
>new Int32Array().findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 6, 27)) | ||
>item : Symbol(item, Decl(findLast.ts, 6, 27)) | ||
|
||
new Uint32Array().findLast((item) => item === 0); | ||
>new Uint32Array().findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 7, 28)) | ||
>item : Symbol(item, Decl(findLast.ts, 7, 28)) | ||
|
||
new Float32Array().findLast((item) => item === 0); | ||
>new Float32Array().findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 8, 29)) | ||
>item : Symbol(item, Decl(findLast.ts, 8, 29)) | ||
|
||
new Float64Array().findLast((item) => item === 0); | ||
>new Float64Array().findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 9, 29)) | ||
>item : Symbol(item, Decl(findLast.ts, 9, 29)) | ||
|
||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
>new BigInt64Array().findLast : Symbol(BigInt64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLast : Symbol(BigInt64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 10, 30)) | ||
>item : Symbol(item, Decl(findLast.ts, 10, 30)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
>new BigUint64Array().findLast : Symbol(BigUint64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLast : Symbol(BigUint64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 11, 31)) | ||
>item : Symbol(item, Decl(findLast.ts, 11, 31)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
||
[0].findLastIndex((item) => item === 0); | ||
>[0].findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 13, 19)) | ||
>item : Symbol(item, Decl(findLast.ts, 13, 19)) | ||
|
||
new Int8Array().findLastIndex((item) => item === 0); | ||
>new Int8Array().findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 14, 31)) | ||
>item : Symbol(item, Decl(findLast.ts, 14, 31)) | ||
|
||
new Uint8Array().findLastIndex((item) => item === 0); | ||
>new Uint8Array().findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 15, 32)) | ||
>item : Symbol(item, Decl(findLast.ts, 15, 32)) | ||
|
||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
>new Uint8ClampedArray().findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 16, 39)) | ||
>item : Symbol(item, Decl(findLast.ts, 16, 39)) | ||
|
||
new Int16Array().findLastIndex((item) => item === 0); | ||
>new Int16Array().findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 17, 32)) | ||
>item : Symbol(item, Decl(findLast.ts, 17, 32)) | ||
|
||
new Uint16Array().findLastIndex((item) => item === 0); | ||
>new Uint16Array().findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 18, 33)) | ||
>item : Symbol(item, Decl(findLast.ts, 18, 33)) | ||
|
||
new Int32Array().findLastIndex((item) => item === 0); | ||
>new Int32Array().findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 19, 32)) | ||
>item : Symbol(item, Decl(findLast.ts, 19, 32)) | ||
|
||
new Uint32Array().findLastIndex((item) => item === 0); | ||
>new Uint32Array().findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 20, 33)) | ||
>item : Symbol(item, Decl(findLast.ts, 20, 33)) | ||
|
||
new Float32Array().findLastIndex((item) => item === 0); | ||
>new Float32Array().findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 21, 34)) | ||
>item : Symbol(item, Decl(findLast.ts, 21, 34)) | ||
|
||
new Float64Array().findLastIndex((item) => item === 0); | ||
>new Float64Array().findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 22, 34)) | ||
>item : Symbol(item, Decl(findLast.ts, 22, 34)) | ||
|
||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
>new BigInt64Array().findLastIndex : Symbol(BigInt64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLastIndex : Symbol(BigInt64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 23, 35)) | ||
>item : Symbol(item, Decl(findLast.ts, 23, 35)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); | ||
>new BigUint64Array().findLastIndex : Symbol(BigUint64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLastIndex : Symbol(BigUint64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 24, 36)) | ||
>item : Symbol(item, Decl(findLast.ts, 24, 36)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
297 changes: 297 additions & 0 deletions
297
tests/baselines/reference/findLast(target=es2023).types
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
//// [findLast.ts] | ||
[0].findLast((item) => item === 0); | ||
new Int8Array().findLast((item) => item === 0); | ||
new Uint8Array().findLast((item) => item === 0); | ||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
new Int16Array().findLast((item) => item === 0); | ||
new Uint16Array().findLast((item) => item === 0); | ||
new Int32Array().findLast((item) => item === 0); | ||
new Uint32Array().findLast((item) => item === 0); | ||
new Float32Array().findLast((item) => item === 0); | ||
new Float64Array().findLast((item) => item === 0); | ||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
|
||
[0].findLastIndex((item) => item === 0); | ||
new Int8Array().findLastIndex((item) => item === 0); | ||
new Uint8Array().findLastIndex((item) => item === 0); | ||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
new Int16Array().findLastIndex((item) => item === 0); | ||
new Uint16Array().findLastIndex((item) => item === 0); | ||
new Int32Array().findLastIndex((item) => item === 0); | ||
new Uint32Array().findLastIndex((item) => item === 0); | ||
new Float32Array().findLastIndex((item) => item === 0); | ||
new Float64Array().findLastIndex((item) => item === 0); | ||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); | ||
|
||
|
||
//// [findLast.js] | ||
[0].findLast((item) => item === 0); | ||
new Int8Array().findLast((item) => item === 0); | ||
new Uint8Array().findLast((item) => item === 0); | ||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
new Int16Array().findLast((item) => item === 0); | ||
new Uint16Array().findLast((item) => item === 0); | ||
new Int32Array().findLast((item) => item === 0); | ||
new Uint32Array().findLast((item) => item === 0); | ||
new Float32Array().findLast((item) => item === 0); | ||
new Float64Array().findLast((item) => item === 0); | ||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
[0].findLastIndex((item) => item === 0); | ||
new Int8Array().findLastIndex((item) => item === 0); | ||
new Uint8Array().findLastIndex((item) => item === 0); | ||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
new Int16Array().findLastIndex((item) => item === 0); | ||
new Uint16Array().findLastIndex((item) => item === 0); | ||
new Int32Array().findLastIndex((item) => item === 0); | ||
new Uint32Array().findLastIndex((item) => item === 0); | ||
new Float32Array().findLastIndex((item) => item === 0); | ||
new Float64Array().findLastIndex((item) => item === 0); | ||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); |
171 changes: 171 additions & 0 deletions
171
tests/baselines/reference/findLast(target=esnext).symbols
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,171 @@ | ||
=== tests/cases/compiler/findLast.ts === | ||
[0].findLast((item) => item === 0); | ||
>[0].findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLast : Symbol(Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 0, 14)) | ||
>item : Symbol(item, Decl(findLast.ts, 0, 14)) | ||
|
||
new Int8Array().findLast((item) => item === 0); | ||
>new Int8Array().findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Int8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 1, 26)) | ||
>item : Symbol(item, Decl(findLast.ts, 1, 26)) | ||
|
||
new Uint8Array().findLast((item) => item === 0); | ||
>new Uint8Array().findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 2, 27)) | ||
>item : Symbol(item, Decl(findLast.ts, 2, 27)) | ||
|
||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
>new Uint8ClampedArray().findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint8ClampedArray.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 3, 34)) | ||
>item : Symbol(item, Decl(findLast.ts, 3, 34)) | ||
|
||
new Int16Array().findLast((item) => item === 0); | ||
>new Int16Array().findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Int16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 4, 27)) | ||
>item : Symbol(item, Decl(findLast.ts, 4, 27)) | ||
|
||
new Uint16Array().findLast((item) => item === 0); | ||
>new Uint16Array().findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint16Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 5, 28)) | ||
>item : Symbol(item, Decl(findLast.ts, 5, 28)) | ||
|
||
new Int32Array().findLast((item) => item === 0); | ||
>new Int32Array().findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Int32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 6, 27)) | ||
>item : Symbol(item, Decl(findLast.ts, 6, 27)) | ||
|
||
new Uint32Array().findLast((item) => item === 0); | ||
>new Uint32Array().findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Uint32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 7, 28)) | ||
>item : Symbol(item, Decl(findLast.ts, 7, 28)) | ||
|
||
new Float32Array().findLast((item) => item === 0); | ||
>new Float32Array().findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Float32Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 8, 29)) | ||
>item : Symbol(item, Decl(findLast.ts, 8, 29)) | ||
|
||
new Float64Array().findLast((item) => item === 0); | ||
>new Float64Array().findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLast : Symbol(Float64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 9, 29)) | ||
>item : Symbol(item, Decl(findLast.ts, 9, 29)) | ||
|
||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
>new BigInt64Array().findLast : Symbol(BigInt64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLast : Symbol(BigInt64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 10, 30)) | ||
>item : Symbol(item, Decl(findLast.ts, 10, 30)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
>new BigUint64Array().findLast : Symbol(BigUint64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLast : Symbol(BigUint64Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 11, 31)) | ||
>item : Symbol(item, Decl(findLast.ts, 11, 31)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
||
[0].findLastIndex((item) => item === 0); | ||
>[0].findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLastIndex : Symbol(Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 13, 19)) | ||
>item : Symbol(item, Decl(findLast.ts, 13, 19)) | ||
|
||
new Int8Array().findLastIndex((item) => item === 0); | ||
>new Int8Array().findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Int8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 14, 31)) | ||
>item : Symbol(item, Decl(findLast.ts, 14, 31)) | ||
|
||
new Uint8Array().findLastIndex((item) => item === 0); | ||
>new Uint8Array().findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 15, 32)) | ||
>item : Symbol(item, Decl(findLast.ts, 15, 32)) | ||
|
||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
>new Uint8ClampedArray().findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint8ClampedArray.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 16, 39)) | ||
>item : Symbol(item, Decl(findLast.ts, 16, 39)) | ||
|
||
new Int16Array().findLastIndex((item) => item === 0); | ||
>new Int16Array().findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Int16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 17, 32)) | ||
>item : Symbol(item, Decl(findLast.ts, 17, 32)) | ||
|
||
new Uint16Array().findLastIndex((item) => item === 0); | ||
>new Uint16Array().findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint16Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 18, 33)) | ||
>item : Symbol(item, Decl(findLast.ts, 18, 33)) | ||
|
||
new Int32Array().findLastIndex((item) => item === 0); | ||
>new Int32Array().findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Int32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 19, 32)) | ||
>item : Symbol(item, Decl(findLast.ts, 19, 32)) | ||
|
||
new Uint32Array().findLastIndex((item) => item === 0); | ||
>new Uint32Array().findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Uint32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 20, 33)) | ||
>item : Symbol(item, Decl(findLast.ts, 20, 33)) | ||
|
||
new Float32Array().findLastIndex((item) => item === 0); | ||
>new Float32Array().findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Float32Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 21, 34)) | ||
>item : Symbol(item, Decl(findLast.ts, 21, 34)) | ||
|
||
new Float64Array().findLastIndex((item) => item === 0); | ||
>new Float64Array().findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 2 more) | ||
>findLastIndex : Symbol(Float64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 22, 34)) | ||
>item : Symbol(item, Decl(findLast.ts, 22, 34)) | ||
|
||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
>new BigInt64Array().findLastIndex : Symbol(BigInt64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLastIndex : Symbol(BigInt64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 23, 35)) | ||
>item : Symbol(item, Decl(findLast.ts, 23, 35)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); | ||
>new BigUint64Array().findLastIndex : Symbol(BigUint64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) | ||
>findLastIndex : Symbol(BigUint64Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) | ||
>item : Symbol(item, Decl(findLast.ts, 24, 36)) | ||
>item : Symbol(item, Decl(findLast.ts, 24, 36)) | ||
>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) | ||
|
297 changes: 297 additions & 0 deletions
297
tests/baselines/reference/findLast(target=esnext).types
Large diffs are not rendered by default.
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
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
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
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
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
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
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
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 @@ | ||
// @target: es2023, esnext | ||
|
||
[0].findLast((item) => item === 0); | ||
new Int8Array().findLast((item) => item === 0); | ||
new Uint8Array().findLast((item) => item === 0); | ||
new Uint8ClampedArray().findLast((item) => item === 0); | ||
new Int16Array().findLast((item) => item === 0); | ||
new Uint16Array().findLast((item) => item === 0); | ||
new Int32Array().findLast((item) => item === 0); | ||
new Uint32Array().findLast((item) => item === 0); | ||
new Float32Array().findLast((item) => item === 0); | ||
new Float64Array().findLast((item) => item === 0); | ||
new BigInt64Array().findLast((item) => item === BigInt(0)); | ||
new BigUint64Array().findLast((item) => item === BigInt(0)); | ||
|
||
[0].findLastIndex((item) => item === 0); | ||
new Int8Array().findLastIndex((item) => item === 0); | ||
new Uint8Array().findLastIndex((item) => item === 0); | ||
new Uint8ClampedArray().findLastIndex((item) => item === 0); | ||
new Int16Array().findLastIndex((item) => item === 0); | ||
new Uint16Array().findLastIndex((item) => item === 0); | ||
new Int32Array().findLastIndex((item) => item === 0); | ||
new Uint32Array().findLastIndex((item) => item === 0); | ||
new Float32Array().findLastIndex((item) => item === 0); | ||
new Float64Array().findLastIndex((item) => item === 0); | ||
new BigInt64Array().findLastIndex((item) => item === BigInt(0)); | ||
new BigUint64Array().findLastIndex((item) => item === BigInt(0)); |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test relevant to your changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it was created because the
es2023
target was added (filename iscallChainWithSuper(target=es2023).js
). This file was added for thees2022
target as well.