You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ebed48a
Browse filesBrowse the repository at this point in the historyBrowse files
feat: named page actions with per-mutation type safety
Export `actions` (plural) from .server.ts for pages with multiple mutations.
Each named action gets its own typed validator, body type, and error keys.
- Scanner detects `actions` export alongside existing `action`
- Codegen emits pre-processed mapped types (no action key parsing needed)
- Runtime dispatches via `?actionName` query string suffix
- `useForm("/path?action", defaults)` and `action("/path?action", data)`
- Template literal types parse `?name` suffix for per-action type resolution
- Module-level `setActionRouter()` for `action()` helper in all adapters
- Migrated pg-test playground from intent pattern to named actions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Actions without validators still get URL autocomplete — the body falls back to `Record<string, unknown>`. See [Pages Routing — Forms](./pages-routing/forms) for the full API.
165
+
Actions without validators still get URL autocomplete — the body falls back to `Record<string, unknown>`. See [Pages Routing — Forms](./pages-routing/actions-and-forms) for the full API.
166
+
167
+
### Named Actions
168
+
169
+
When a page exports [named actions](./pages-routing/actions-and-forms#named-actions), each action gets its own typed validator. The `?actionName` suffix on the URL selects the correct types:
0 commit comments