Skip to content

Instantly share code, notes, and snippets.

@alex35mil
Created March 10, 2020 16:34
Show Gist options
  • Save alex35mil/591da48ee628d28d6e9df8c0b71588e8 to your computer and use it in GitHub Desktop.
Save alex35mil/591da48ee628d28d6e9df8c0b71588e8 to your computer and use it in GitHub Desktop.
type name = string;
type value = string;
type options = {
.
"domain": string,
"path": string,
"expires": Js.nullable(float),
"secure": bool,
};
[@bs.module "js-cookie"] external get: name => Js.nullable(value) = "get";
[@bs.module "js-cookie"] external set: (name, value, options) => unit = "set";
[@bs.module "js-cookie"] external remove: (name, options) => unit = "remove";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment