text: (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31522],{17375:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{Z:function(){return n}})},17646:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}});var n=r(17375),a=r(96156),s=(r(67294),r(3905));function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,g=(l="Intro",function(e){return console.warn("Component "+l+" was not imported, exported, or provided by MDXProvider as global scope"),(0,s.kt)("div",i({},e))}),p={};function c(e){var t=e.components,r=(0,n.Z)(e,["components"]);return(0,s.kt)("wrapper",i(i(i({},p),r),{},{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",i({},{id:"storage2"}),"Storage2"),(0,s.kt)(g,{mdxType:"Intro"},(0,s.kt)("p",null,"The same as ",(0,s.kt)("a",i({parentName:"p"},{href:"./storage2"}),"Dom.Storage"),", but with ",(0,s.kt)("inlineCode",{parentName:"p"},"t")," on first argument position for proper ",(0,s.kt)("inlineCode",{parentName:"p"},"->")," usage.")),(0,s.kt)("h2",i({},{id:"t"}),"t"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"prelude sig",prelude:!0,sig:!0}),"type t\n")),(0,s.kt)("h2",i({},{id:"getitem"}),"getItem"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'external getItem: (t, string) => option<string> = "getItem"\n')),(0,s.kt)("h2",i({},{id:"setitem"}),"setItem"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'external setItem: (t, string, string) => unit = "setItem"\n')),(0,s.kt)("h2",i({},{id:"removeitem"}),"removeItem"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'external removeItem: (t, string) => unit = "removeItem"\n')),(0,s.kt)("h2",i({},{id:"clear"}),"clear"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'external clear: t => unit = "clear"\n')),(0,s.kt)("h2",i({},{id:"key"}),"key"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'external key: (t, int) => option<string> = "key"\n')),(0,s.kt)("h2",i({},{id:"length"}),"length"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'external length: t => int = "length"\n')),(0,s.kt)("h2",i({},{id:"localstorage"}),"localStorage"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'@bs.val external localStorage: t = "localStorage"\n')),(0,s.kt)("h2",i({},{id:"sessionstorage"}),"sessionStorage"),(0,s.kt)("pre",null,(0,s.kt)("code",i({parentName:"pre"},{className:"language-res",metastring:"sig",sig:!0}),'@bs.val external sessionStorage: t = "sessionStorage"\n')))}c.isMDXComponent=!0,c.frontmatter={__ghEditHref:"https://github.com/reason-association/rescript-lang.org/blob/master/pages/docs/manual/v9.0.0/api/dom/storage2.mdx"}},16696:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/manual/v9.0.0/api/dom/storage2",function(){return r(17646)}])}},function(e){e.O(0,[92888,49774,40179],(function(){return t=16696,e(e.s=t);var t}));var t=e.O();_N_E=t}]);