object
/ array
/ bigint
as property keynumber
as property key// May lead to unexpected result.
const array = [];
const object = {};
const a = {
[array]: 1,
[object]() {}
};
class A {
[array]: 1
[object]() {}
}
// `4n` is used as `4` not `'4n'`
const array = [];
array[4n] = '';
// array.length === 5
const a = {
1.00000000000000001: 1
};
(no-loss-of-precision
should already covered.)
const a = {
1234567891012345678910: 1
};
const array = [];
const object = {};
const a = {
[array.join('')]: 1,
[toString(object)]: 2
};
const array = [];
array[Number(4n)] = '';
const symbol = Symbol("key")
const a = {
[symbol]: 1
};
This rule need the type info by static analyse.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too