Skip to content

StateToken

type StateToken = unknown

Opaque reference to a piece of request-scoped state.

Base form of a state token; it carries no value type information. Use it wherever a collection of tokens is held without needing to access their value types: state arrays on controllers/middleware, compilation maps, and the internal state store.

To read or write state, you need a TypedStateToken<T>.

Learn: Declaring state

Last updated: