Skip to content

fix(types): fix infix types#272

Merged
tharropoulos merged 2 commits into
typesense:masterfrom
tharropoulos:infix-types
Mar 13, 2026
Merged

fix(types): fix infix types#272
tharropoulos merged 2 commits into
typesense:masterfrom
tharropoulos:infix-types

Conversation

@tharropoulos

Copy link
Copy Markdown
Collaborator

Change Summary

  • Thread Infix through index.d.ts so TypesenseInstantsearchAdapterOptions and TypesenseInstantsearchAdapter preserve the upstream SearchParamsWithPreset<T, Infix> typing for infix.
  • Add tsd tests in index.test-d.ts for constructor usage, including accepted valid infix literals and rejected invalid ones.
  • This works by allowing TypeScript to infer the infix string literal at the adapter constructor boundary and apply the existing Typesense OperationMode validation.

PR Checklist

- propagate `Infix extends string` generic to collection and additional
  search parameter types
- update adapter options and class signatures to support typed infix
  configuration
@tharropoulos tharropoulos changed the title fix(types)): fix infix types fix(types): fix infix types Mar 13, 2026
@tharropoulos tharropoulos merged commit aefaef9 into typesense:master Mar 13, 2026
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.

1 participant