inertia-rails-typescript
Installation
SKILL.md
Inertia Rails TypeScript Setup
Type-safe shared props, flash, and errors using InertiaConfig module augmentation.
Works identically across React, Vue, and Svelte — the globals.d.ts and InertiaConfig setup is the same for all frameworks.
Before adding TypeScript types, ask:
- Shared props (auth, flash)? → Update
SharedProps/FlashDatainindex.ts— InertiaConfig inglobals.d.tspropagates them globally viausePage() - Page-specific props? →
type Props = { ... }in the page file only — never include shared props here
InertiaConfig Module Augmentation
Define shared props type ONCE globally — never in individual page components.
InertiaConfig property names are EXACT — do not rename them:
sharedPageProps(NOT sharedProps)flashDataType(NOT flashProps, NOT flashData)errorValueType(NOT errorBag, NOT errorType)
Related skills