Главная
Блок для главной страницы
Session data types
asdasd
a
sd

a

sd
a
sd
a
sd

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, Date, Map, Set, URL, arrays, and plain objects.

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:
