Skip to content

Commit

Permalink
Merge pull request #11150 from mhoc/master
Browse files Browse the repository at this point in the history
Export a Separate Type for PipelineStage Types Allowed in Facet Aggregation Sub-Pipelines
  • Loading branch information
vkarpov15 authored Dec 30, 2021
2 parents 6a5c154 + 52d986b commit b0d525d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3019,12 +3019,11 @@ declare module 'mongoose' {

export interface Facet {
/** [`$facet` reference](https://docs.mongodb.com/manual/reference/operator/aggregation/facet/) */
$facet: Record<
string,
Exclude<PipelineStage, PipelineStage.CollStats | PipelineStage.Facet | PipelineStage.GeoNear | PipelineStage.IndexStats | PipelineStage.Out | PipelineStage.Merge | PipelineStage.PlanCacheStats>[]
>
$facet: Record<string, FacetPipelineStage[]>
}

export type FacetPipelineStage = Exclude<PipelineStage, PipelineStage.CollStats | PipelineStage.Facet | PipelineStage.GeoNear | PipelineStage.IndexStats | PipelineStage.Out | PipelineStage.Merge | PipelineStage.PlanCacheStats>

export interface GeoNear {
/** [`$geoNear` reference](https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/) */
$geoNear: {
Expand Down

0 comments on commit b0d525d

Please sign in to comment.