@textmode/tsconfig
v0.2.2
Published
<div align="center">
Readme
@textmode/tsconfig
|
|
|
|
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@textmode/tsconfig provides shared TypeScript policy and task orchestration for textmode.js libraries and Node.js tooling. It owns the strictness presets, the declaration-emission policy, and the textmode-types command that runs check, build, verify, and show-config programs.
Use it to keep every package on the same TypeScript policy while letting each project own its authoring scope and paths.
Features
- Capability presets - Environment-independent strictness for browsers, published libraries, Node, and Node tooling.
- Command-owned programs -
check,build,verify, andshow-configown their TypeScript task scopes. - Declaration policy - Production declarations emit from
srctodist/typeswith consistent settings and omit TypeDoc-only category metadata. - Consumer verification -
verifyresolves every export and legal dependency back-reference from an isolated consumer withskipLibCheck: false. - Optional
@internalstripping - Opt in per package without another config file.
Installation
npm install -D @textmode/tsconfig typescriptUsage
A library owns one authoring config containing its complete editor and test scope:
{
"extends": "@textmode/tsconfig/browser-library.json",
"include": ["src", "tests", "vite.config.ts", "vitest.config.ts"]
}Task-specific programs are owned by the command:
textmode-types check
textmode-types build
textmode-types verify
textmode-types show-configEvery command accepts --cwd <directory> and --project <file> to select the
project root and TypeScript config.
checkrejects authored TypeScript files that are not claimed by the local config, then runs a no-emit project check.buildemits production declarations fromsrctodist/types, excludes co-located tests, disables declaration maps and ambient type packages, and removes@categoryand@categoryDescriptionblocks from emitted JSDoc. Source comments are unchanged, so TypeDoc continues to use that metadata when generating API documentation; other declaration documentation is preserved.verifyresolves every package export from an isolated consumer withskipLibCheck: false, including dependencies that reference the package or one of its exported subpaths.show-configreports the complete authoring and declaration programs.
The command uses the project's installed TypeScript compiler. Paths and aliases remain local project data; declaration policy and task scopes are shared.
Packages that intentionally annotate implementation exports with @internal
can opt into stripping those declarations without another config file:
{
"textmodeTypes": {
"stripInternal": true
}
}Internal declarations are preserved by default, matching TypeScript's default and avoiding accidental API removal in packages that historically emitted them.
Related packages
@textmode/tsconfig is the foundation of the tooling stack and is consumed by
the following textmode-tooling packages:
| Package | Relationship |
| --------------------------------------- | --------------------------------------------------------------------- |
| @textmode/docs | TypeDoc reads the consumer tsconfig |
| @textmode/build | Library builds and tests compile against the shared TypeScript policy |
Presets
| Preset | Use |
| ----------------------------------------- | ----------------------------------------- |
| @textmode/tsconfig/strict.json | Environment-independent strictness |
| @textmode/tsconfig/browser.json | Browser and bundler projects |
| @textmode/tsconfig/browser-library.json | Published textmode.js browser libraries |
| @textmode/tsconfig/node.json | TypeScript running under Node |
| @textmode/tsconfig/node-tooling.json | Checked JavaScript and TypeScript tooling |
base.json, typecheck.json, build.json, and dist.json remain available
as aliases and should not be used by new projects.
License
The @textmode/tsconfig package is licensed under the CC0 1.0 Universal.
