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

Comments in named arguments #200

Closed
jfrolich opened this issue Dec 4, 2020 · 3 comments
Closed

Comments in named arguments #200

jfrolich opened this issue Dec 4, 2020 · 3 comments

Comments

@jfrolich
Copy link

jfrolich commented Dec 4, 2020

@react.component
let make: (
  ~activity: ActivityFlow_Activity.t,
  ~showExpert: (string, string) => unit,
  ~showCognitiveAspect: string => unit,
  ~next: (string, string, array<string>) => unit,
  ~hapticFeedback: unit => unit,
  ~participants: Belt.Set.String.t,
  ~openPhotoFeed: (~feedId: option<string>, unit) => unit,
  // only provide this when it shows a random activity
  ~getAnother: unit => unit=?,
) => React.element

Is reformatted to:

@react.component
let make: (
  ~activity: ActivityFlow_Activity.t,
  ~showExpert: (string, string) => unit,
  ~showCognitiveAspect: string => unit,
  ~next: (string, string, array<string>) => unit,
  ~hapticFeedback: unit => unit,
  ~participants: Belt.Set.String.t,
  ~openPhotoFeed: (~feedId: option<string>, unit) => unit,
  ~getAnother: // only provide this when it shows a random activity
  unit => unit=?,
) => React.element

I prefer the former.

@IwanKaramazow
Copy link
Contributor

Thanks, this indeed a bug. Putted on my workqueue.

@IwanKaramazow
Copy link
Contributor

@jfrolich Thank you very much for the bug report, priceless feedback! Fixed in master.

@jfrolich
Copy link
Author

jfrolich commented Dec 7, 2020

Thanks!

kevinbarabash pushed a commit to kevinbarabash/rescript-compiler that referenced this issue Dec 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants