不要怂,就是干,撸起袖子干!

Commit 6b659987 by Simon Schick Committed by Sushant

fix(types): add missing useCLS static (#10693)

1 parent 7445423b
......@@ -674,6 +674,15 @@ export class Sequelize extends Hooks {
public static afterSync(fn: (options: SyncOptions) => HookReturn): void;
/**
* Use CLS with Sequelize.
* CLS namespace provided is stored as `Sequelize._cls`
* and bluebird Promise is patched to use the namespace, using `cls-bluebird` module.
*
* @param namespace
*/
public static useCLS(namespace: object): typeof Sequelize;
/**
* A reference to Sequelize constructor from sequelize. Useful for accessing DataTypes, Errors etc.
*/
public Sequelize: typeof Sequelize;
......
import { Config, Sequelize } from 'sequelize';
Sequelize.useCLS({
});
export const sequelize = new Sequelize({
hooks: {
afterConnect: (connection, config: Config) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!