Skip to content

Add self-contained CodeReference types file, compat checks, and docs download endpoint - #484

Open
tbuckley wants to merge 3 commits into
mainfrom
codex/add-link-for-codereference-types-in-documentation
Open

Add self-contained CodeReference types file, compat checks, and docs download endpoint#484
tbuckley wants to merge 3 commits into
mainfrom
codex/add-link-for-codereference-types-in-documentation

Conversation

@tbuckley

Copy link
Copy Markdown
Owner

Motivation

  • Provide a single, copy/download-ready TypeScript file containing all CodeReference-related types so consumers can paste or import definitions without depending on internal $lib modules.
  • Ensure the downloadable file is fully self-contained (no imports) so end users can use it outside the repo.
  • Keep documentation types and runtime types aligned by adding a compile-time compatibility check.

Description

  • Add src/lib/documentation/codeReferenceTypes.ts, a self-contained, interface-focused TypeScript definitions file that declares FileReference, CodeReference, prompt/provider shapes, Fs* storage types, JavascriptAssertionArgs, and a Generator interface.
  • Add src/lib/documentation/codeReferenceTypes.compat.ts, a type-level compatibility file that compares the downloaded doc types against the repo runtime types to catch regressions.
  • Export and align missing runtime types used by the doc bundle: export Generator in src/lib/storage/runGenerators.ts, add FsProvider in src/lib/storage/types.ts, and export JavascriptAssertionArgs from src/lib/assertions/javascript.ts.
  • Add a docs page and a downloadable endpoint at src/routes/documentation/code-reference-types/+page.svelte and src/routes/documentation/code-reference-types/types/+server.ts to display and serve the codeReferenceTypes.ts file, and link it from the main docs (src/routes/documentation/+page.md).

Testing

  • CI=1 npm run test was executed and all tests passed (integration + unit).
  • npm run check (svelte-check / type checking) completed with no errors.
  • npm run lint (Prettier / ESLint / tsc --noEmit) completed successfully after formatting and small type adjustments.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 28, 2025

Copy link
Copy Markdown

Deploying evals-pwa with  Cloudflare Pages  Cloudflare Pages

Latest commit: f878479
Status: ✅  Deploy successful!
Preview URL: https://a44dd12b.evals-pwa.pages.dev
Branch Preview URL: https://codex-add-link-for-coderefer.evals-pwa.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant