{"library":"ts-patch","type":"library","category":null,"description":"ts-patch is a utility that augments the TypeScript compiler to enable the use of custom Abstract Syntax Tree (AST) transformers and plugins during the build process. It allows developers to specify these transformers directly within `tsconfig.json` or to provide them programmatically via `CompilerOptions`. The current stable version is 3.3.0, with frequent releases to ensure compatibility with the latest TypeScript versions, such as adding support for TypeScript 5.7+ in the most recent update. Key differentiators include its dual approach to patching: an on-the-fly 'live compiler' (accessed via `tspc` or by specifying `ts-patch/compiler` in build tools) and a 'persistent patch' method that modifies the `node_modules` installation. It offers full compatibility with legacy `ttypescript` projects and supports both source-level and program-level transformations, with experimental support for ES Module-based transformers.","language":"javascript","status":"active","version":"3.3.0","tags":["javascript","typescript","transform","transformer","plugin","config","ast"],"last_verified":"Wed May 27","install":[{"cmd":"npm install ts-patch","imports":["import { patch } from 'ts-patch';","import { unpatch } from 'ts-patch';","import createProgram from 'ts-patch/compiler';"]},{"cmd":"yarn add ts-patch","imports":[]},{"cmd":"pnpm add ts-patch","imports":[]}],"homepage":null,"github":"https://github.com/nonara/ts-patch","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ts-patch","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/ts-patch/compatibility"}}