effect-io-ai

Package: @effect/platform-browser
Module: IndexedDbQueryBuilder

IndexedDbQueryBuilder.IndexedDbQuery.ExtractIndexType

Value type accepted by range comparisons for a table key path or index, including partial tuples for compound indexes.

Signature

type ExtractIndexType<Table, Index, KeyPath, Type> = KeyPath extends keyof Type ? Type[KeyPath]
    : KeyPath extends readonly [infer K, ...infer Rest] ? K extends keyof Type ? [
          Type[K],
          ...{ [P in keyof Rest]?: Rest[P] extends keyof Type ? Type[Rest[P]] | [] : never }
        ] :
      never :
    never

Source

Since v4.0.0