{"id":26537,"library":"tsnt","title":"tsnt","description":"tsnt is a zero-config CLI tool for transpiling TypeScript to JavaScript without performing type checking. Version 1.0.0 provides fast transpilation by skipping type checks entirely, making it suitable for development workflows where type checking is done separately. Unlike tsc or ts-node, tsnt focuses solely on transpilation speed and simplicity. It is distributed as an npm package with a single command-line interface.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript","transpiler","cli","no-typecheck"],"install":[{"cmd":"npm install tsnt","lang":"bash","label":"npm"},{"cmd":"yarn add tsnt","lang":"bash","label":"yarn"},{"cmd":"pnpm add tsnt","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only since v1.0.0","wrong":"const tsnt = require('tsnt')","symbol":"default","correct":"import tsnt from 'tsnt'"},{"note":"Named export for lowercase function","wrong":"const { transpile } = require('tsnt')","symbol":"transpile","correct":"import { transpile } from 'tsnt'"},{"note":"Use type import for interfaces in TypeScript","wrong":"import { TranspileOptions } from 'tsnt'","symbol":"TranspileOptions","correct":"import type { TranspileOptions } from 'tsnt'"}],"quickstart":{"code":"npx tsnt myfile.ts\n# Transpile a single file\ntsnt src/**/*.ts --outDir dist","lang":"typescript","description":"Shows basic CLI usage: transpile a single file and a glob pattern with output directory."},"warnings":[{"fix":"Use tsc --noEmit or an IDE plugin for type checking separately.","message":"tsnt skips type checking entirely. Type errors in source code will not cause transpilation to fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use import syntax or upgrade to Node.js 14+ with 'type': 'module'.","message":"Version 1.0.0 drops support for CommonJS require() in Node.js. Only ESM imports are allowed.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use --target ES2020 to specify the output JS version.","message":"tsnt transpiles using the latest TypeScript features by default, not the target version in tsconfig.json.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use named import `{ transpile }` moving forward.","message":"The function `tsnt` default export will be renamed to `transpileTs` in v2.0.0.","severity":"deprecated","affected_versions":">=1.0.0 <2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use npx tsnt file.ts to transpile first, then run node file.js","cause":"Running TypeScript file directly with Node.js without transpilation.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Check the glob pattern: tsnt 'src/**/*.ts' (quote it in shell)","cause":"Provided glob pattern did not match any .ts files.","error":"Error: No input files found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}