Skip to content

Keep the names of aliases a documented alias refers to - #311

Merged
tnkuehne merged 1 commit into
mainfrom
fix/type-alias-references
Nov 22, 2026
Merged

tnkuehne merged 1 commit into
mainfrom
fix/type-alias-references

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

A non-generic type alias is documented with references to other aliases expanded one level. A generated input type whose fields are themselves aliases grows several times: in the Linear template, IssueFilter (about 100 fields of comparator aliases such as NullableDateComparator) is 57 KB in describe, and describing viewer with issues returns 84 KB. Interfaces are not affected, since they keep their names.

What changes

On the Linear template, IssueFilter drops from 57 KB to 17 KB, and describing viewer with issues from 84 KB to 41 KB. The whole document is 2.0 MB with 828 types.

Verification

  • New extraction test: an alias referring to another alias keeps its name and records it in uses. It fails without the change.
  • RUN_CLI_TESTS=1 documentation extraction, app-services CLI and integration tests
  • RUN_WASM_TESTS=1 pnpm exec vitest run packages/service-docs and RUN_BUILDER_TESTS=1 pnpm exec vitest run packages/app-builder with the rebuilt WebAssembly module
  • pnpm check; bash tools/cargo.sh fmt --all --check, clippy --workspace --all-targets -D warnings, clippy for the WebAssembly target, test --workspace

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Non-generic type aliases now keep referenced alias names instead of expanding their bodies.

  • Service docs keep aliases referenced by other aliases by name.

Reviews (1) · Last reviewed commit: "Keep the names of aliases a documented a..." · Reviewed by Greptile

A non-generic type alias was printed with references to other aliases
expanded one level. A generated input type such as Linear's IssueFilter,
whose fields are comparator aliases, grew to 57 KB in describe. Aliases are
now printed as declaration files write them, with references by name, as
generic aliases already were.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 15d34ef Nov 22 2026, 09:17 PM

@tnkuehne
tnkuehne merged commit 28bdbfb into main Nov 22, 2026
17 checks passed
@tnkuehne
tnkuehne deleted the fix/type-alias-references branch November 22, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant