Skip to main content
Version: v10.0.0

KeyFieldOf

Fields whose values can be a key: strings and numbers


Import
import { KeyFieldOf } from "@hyper-fetch/db"

Preview​

type KeyFieldOf<Row> = { [ Field in keyof Row]-?: (NonNullable<Row[Field]> extends (string | number) ? Field : never) }[keyof Row] & string;