Skip to content

fontWeight broken in master #775

Closed
@cknitt

Description

@cknitt

In master, we have

type fontWeight = [
  | #normal
  | #bold
  | #100
  ...
  | #900
]

Unfortunately, this is not correct. We need a string "100", not an int 100. But this can not be represented as an enum / polymorphic variant (#"100" just gets reformatted to #100, and as far as I can see it is not currently possible to represent the difference in the AST).

We could use an abstract type + an @obj external make with the @string annotation instead, but this usage of @string is likely to get deprecated in ReScript 11, too.

Any other ideas?

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