Closed as not planned
Closed as not planned
Description
π Search Terms
TS1265
π Version & Regression Information
- This changed between versions 5.3.3 and 5.4.2
β― Playground Link
π» Code
const firstObject = {foo: 'foo'} as const;
const secondObject = {bar: 'bar'} as const;
const firstConstant = ['all', ...(Object.keys(firstObject))] as const;
const secondConstant = ['all', ...(Object.keys(secondObject))] as const;
type FirstType = typeof firstConstant;
type SecondType = typeof secondConstant;
type CombinedType = readonly [
...FirstType,
...SecondType,
];
π Actual behavior
A rest element cannot follow another rest element.(1265)
π Expected behavior
No error
Additional information about the issue
No response