API / Dom / Storage2

You are currently looking at the v8.2 - v9.0 docs (Reason v3.6 syntax edition). You can find the latest API docs here.

Storage2

The same as Dom.Storage, but with t on first argument position for proper -> usage.

t

RES
type t

getItem

RES
external getItem: (t, string) => option<string> = "getItem"

setItem

RES
external setItem: (t, string, string) => unit = "setItem"

removeItem

RES
external removeItem: (t, string) => unit = "removeItem"

clear

RES
external clear: t => unit = "clear"

key

RES
external key: (t, int) => option<string> = "key"

length

RES
external length: t => int = "length"

localStorage

RES
@bs.val external localStorage: t = "localStorage"

sessionStorage

RES
@bs.val external sessionStorage: t = "sessionStorage"