arfa-types
v0.2.11
Published
Type definitions for the Arfa runtime & JSX
Downloads
29
Readme
arfa-types
TypeScript types and JSX declarations for the Arfa JS framework.
This package provides the type system that powers JSX, components, and routing in Arfa apps.
✨ What it provides
- A global
JSXdeclaration so.tsxfiles compile against Arfa’s runtime (h,Fragment). - Exported helper types:
PropsWithChildren<P>– addschildrento any props typeComponent<P>– minimal function component typeFC<P>– alias forComponent<P>withchildrenPageComponent<P>– same asComponent<P>, meant for pagesComponentProps<T>– extract props from a component
- Router helpers:
PageModule– describes modules returned byimport.meta.globRouteModules– record of all page modulesGuardFn– 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
- Permissive attributes (supports
📦 Install
npm i -D arfa-types