Skip to content

refactor: move generated types into appkit-types/ directory#267

Open
pkosiec wants to merge 1 commit intomainfrom
pkosiec/improve-gen-types
Open

refactor: move generated types into appkit-types/ directory#267
pkosiec wants to merge 1 commit intomainfrom
pkosiec/improve-gen-types

Conversation

@pkosiec
Copy link
Copy Markdown
Member

@pkosiec pkosiec commented Apr 13, 2026

Generated type declaration files (analytics query types, serving endpoint types) used to live as separate top-level files in client/src/. This PR moves them into a dedicated src/appkit-types/ directory — one file per plugin. TypeScript auto-discovers them via "include": ["src"] in tsconfig, so no index or barrel file is needed.

Screenshots

image (3) image (4)

Changes

  • Analytics types: src/appKitTypes.d.tssrc/appkit-types/analytics.d.ts
  • Serving types: src/appKitServingTypes.d.tssrc/appkit-types/serving.d.ts
  • Both generators now mkdir -p before writing, so the directory is created on first run
  • Directory name and filenames extracted as shared constants (TYPES_DIR, ANALYTICS_TYPES_FILE, SERVING_TYPES_FILE)
  • Updated Vite plugin defaults, CLI defaults, docs, tests, and .gitignore

@pkosiec pkosiec force-pushed the pkosiec/improve-gen-types branch from 0b90870 to d93dbfb Compare April 13, 2026 09:52
Consolidate generated .d.ts files into a single src/appkit-types/
directory instead of polluting client/src/ with multiple top-level
type files. TypeScript auto-discovers files via "include": ["src"].

- analytics types: src/appkit-types/analytics.d.ts
- serving types: src/appkit-types/serving.d.ts

Both generators now ensure the parent directory exists before writing.
Directory name and filenames are shared constants in type-generator.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@pkosiec pkosiec force-pushed the pkosiec/improve-gen-types branch from d93dbfb to 190f62c Compare April 13, 2026 10:16
@pkosiec pkosiec marked this pull request as ready for review April 13, 2026 10:27
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