Skip to content

feat: Add TypeScript type annotations for PgVector columns#3041

Open
mansiverma897993 wants to merge 1 commit intoSeaQL:masterfrom
mansiverma897993:feature/3034-ts-vector-support
Open

feat: Add TypeScript type annotations for PgVector columns#3041
mansiverma897993 wants to merge 1 commit intoSeaQL:masterfrom
mansiverma897993:feature/3034-ts-vector-support

Conversation

@mansiverma897993
Copy link
Copy Markdown

  • Add get_ts_type_attrs method to Column to generate #[ts(type = "number[]")] or #[specta(type = "number[]")] attributes for PgVector fields when ts_rs::TS or specta::Type derives are present
  • Update all entity writers (compact, dense, expanded, frontend) to emit TS type attributes for vector columns
  • Add regression tests to ensure TS attributes are generated correctly
  • This fixes the issue where PgVector fields were not properly typed in generated TypeScript definitions

PR Info

  • Closes
  • Dependencies:
  • Dependents:

New Features

Bug Fixes

Breaking Changes

Changes

- Add get_ts_type_attrs method to Column to generate #[ts(type = "number[]")] or #[specta(type = "number[]")] attributes for PgVector fields when ts_rs::TS or specta::Type derives are present
- Update all entity writers (compact, dense, expanded, frontend) to emit TS type attributes for vector columns
- Add regression tests to ensure TS attributes are generated correctly
- This fixes the issue where PgVector fields were not properly typed in generated TypeScript definitions
@Huliiiiii
Copy link
Copy Markdown
Member

Should this be fixed in codegen? Are there any limitations that prevent adding PgVector support in ts_rs and specta?

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.

2 participants