diff --git a/src/model.d.ts b/src/model.d.ts index ecfff622b1a5..35af88d58204 100644 --- a/src/model.d.ts +++ b/src/model.d.ts @@ -36,7 +36,7 @@ import type { Where, } from './utils'; import type { SetRequired } from './utils/set-required'; -import type { LOCK, Op, Optional, Transaction } from './index'; +import type { LOCK, Op, Optional, Transaction, TableHints } from './index'; export interface Logging { /** @@ -926,6 +926,11 @@ export interface FindOptions * Throws an error if the query would return 0 results. */ rejectOnEmpty?: boolean | Error; + + /** + * Use a table hint for the query, only supported in MSSQL. + */ + tableHint?: TableHints; } export interface NonNullFindOptions extends FindOptions { diff --git a/test/types/table-hint.ts b/test/types/table-hint.ts new file mode 100644 index 000000000000..249527dc95d9 --- /dev/null +++ b/test/types/table-hint.ts @@ -0,0 +1,6 @@ +import { TableHints } from '@sequelize/core'; +import { User } from './models/user'; + +User.findAll({ + tableHint: TableHints.NOLOCK, +});