Type definitions for the Arfa runtime & JSX
npm install arfa-typesTypeScript types and JSX declarations for the Arfa JS framework.
This package provides the type system that powers JSX, components, and routing in Arfa apps.
---
- A global JSX declaration so .tsx files compile against Arfa’s runtime (h, Fragment).
- Exported helper types:
- PropsWithChildren – adds children to any props type
- Component – minimal function component type
- FC – alias for Component with children
- PageComponent – same as Component, meant for pages
- ComponentProps – extract props from a component
- Router helpers:
- PageModule – describes modules returned by import.meta.glob
- RouteModules – record of all page modules
- GuardFn – function signature for layout guards (protected routes)
- JSX IntrinsicElements typing:
- Permissive attributes (supports class, className, id, style, on* events, etc.)
- Custom element support via string index
---
``bash``
npm i -D arfa-types