vue-tsgo is a type checker for Vue Single File Components (SFCs) that integrates with the TypeScript 7 native preview. Designed for Node.js >= 22.12.0, it leverages the @typescript/native-preview package to provide fast and accurate type checking directly on Vue SFC files. Unlike traditional setup where type checking is offloaded to editors or build tools, vue-tsgo runs as a standalone CLI or programmatic API. Version 0.2.2 is the current stable release; the project is in early development with potential breaking changes as TypeScript 7 evolves. It differentiates by focusing solely on SFC type checking without transpilation, making it ideal for CI pipelines and pre-commit hooks.
npm install vue-tsgoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use checkSFC to type-check a Vue SFC file, handling errors for exit codes.
Upgrade Node.js to version 22.12.0 or later.
Run npm install @typescript/native-preview to satisfy the peer dependency.
Replace 'tsconfig' with 'typescript.config' in the options object.
Use ESM import syntax (import { checkSFC } from 'vue-tsgo') or enable ESM in your project.Be aware of potential inconsistencies; verify with other type checkers if needed.
Use import statement or set { type: 'module' } in your package.json.Install the peer dependency: npm install @typescript/native-preview
Upgrade Node.js to version 22.12.0 or higher.
Use import { checkSFC } from 'vue-tsgo' instead of import vueTsgo from 'vue-tsgo'.