You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a function with a type asserted parameters, oxc-transform reporting an error incorrectly.
Given this code:
interfaceT0{}exportfunctiontest(_={}asT0): void{}
Current behaviour
Getting an error:
x TS9011: Parameter must have an explicit type annotation with
| --isolatedDeclarations.
,-[test.ts:3:32]
2 |
3 | export function test(_ = {} as T0): void {}
: ^^
`----
Expected behaviour
According to TypeScript, this is valid, and generate dts bellow in Isolated Declaration:
For a function with a type asserted parameters,
oxc-transform
reporting an error incorrectly.Given this code:
Current behaviour
Getting an error:
Expected behaviour
According to TypeScript, this is valid, and generate dts bellow in Isolated Declaration:
Playground link
The text was updated successfully, but these errors were encountered: