Type alias OptionalUnlessRequiredId<TSchema>

OptionalUnlessRequiredId<TSchema>: TSchema extends {
        _id: any;
    }
    ? TSchema
    : OptionalId<TSchema>

Adds an optional _id field to an object shaped type, unless the _id field is required on that type. In the case _id is required, this method continues to require_id.

Type Parameters

  • TSchema

Generated using TypeDoc