ImplicitIdentifier<T>: T["identifier"]["pk"] extends ModelDefaultIdentifier["pk"]
    ? "id" extends keyof T["fields"]
        ? unknown
        : ModelDefaultIdentifier["pk"]
    : unknown

Separate util for injecting the default implicit identifier for performance reasons. The full ModelIdentifer util needs to extract types from the fields matching the explicitly defined field types. Contrast that to injecting PK fields into the model, which is only done specifically when the default of readonly id: string is being injected IF AND ONLY IF another id field is not already present on the model.

Type Parameters