Open History to see the last commit
Type Alias: ResolveType<TExplicit, TSchema, TFallback>#
type ResolveType<TExplicit, TSchema, TFallback> = unknown extends TExplicit ? [TSchema] extends [never] ? TFallback : InferSchemaOutput<TSchema> : TExplicit extends object ? TExplicit : Record<string, unknown>;
Defined in: packages/db/src/types.ts:64
Helper type to determine the final type based on priority:
- Explicit generic TExplicit (if not 'unknown')
- Schema output type (if schema provided)
- Fallback type TFallback
Type Parameters#
• TExplicit
• TSchema extends StandardSchemaV1 = never
• TFallback extends object = Record<string, unknown>
Remarks#
This type is used internally to resolve the collection item type based on the provided generics and schema. Users should not need to use this type directly, but understanding the priority order helps when defining collections.