Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Fix conversion of Js.t containing an alias core type #263

Closed
@IwanKaramazow

Description

@IwanKaramazow
[@bs.deriving {abstract: light}]
type jsProps('a) = {
  config: Js.nullable(Js.t({..} as 'a)),
  image: Js.nullable(string),
  label: Js.nullable(string),
  maxwidth: Js.nullable(int),
};

The Js.t({..} as 'a) part is problematic. There's currently no way to express this in ReScript.
{..} is the syntax for Js.t({..}). So technically {..} as 'a (rescript), represents Js.t({..)) as 'a.
However in the above code the alias sits inside the Js.t.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions