Installation
finity is published as one package per framework. Install the one for yours:
With npm, use npm install instead. All three are also published to JSR, under the same names.
| package | for | needs |
|---|---|---|
@ghostry/finity-reactjs | React | react 16.8+ |
@ghostry/finity-solidjs | Solid | solid-js 1.x |
@ghostry/finity-core | another framework, through an adapter. See Other frameworks | nothing |
The React and Solid packages depend on @ghostry/finity-core, but don't re-export its helpers noop, never, and shallowEqual. To import those, add @ghostry/finity-core to your dependencies too, at the exact version your framework package depends on. Each package is versioned on its own, and the React and Solid packages pin the finity-core version they were released with, so a matching version keeps one copy of finity-core installed.
Requirements
- TypeScript 5.4 or later. finity runs without it, but its exhaustiveness and transition checks are type checks.
- For
@ghostry/finity-solidjs, Solid 1.x. Its types don't compile against Solid 2.0 yet. - An ES module setup. The packages are ESM only.
