@arviahq/typescript-plugin
v2.1.0
Published
TypeScript plugin for .arv files: virtual types and arvia-tsc CLI — no generated .d.ts files needed.
Readme
@arviahq/typescript-plugin
TypeScript integration for .arv files with no generated .d.ts files:
each .arv file is presented to TypeScript as an in-memory virtual module
containing its generated declarations (the vue-tsc / Volar pattern).
Types depend only on component, slot and variant names — never on token
values or recipes — so this works without the theme file and without semantic
checking. Style errors still surface through @arviahq/vite-plugin.
Editor types
Either of:
VS Code + Arvia extension — the extension contributes this package as a tsserver plugin automatically.
Any editor (workspace TypeScript) — add to
tsconfig.json:{ "compilerOptions": { "plugins": [{ "name": "@arviahq/typescript-plugin" }] } }
CLI typechecking
arvia-tsc is a drop-in replacement for tsc:
arvia-tsc --noEmit
arvia-tsc -p tsconfig.json --watchNotes
- Stale
*.arv.d.tsfiles on disk shadow the virtual types — delete them when migrating fromarvia gen(the sibling-file fallback, still available viaarvia genorarvia({ dts: true })in the Vite plugin). - Editors must use the workspace TypeScript version for tsconfig-based plugin loading; the VS Code extension path works with the bundled TS as well.
