This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Dependencies | |
* @glennsl/bs-json: Encoding Data | |
* bs-decode: Decoding Data | |
**/ | |
open Belt.Result; | |
[@bs.val] [@bs.scope "localStorage"] | |
external removeItem: string => unit = "removeItem"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@bs.module] external startCase: string => string = "lodash.startcase"; | |
[@bs.module] external unique: array('a) => array('a) = "lodash.uniq"; | |
[@bs.module] | |
external sortby: (array('a), array('a => 'b)) => array('a) = | |
"lodash.sortby"; | |
[@bs.module] | |
external difference: (array('a), array('a)) => array('a) = | |
"lodash.difference"; | |
[@bs.module] external isEqual: ('a, 'a) => bool = "lodash.isequal"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type tz = {. [@bs.meth] "names": unit => array(string)}; | |
type moment = { | |
. | |
[@bs.meth] "tz": string => moment, | |
[@bs.meth] "format": string => string, | |
[@bs.meth] "fromNow": unit => string, | |
}; | |
[@bs.module "moment-timezone"] external tz: tz = "tz"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@bs.module "@sentry/browser"] | |
external captureParserException: | |
Decode.AsResult.OfParseError.ParseError.failure => unit = | |
"captureException"; | |
[@bs.module "@sentry/browser"] | |
external capturePromiseException: Js.Promise.error => unit = | |
"captureException"; | |
[@bs.module "@sentry/browser"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type location = { | |
. | |
"href": string, | |
"hash": string, | |
"search": string, | |
}; | |
[@bs.val] [@bs.scope "window"] external location: location = "location"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@bs.module "email-validator"] external email: string => bool = "validate"; | |
[@bs.module "url-validator"] external url: string => bool = "default"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type state = { | |
. | |
"name": string, | |
"appreviation": string, | |
"territory": bool, | |
"capital": string, | |
"contiguous": bool, | |
}; | |
type t = {. "states": array(state)}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type parsed = { | |
data: Js.Json.t, | |
errors: array(string), | |
}; | |
external jsonToJsOb: Js.Json.t => Js.t('a) = "%identity"; | |
type error = { | |
type_: string, | |
code: string, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type itemRenderer('a) = | |
{ | |
. | |
"data": 'a, | |
"index": int, | |
"style": ReactDOMRe.Style.t, | |
} => | |
React.element; | |
module FixedSizeList = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@bs.module "react-outside-click-handler"] [@react.component] | |
external make: | |
( | |
~onOutsideClick: unit => unit, | |
~children: React.element, | |
~disabled: bool=?, | |
~useCapture: bool=?, | |
~display: [@bs.string] [ | |
| `block | |
| `flex |