Source snapshot bcc79fcc · Declared package version 2.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
Owned runtime boundary for TypeScript compiler and AST access.
Consumers import AST helpers and source parsing from this package so TypeScript upgrades have one repair point. The adapter isolates TypeScript 7's unstable AST and asynchronous compiler APIs while preserving a stable asynchronous parser contract for callers.
ts
import {
TypeScriptSourceParser,
isVariableStatement,
} from "@lssm-tech/lib.typescript-runtime";
Call close() on long-lived parsers after use.
The explicit server-only @lssm-tech/lib.typescript-runtime/docs-manifest-builder
entry owns compiler-backed same-file DocBlock extraction and package manifest generation. It exports extractModuleDocData and buildPackageDocManifest with their existing asynchronous signatures and is the canonical import path. The deprecated @lssm-tech/lib.contracts-spec/docs/manifest-builder subpath forwards the same function identities until the next major release of
@lssm-tech/lib.contracts-spec removes it; new code imports this entry. This entry rejects browser resolution and is not reexported by the root AST adapter. Manifest and DocBlock types remain owned by surface-runtime and contracts-spec-core, respectively.
buildPackageDocManifest({ followReexports: true, ... }) additionally follows static value reexports to canonical same-file DocBlocks. The option is additive and defaults to false; existing callers keep their source-root-only behavior. The compatibility package's docs:manifest producer imports this entry directly and enables it so moving a contract into its canonical owner does not remove its documentation. Traversal does not execute source modules or scan private sibling files. Named aliases, cycles, and explicit export precedence are respected; ambiguous documentation bindings, duplicate identifiers/routes, and missing references fail validation. DocBlock identifiers and payloads are preserved, while sourceModule identifies the canonical package and source file for documentation outside the input root.
Each parser owns an isolated temporary workspace and native TypeScript session. On Windows, the adapter uses the compiler client's supported stdio transport; other platforms retain Unix sockets. This avoids Windows named-pipe readiness and naming races without changing the asynchronous parser API or snapshot semantics. The matching native TypeScript executable must be installed.
The root build targets Node-compatible server execution (including Bun). It requires filesystem, process, or native compiler facilities and does not advertise a browser export condition. Browser applications should use the relevant browser-safe contracts or UI entry points instead of importing this server root.
Declared capabilities.
Lib Typescript Runtime
Owned TypeScript compiler API boundary for ContractSpec tooling
Use it to
Adopt owned typescript compiler api boundary for contractspec tooling
Requires
TypeScript
Choose another boundary when
The @lssm-tech/lib.typescript-runtime package constraints do not match the target runtime or platform.
@lssm-tech/lib.typescript-runtime
Imports and export paths.
2 entries
These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.