poka.sh

Docs

D.TS

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

TypeScript Declarations Preview.

At a glance

Purpose A TypeScript declaration file: the types, interfaces and signatures of a JavaScript module, without implementations.
Extensions .d.ts
Poka parser poka-d-ts
Viewer poka-metadata-card-viewer
Depth tier Metadata card (see Depth tiers)
Breadth tier B4 Summary (see Breadth tiers)

How much Poka reads

B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-d-ts/src/main.rs (408 lines) and plugin.json in full. The crate has no unit tests and no tests/samples.rs, and the corpus has no .d.ts sample, so the tier rests on reading the code. Covers .d.ts. The output is a metadata card of counts found by matching text line by line: the top module, ambient modules, global augmentations, namespaces, interfaces, type aliases, classes, enums, function declarations and overload candidates, declare const, var and let, export default and export =, import and export-from sources, and reference directives. Judgement: B4, because the structure is summarised but the source itself is never shown.

What Poka does not read

  • The source text is not shown: the card carries only counts and a few sample names, with no code view or highlighting
  • Constructs are found by matching text line by line, not by parsing, so multi-line declarations, nested or indented definitions and keywords inside strings or comments can be miscounted
  • Counts of named items stop where their name list is capped (imports at 64, exports from at 64, namespaces at 32), so a larger file under-reports them
  • Files over 128 MiB are cut to the first 128 MiB (the card says so)
  • Text that is not UTF-8 is decoded with replacement characters; no other encoding is tried
  • Member signatures inside interfaces and classes are not listed

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • Oxc parser (oxc_parser) (candidate; MIT; Rust; https://github.com/oxc-project/oxc) — Rust JS/TS parser; pages loaded say it parses .ts(x) and do not mention .d.ts explicitly
  • SWC (candidate; Apache-2.0; Rust; https://github.com/swc-project/swc) — Rust TypeScript/JavaScript compiler with a TypeScript parser; .d.ts not explicitly mentioned on the page loaded
  • TypeScript compiler API (candidate; Apache-2.0; TypeScript; https://github.com/microsoft/TypeScript) — Reference implementation; .d.ts not explicitly mentioned on the page loaded

Sources

  • parsers/poka-d-ts/src/main.rs
  • parsers/poka-d-ts/plugin.json