glutinum-org / cli

https://glutinum.net/
59 stars 6 forks source link

invalid code generated for empty array type literal #158

Open joprice opened 5 days ago

joprice commented 5 days ago

Issue created from Glutinum Tool

Glutinum version - 0.11.0-preview

TypeScript

type X {
  find<A extends AnyAtomTemplate = any>(searchStr: string, params?: []): AtomInstanceType<A> | undefined;
}

FSharp

module rec Glutinum

open Fable.Core
open Fable.Core.JsInterop
open System

[<AllowNullLiteral>]
[<Interface>]
type X =
    abstract member find: searchStr: string * ?``params``:  -> obj option

Problem description

I'm not sure what the meaning of the empty array type is, but it happens to cause a parse error in the generated code, as no type (not even a placeholder obj is generated). This pattern appears a few times in the zedux https://github.com/Omnistac/zedux api.