ReviewOS

also looking at this

stacks/dtsx

feat(stx): generate component declarations

#3105
Merged chris wants to merge codex/stx-component-declarations into main
19 files +894 -37
9 days ago

Summary

  • generate first-class declarations for STX Vue-style script components and Blade-style @ts components
  • derive props from defineProps, runtime prop schemas, props as Props, and legacy $props.name access
  • retain typed emits, slots, exposed values, named exports, and strict @stacksjs/stx component contracts
  • discover, watch, auto-include, emit, and rewrite .stx entrypoints
  • harden shared SFC scanning around strings, nested setup values, defineSlots, and shorthand exposed values

Impact

STX component consumers now receive useful generated .d.ts files through both the semantic inference path and the annotation-first isolated-declarations path. Existing STX component libraries using legacy $props syntax also gain inferred public prop contracts without source migrations.

Validation

  • bun run test — 1,611 passed
  • bun run typecheck
  • bun run lint
  • bun run build
  • zig build test in packages/zig-dtsx
  • focused STX/Vue suite with strict tsc declaration consumption
  • all 514 .stx files in ~/Code/Tools/stx processed successfully in semantic and isolated modes

19 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.