This repository was archived by the owner on Jun 22, 2021. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,6 @@ export default (opts: Opts) => {
7474
7575  it ( 'should filter correctly when using $not operator' ,  async  ( )  =>  { 
7676    await  createTestEntities ( ) ; 
77-     await  opts . assertFirstEntityFilter ( {  $not : {  stringProp : 'b'  }  } ) ; 
77+     await  opts . assertFirstEntityFilter ( {  stringProp : {  $not : 'b'  }  } ) ; 
7878  } ) ; 
7979} ; 
Original file line number Diff line number Diff line change @@ -2,16 +2,19 @@ export type GreaterFilter<Prop> = { readonly $gt: Prop } | { readonly $gte: Prop
22export  type  LesserFilter < Prop >  =  {  readonly  $lt : Prop  }  |  {  readonly  $lte : Prop  } ; 
33export  type  InFilter < Prop >  =  {  readonly  $in : Prop [ ]  }  |  {  readonly  $nin : Prop [ ]  } ; 
44export  type  EqualityFilter < Prop >  =  {  readonly  $eq : Prop  }  |  {  readonly  $ne : Prop  } ; 
5+ export  interface  NotFilter < Prop >  {  readonly  $not : PropFilter < Prop > ;  } 
56
67export  type  PropFilter < Prop >  =  ( 
78  GreaterFilter < Prop >  | 
89  LesserFilter < Prop >  | 
910  InFilter < Prop >  | 
10-   EqualityFilter < Prop > 
11+   EqualityFilter < Prop >  | 
12+   NotFilter < Prop >  | 
13+   Prop 
1114) ; 
1215
1316export  type  EntityFilter < Entity >  =  { 
14-   readonly  [ P  in  keyof  Entity ] ?: Entity [ P ]   |   PropFilter < Entity [ P ] > ; 
17+   readonly  [ P  in  keyof  Entity ] ?: PropFilter < Entity [ P ] > ; 
1518} ; 
1619
1720export  interface  AndFilter < Entity >  { 
@@ -22,15 +25,10 @@ export interface OrFilter<Entity> {
2225  readonly  $or : Filter < Entity > [ ] ; 
2326} 
2427
25- export  interface  NotFilter < Entity >  { 
26-   readonly  $not : Filter < Entity > ; 
27- } 
28- 
2928export  type  Filter < Entity >  =  ( 
3029  EntityFilter < Entity >  | 
3130  AndFilter < Entity >  | 
32-   OrFilter < Entity >  | 
33-   NotFilter < Entity > 
31+   OrFilter < Entity > 
3432) ; 
3533
3634export  default  Filter ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments