Skip to content

Commit

Permalink
Merge pull request #231 from yvesh/fix-typescript
Browse files Browse the repository at this point in the history
Fix types for comparsion options in types/main.d.ts
  • Loading branch information
HC200ok authored Feb 19, 2023
2 parents c25df78 + b6c6b36 commit ef4ff45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/types/main.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type FilterOption = {
comparison: '>' | '>=' | '<' | '<='
criteria: number
} | {
field: string
field: number | string
comparison: 'in'
criteria: number[] | string[]
}| {
Expand Down
6 changes: 5 additions & 1 deletion types/main.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export type SortType = 'asc' | 'desc'

export type FilterComparison = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'between';
export type FilterComparison = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'between'| 'in';

export type Item = Record<string, any>

Expand All @@ -16,6 +16,10 @@ export type FilterOption = {
field: string
comparison: '>' | '>=' | '<' | '<='
criteria: number
} | {
field: number | string
comparison: 'in'
criteria: number[] | string[]
} | {
field: string
comparison: (value: any, criteria: string) => boolean
Expand Down

0 comments on commit ef4ff45

Please sign in to comment.