@esctn/vue-tsc-api

Expose vue-tsc api for programmatic usage
177,367 1
Install
npm install @esctn/vue-tsc-api
Latest Version:1.0.1
License:ISC
Last Updated:Jul 20, 2025
Links: GitHub  ·  npm
Maintainer: esctn

@esctn/vue-tsc-api

A (very) simple wrapper that exposes vue-tsc's programmatic API for use in build tools and other TypeScript-related tooling.

Why does this package exist?

The vue-tsc maintainers have intentionally kept vue-tsc as a CLI-only tool to maintain its single purpose and avoid confusion. However, some build tools and TypeScript checkers (like fork-ts-checker-webpack-plugin, ts-checker-rspack-plugin) need programmatic access to vue-tsc's TypeScript compiler to work with Vue SFCs.

The content of this package is literally one line, and if you think that installing an npm package for it is too much, I feel you!

I published it purely for ergonomics — feel free to just copy the file in your project, and use require.resolve('path/to/your-wrapper.js').

Installation

npm install @esctn/vue-tsc-api

The typescript@>=5.0.0 and vue-tsc@~3.0.3 are peer dependencies.

Usage

The package exports the same api as typescript/lib/typescript but with vue-tsc patches to support Vue SFC.

Example with webpack ts-checker

const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = {
  // ... your webpack config
  plugins: [
    new ForkTsCheckerWebpackPlugin({
      typescript: {
        // Use @esctn/vue-tsc-api instead of regular TypeScript
        typescriptPath: '@esctn/vue-tsc-api'
      }
    })
  ]
};

Example with custom TypeScript checker

const typescript = require('@esctn/vue-tsc-api');

// use as a regular TypeScript api

License

ISC

Contributing

Issues and pull requests are welcome on GitHub.

Related

  • vue-tsc - Vue 3 command line Type-Checking tool
  • Volar.js - The infrastructure behind vue-tsc
  • TypeScript - The TypeScript language and compiler

Related Packages

@kkulebaev/tsconfig

Shared TypeScript config presets for Vue 3 + Vite + vue-tsc projects

1,703 0
verter-tsc

Vue SFC type checker — verter-native vue-tsc replacement

41,825 114
@depup/vue-tsc

vue-tsc with all dependencies updated to latest

1,285 6,735
@whiter001/vue-tsc-files

A tiny tool to run vue-tsc on specific files without ignoring tsconfig.json

1,061 0
@flarian/language-plugin-css-modules

Vue language tools plugin: types for external CSS modules straight from PostCSS,...

0 0

Version History

Version Released License
1.0.1 ISC
1.0.0 ISC