Thin wrapper over the ipk-loaded typescript package.
Synopsis
tsc [options] [files...]
cat foo.ts | tsc
Description
Type-checks and/or transpiles TypeScript using whichever typescript version is installed in the nearest node_modules via ipk (see man ipk). This is a single-file transpile pass — cross-file type checking is not wired up, so treat tsc here as a per-file transpiler/checker, not a project-wide build.
tsconfig.json (compilerOptions) is auto-discovered upward from the current directory. Defaults: target=ES2022, module=ESNext.
Options
--noEmit Type-check only; do not write outputs.
--outDir <dir> Write emitted .js files to <dir>.
-h, --help Show this help.
-v, --version Show typescript version.
Install
Inert until the backing package is installed in node_modules:
$ ipk add typescript
Then tsc --version and the transpile commands above work. There is no bundled binary and no CDN fallback — a missing package exits non-zero with a clear ipk add hint.
Examples
$ ipk add typescript
Install the backing package once per working directory.
$ tsc --noEmit src/index.ts
Type-check a file without emitting output.
$ tsc --outDir dist src/index.ts
Transpile a single file to dist/index.js.
$ cat src/index.ts | tsc --loader=ts 2>/dev/null
Transpile from stdin (pair with esbuild --loader=ts if you need bundling too — see man esbuild).
Notes
.jsh scripts themselves are plain JavaScript, not TypeScript — tsc is for authoring/checking .ts source that you then transpile to a .jsh-compatible .js file (with tsc --outDir or esbuild) before it can be auto-discovered as a shell command. See man jsh for the discovery rules.
See Also
ipk, esbuild, biome, jsh, node, commands