mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
fix(es/preset-env): Move findLast
and findLastIndex
to finished proposals (#7012)
This commit is contained in:
parent
1a368def06
commit
b46a7248c6
@ -413,7 +413,8 @@ pub static INSTANCE_PROPERTIES: DataMap<&[&str]> = data_map!(Map {
|
||||
finally: PROMISE_FINALLY,
|
||||
find: FIND,
|
||||
findIndex: ["es.array.find-index"],
|
||||
findLast: "esnext.array.find-last",
|
||||
findLast: ["es.array.find-last"],
|
||||
findLastIndex: ["es.array.find-last-index"],
|
||||
fixed: ["es.string.fixed"],
|
||||
flags: ["es.regexp.flags"],
|
||||
flat: ["es.array.flat", "es.array.unscopables.flat"],
|
||||
|
3
crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-array-find-last/input.mjs
vendored
Normal file
3
crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-array-find-last/input.mjs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
const array = [1, 2, 3];
|
||||
array.findLastIndex();
|
||||
array.findLast();
|
12
crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-array-find-last/options.json
vendored
Normal file
12
crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-array-find-last/options.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"../../../../lib",
|
||||
{
|
||||
"useBuiltIns": "usage",
|
||||
"corejs": "3.29",
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
9
crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-array-find-last/output.mjs
vendored
Normal file
9
crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-array-find-last/output.mjs
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import "core-js/modules/es.array.find-last-index.js";
|
||||
import "core-js/modules/es.array.find-last.js";
|
||||
var array = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
array.findLastIndex();
|
||||
array.findLast();
|
Loading…
Reference in New Issue
Block a user