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
Named tuples are a TypeScript 4 feature -- while ts2fable still uses TypeScript 3
-> The old TS parser just cannot handle named tuples and parses names as types ([a: string, b: string] = [a,string,b,string].
type[<AllowNullLiteral>]Example=abstract problem: Promise<string * string>with get, set
abstract missed: float with get, set
Why still TS3?:
The TS Compiler API is quite large, very not-F#_y and there changed a lot with TS4 & newer -> requires A LOT of manual adjustment no-one has done yet.
It's on my TODO list -- but everytime I transform the current TS API with ts2fable I see lots F# compiler errors ... which makes me push the issue further down my TODO list...
So sorry: unfortunately no easy fix, and not anytime soon.
-> Removing names from tuples in d.ts files is currently the way to go :(
A declaration file containing:
is compiled to (tested on the website and on
0.8.0-build.638
)My expectation is that, based on how ts2fable normally translates labeled tuple types, it would be compiled to:
The text was updated successfully, but these errors were encountered: