Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 6b659987
authored
Apr 03, 2019
by
Simon Schick
Committed by
Sushant
Apr 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(types): add missing useCLS static (#10693)
1 parent
7445423b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
types/lib/sequelize.d.ts
types/test/sequelize.ts
types/lib/sequelize.d.ts
View file @
6b65998
...
...
@@ -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
;
...
...
types/test/sequelize.ts
View file @
6b65998
import
{
Config
,
Sequelize
}
from
'sequelize'
;
Sequelize
.
useCLS
({
});
export
const
sequelize
=
new
Sequelize
({
hooks
:
{
afterConnect
:
(
connection
,
config
:
Config
)
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment