← Navigation and routes

Navigation.EntrySnapshot

luastra/navigation

Navigation.EntrySnapshot is an exported, statically checked data contract of luastra/navigation. Its exact declaration documents the fields or alternatives accepted at the module boundary and is erased after Luau analysis.

Before you use it

Add luastra/navigation to this module's dependencies in luastra.json, then import it with require("luastra/navigation"). No host capability is required for in-memory navigation. Browser URL/history synchronization additionally needs luastra/host and navigation.history.

How it fits

The type describes a route, stack, compiler, or checked result used by navigation operations.

When to use it

Use Navigation.EntrySnapshot when annotating values that cross the public luastra/navigation boundary or when exporting helpers built on that module. The type documents the exact checked shape and prevents unrelated tables from being substituted accidentally.

Fields or definition

ParameterType / valuesDescription
versionnumberExplicit contract version used to validate or migrate the serialized value.
entries{ RouteEntry }Ordered typed route-entry history represented by this snapshot.

What happens next

A checked route/navigation annotation.

Failures and fixes

Invalid definitions, unknown routes, malformed parameters, excessive history depth, or incompatible snapshots return bounded errors or fail construction. Navigation result records use success:boolean with optional fields, so verify the field you need after checking success.

Availability

Public-source alpha API in 0.5.0-alpha; URL integration is a separate host capability.

Exact declaration

export type EntrySnapshot = { version: number, entries: { RouteEntry } }

Complete inventory

View all pages in Navigation and routes
← Previous: Navigation.RouteCompilerNext: Navigation.MutationResult →