MIP Dev Site

Главная

Блок для главной страницы

Session data types

asdasd

a

sd

look.com.ua-114212.jpg
asdasd

a

look.com.ua-114236.jpg
asdasdasd

sd

a

sd

a

sd

look.com.ua-114212.jpg
йцуйцуйцу

By default session data is untyped, and you can store arbitrary data in any key. Values are serialized and deserialized using devalue, which is the same library used in content collections and actions. This means that supported types are the same, and include strings, numbers, DateMapSetURL, arrays, and plain objects.

look.com.ua-114236.jpg
asdasd

You can optionally define TypeScript types for your session data by creating a src/env.d.ts file and adding a declaration for the App.SessionData type:

This will allow you to access the session data with type-checking and auto-completion in your editor:

look.com.ua-114204.jpg
asdasdasd

Source: Google

I'm on desktop

SessionId: 403bf42e-a4a7-4ed3-a891-0cd591e76ece