Registry / devops / wch-typescript

wch-typescript

JSON →
library0.1.3jsnpmunverified

A TypeScript transpiler plugin for wchd (^0.10.0), version 0.1.3. Enables TypeScript compilation within the wch asset pipeline. No active maintenance noted; pinned to wch^0.10.0. Differentiator: lightweight alternative to full TS setup for wch projects.

npm install wch-typescript
INSTALL
IMPORT
SIG · WCH-TYPESCRIPT
W
wch-typescript
devopsjavascriptv0.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

wchTypescript
✓ const wchTypescript = require('wch-typescript')
CommonJS only; no ESM exports
default export
✓ const wchTypescript = require('wch-typescript').default
✗ const wchTypescript = require('wch-typescript')
Library exposes a default export; direct require gives function
TypeScript type
✓ import type { Options } from 'wch-typescript'
Type-only import for TypeScript users

Initializes wch-typescript plugin with options and runs a build from TypeScript source to JavaScript.

const wch = require('wch'); const wchTypescript = require('wch-typescript').default; // Configure wch pipeline wch.plugin(wchTypescript({ tsconfig: './tsconfig.json', target: 'es2015', sourcemap: false })); // Build pipeline wch.build('src/*.ts', 'dist/js/');
Debug
Known issues
breakingRequires wch version ^0.10.0; incompatible with other versions.
fix
Ensure wch@^0.10.0 is installed.
affects: >=0.1.0 <0.2.0
deprecatedPackage is in maintenance mode with no recent updates; consider migrating to official wch TypeScript support if available.
fix
Check wch documentation for built-in TypeScript support.
affects: all
gotchaCommonJS only; no ES module support.
fix
Use require() instead of import.
affects: all
gotchaDefault export is a function; direct require returns the function itself, not an object.
fix
Use .default or call the result directly.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'wch-typescript'
Package not installed or not in node_modules.
fix
npm install wch-typescript
TypeError: wchTypescript is not a function
Wrong import pattern (e.g., used .default on a non-default export).
fix
Ensure correct require: const wchTypescript = require('wch-typescript').default;
Error: Plugin must be a function
Passing the module directly instead of the default export function.
fix
Use require('wch-typescript').default as the plugin.
Error: Cannot find module 'wch'
Peer dependency wch not installed.
fix
npm install wch@^0.10.0
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies
wchrequiredpeer dependency: required for wchd asset pipeline
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
wch-typescript — npm install wch-typescript · libregistry