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

Commit 0201889b by Thomas Hoppe Committed by Sushant

fix(typings): add nested to Includeable (#11354)

1 parent 3f8246f1
Showing with 3 additions and 1 deletions
...@@ -378,7 +378,7 @@ export interface IncludeThroughOptions extends Filterable, Projectable {} ...@@ -378,7 +378,7 @@ export interface IncludeThroughOptions extends Filterable, Projectable {}
/** /**
* Options for eager-loading associated models, also allowing for all associations to be loaded at once * Options for eager-loading associated models, also allowing for all associations to be loaded at once
*/ */
export type Includeable = typeof Model | Association | IncludeOptions | { all: true } | string; export type Includeable = typeof Model | Association | IncludeOptions | { all: true, nested?: true } | string;
/** /**
* Complex include options * Complex include options
......
...@@ -20,6 +20,8 @@ MyModel.findAll({ ...@@ -20,6 +20,8 @@ MyModel.findAll({
order: [['id', 'DESC'], [ 'AssociatedModel', MyModel, 'id', 'DESC' ], [ MyModel, 'id' ] ], order: [['id', 'DESC'], [ 'AssociatedModel', MyModel, 'id', 'DESC' ], [ MyModel, 'id' ] ],
separate: true, separate: true,
where: { state: Sequelize.col('project.state') }, where: { state: Sequelize.col('project.state') },
all: true,
nested: true,
}, },
], ],
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!