declare function foo(...x: readonly any[]): any
type FooParams = Parameters<typeof foo>;
declare function bar(...x: readonly number[]): any
type BarParams = Parameters<typeof bar>
Expected:
FooParams is any[] or readonly any[]
BarParams is number[] or readonly number[]
Actual
FooParams is unknown[]
BarParams is never
Playground link
Expected:
FooParamsisany[]orreadonly any[]BarParamsisnumber[]orreadonly number[]Actual
FooParamsisunknown[]BarParamsisneverPlayground link