-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b38801
commit c597c80
Showing
4 changed files
with
151 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
import type { Options as Sequelize6Options } from 'sequelize'; | ||
import { Sequelize as Sequelize6 } from 'sequelize'; | ||
import type { Options as Sequelize7Options, Sequelize as Sequelize7 } from '@sequelize/core'; | ||
import { wrapOptions } from './wrap-options'; | ||
import type { Options as Sequelize6Options } from "sequelize"; | ||
import { Sequelize as Sequelize6 } from "sequelize"; | ||
import type { | ||
Options as Sequelize7Options, | ||
Sequelize as Sequelize7, | ||
} from "@sequelize/core"; | ||
import { wrapOptions } from "./wrap-options"; | ||
|
||
export function createSequelize6Instance(options?: Sequelize6Options): Sequelize6 { | ||
export function createSequelize6Instance( | ||
options?: Sequelize6Options | ||
): Sequelize6 { | ||
return new Sequelize6(wrapOptions(options)); | ||
} | ||
|
||
export function createSequelize7Instance(options?: Sequelize7Options): Sequelize7 { | ||
// not compatible with node 10 | ||
const { Sequelize: Sequelize7Constructor } = require('@sequelize/core'); | ||
// @ts-expect-error -- wrapOptions expect sequelize 6. | ||
return new Sequelize7Constructor(wrapOptions(options)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.