Skip to content

Add support to use [@bs.unwrap] with labeled arguments #2827

@liubko

Description

@liubko

bs-platform@3.1.3

Can't use [bs.unwrap] with labeled arguments.

Code

[@bs.obj]
external func :
  (
    ~param: string,
    ~polyParam: [@bs.unwrap] [ | `Str(string) | `Int(int)],
    unit
  ) =>
  _ =
  "";

Error

bs.obj label polyParam does not support [@bs.unwrap] arguments

Try it online

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleOld issues that went stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions