Skip to content

Commit b532ab1

Browse files
authored
fix(operators): fix ts support for operators.ts (#13805)
1 parent da5b0ce commit b532ab1

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

lib/operators.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,4 +521,9 @@ const Op: OpTypes = {
521521
match: Symbol.for('match')
522522
} as OpTypes;
523523

524-
export = Op;
524+
export default Op;
525+
526+
// https://github.com/sequelize/sequelize/issues/13791
527+
// remove me in v7: kept for backward compatibility as `export default Op` is
528+
// transpiled to `module.exports.default` instead of `module.exports`
529+
module.exports = Op;

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import DataTypes = require("./lib/data-types");
22
import Deferrable = require("./lib/deferrable");
3-
import Op = require("../lib/operators");
3+
import Op from "../lib/operators";
44
import QueryTypes = require("./lib/query-types");
55
import TableHints = require("./lib/table-hints");
66
import IndexHints = require("./lib/index-hints");

types/lib/model.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Sequelize, SyncOptions } from './sequelize';
99
import { LOCK, Transaction } from './transaction';
1010
import { Col, Fn, Literal, Where } from './utils';
1111
import { SetRequired } from '../type-helpers/set-required'
12-
import Op = require('../../lib/operators');
12+
import Op from '../../lib/operators';
1313

1414
export interface Logging {
1515
/**

0 commit comments

Comments
 (0)