tsconfig.json to write before you can execute a .ts file. Point meow at the
source and go:
How it works: in-place type-stripping
meow does not transpile or downlevel your code. It parses the file once with Oxc, then blanks the type-only spans to whitespace directly over the source string — preserving every byte position of the runtime code that remains. Because positions are preserved, meow emits no source maps: a stack trace points at the original line and column already. And because nothing is rewritten, modern JavaScript passes straight through to V8 untouched.meow targets modern JavaScript (
esnext). It does not downlevel to older syntax
— there is no target: es5. If your runtime is V8, you already have the modern
features.Erasable syntax only
Type-stripping can only remove syntax, never generate runtime code. So meow supports the erasable subset of TypeScript — the same boundary Node’s native type-stripping and Deno draw. These all work:- Type annotations,
interface,typealiases - Generics,
as/satisfies, non-null! import type/export type
| Not supported | Why | Use instead |
|---|---|---|
enum | emits a runtime object | a const object + union type |
namespace with values | emits runtime code | ES modules |
| constructor parameter properties | emits assignments | explicit field declarations |
| experimental/emit decorators | rewrite the class | plain functions/wrappers |
Importing TypeScript files
meow’s resolver is built for real-world TS projects, including one helpful behavior worth calling out:.js specifiers fall back to .ts source
Modern TypeScript projects often write
import "./foo.js" even though only
foo.ts (or .tsx/.mts) exists on disk — TypeScript’s own convention. meow’s
resolver transparently falls back from the explicit .js extension to the
TypeScript source sibling before declaring a module missing. You can also import
.ts extensions directly (import "./foo.ts"), which allowImportingTsExtensions
in the generated config permits.JSX / TSX
.jsx and .tsx are parsed and transformed by the same Oxc pipeline — no extra
configuration.
Type-checking is separate from running
meow runs TypeScript by stripping types; it does not type-check during execution (just like Node’s type-stripping). That’s a feature: startup stays fast, and type errors don’t block a quick run. When you want full type-checking, run the dedicated verb — it delegates totsc
over the generated shadow config and renders the results as meow diagnostics:
meow sync.
Type checking
Run
tsc over a generated config, with beautiful diagnostics.Web APIs
The web-standard globals available to your TypeScript.