# tiny-pattern-ts Pattern matching for TypeScript/ESM environments (F#-style, not regex). ## Description `tiny-pattern-ts` brings F#-style pattern matching to TypeScript. Patterns are ordinary objects whose `matches` method is a TypeScript type guard, so narrowing composes the way any other guard does. It is deliberately not a regex engine and not a macro: there is no transpiler and no DSL to learn, and the type-level contract is the feature — see [development/library.md](./development/library.md) for the design decisions and the known limitations. ## Requirements - **Node.js >= 26** (`engines` field; pinned via `.node-version`). - **TypeScript >= 5.0** to consume the published declarations. The emitted `.d.ts` use `const` type parameters (TS 5.0) and keep their relative `.ts` specifiers; both resolve on TS >= 5.0 in `node10` / `node16` / `nodenext` / `bundler`. - The package is **ESM-only** (no CommonJS shim). ## API Yet to be implemented ## License MIT © 2025 tmu. See [LICENSE](./LICENSE). ## Contributing Contributions are documented in [CONTRIBUTING.md](./CONTRIBUTING.md); the reasons behind the project's decisions, rejected alternatives, and known issues live in [development/](./development/README.md). AI coding agents start at [AGENTS.md](./AGENTS.md).