-
Notifications
You must be signed in to change notification settings - Fork 429
Open
Labels
Printerthings that have to do with turning an AST into Reason codethings that have to do with turning an AST into Reason code
Description
I think this:
let applyHighlight = (spec: list(ChartSpecT.specItem(string)), ~highlightedKey: option(string)) => {
let defaultItemOpacity = item => ChartSpecT.{
...item,
chart: {
...item.chart,
strokeOpacity: None,
},
};
spec->List.map(defaultItemOpacity);
};
Would be more readable and aesthetically pleasing if formatted like this:
let applyHighlight = (spec: list(ChartSpecT.specItem(string)), ~highlightedKey: option(string)) => {
let defaultItemOpacity = item =>
ChartSpecT.{
...item,
chart: {
...item.chart,
strokeOpacity: None,
},
};
spec->List.map(defaultItemOpacity);
};
Similarly this:
Param.create(
~key="search",
~toString=Params.Search.toString,
~fromString=Params.Search.fromString,
~get=state => state.search,
~set=(value, state) => {
...state,
filter: {
...state.filter,
search: value,
},
},
),
More readable as this (IMO):
Param.create(
~key="search",
~toString=Params.Search.toString,
~fromString=Params.Search.fromString,
~get=state => state.filter.search,
~set=(value, state) => {
...state,
filter: {
...state.filter,
search: value,
},
},
),
Metadata
Metadata
Assignees
Labels
Printerthings that have to do with turning an AST into Reason codethings that have to do with turning an AST into Reason code