Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(types): move type definitions to separate module #274

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

tharropoulos
Copy link
Collaborator

TLDR

Extract shared type definitions from Documents.ts to dedicated Types.ts file

Change Summary

Code Changes:

  1. New Types.ts module:

    • Moved type definitions from Documents.ts (SearchParams, WriteableDocuments, etc.)
    • Relocated related constants (arrayableParams)
  2. Updated files:

    • Documents.ts: Added re-exports with deprecation notice (won't be fired, since it re-exports from actual Types file)
    • SearchOnlyCollection.ts, SearchOnlyDocuments.ts, Utils.ts: Updated imports

Context

PR Checklist

- Extract shared type definitions from `Documents.ts` to new `Types.ts` file
- Update imports in dependent modules (`SearchOnlyCollection.ts`, `Utils.ts`)
- Add deprecation notice for type imports from `Documents.ts`
- Maintain backward compatibility with re-exports
@jasonbosco jasonbosco merged commit d26aa00 into typesense:master Mar 12, 2025
1 check passed
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