Skip to content

postgrelize / NonNullFindOptions

Type Alias: NonNullFindOptions<T> ​

NonNullFindOptions<T> = FindOptions<T> & Readonly<{ rejectOnEmpty: boolean | Error; }>

Defined in: src/model/v6-aliases.ts:53

FindOptions with a required rejectOnEmpty (Sequelize v6 NonNullFindOptions): the finder never resolves to null.

Type Parameters ​

T ​

T = Values

Example ​

ts
const options: NonNullFindOptions<User> = { where: { id: 1 }, rejectOnEmpty: true };
const user = await User.findOne(options);

Released under the MIT License.