reasonml / reasonml/reason

Js.t obj type in external gets aligned wrong for named args

Open
#2,562 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Printer
Dominant language
OCaml
Stars
10.3k
Forks
438
PR merge metrics
No merged PRs in 30d

Description

A picture Code is worth a thousand words:

external make:
  (
    ~prettyLongNameGoesHereBecauseItsDescriptive: (
                                                    'a,
                                                    {
                                                      .
                                                      "handleClick":
                                                        [@bs.meth] (ReactEvent.Mouse.t => unit),
                                                      "handleClick":
                                                        [@bs.meth] (ReactEvent.Mouse.t => unit),
                                                    }
                                                  ) =>
                                                  React.element
  ) =>
  React.element =
  "Hi";

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test; begin by reproducing the inline Reason external declaration and tracing the formatter entry point for named arguments and nested Js.t/object types. Done means the declaration's alignment is corrected for the shown example and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, ocaml
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.