Page props type-checking fixed when shared props have optional keys
· Developer impact : medium
In AdonisJS Inertia v5.0.6, a bug was fixed where page props stopped being type-checked if shared props included an optional key, such as from a conditional spread. Previously, missing required props or unknown props compiled without error. Now, TypeScript correctly reports errors for missing or undeclared props in render() calls.
Developers upgrading to v5.0.6 may see new TypeScript errors in inertia.render() calls that previously compiled without issues. These errors indicate missing required props or unexpected props not declared by the page. This improves type safety but may require updating render calls to match declared page props.
- Review TypeScript errors in inertia.render() calls after upgrading to v5.0.6.
- Ensure all required props are provided and no undeclared props are passed to render().
- Update page prop declarations or render calls as needed to satisfy type checks.
Original sources
AI-generated analysis based on the linked sources. Check the original documentation before changing your application.