prostgles-types 4.0.113 → 4.0.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/filters.ts CHANGED
@@ -5,76 +5,91 @@ export type AllowedTSType = string | number | boolean | Date | any;
5
5
  export type AllowedTSTypes = AllowedTSType[];
6
6
 
7
7
  export const CompareFilterKeys = [
8
- "=", "$eq",
9
- "<>",">","<",">=","<=",
10
- "$eq","$ne","$gt","$gte","$lt","$lte",
11
- "$isDistinctFrom","$isNotDistinctFrom",
8
+ "=",
9
+ "$eq",
10
+ "<>",
11
+ ">",
12
+ "<",
13
+ ">=",
14
+ "<=",
15
+ "$eq",
16
+ "$ne",
17
+ "$gt",
18
+ "$gte",
19
+ "$lt",
20
+ "$lte",
21
+ "$isDistinctFrom",
22
+ "$isNotDistinctFrom",
12
23
  ] as const;
13
24
  export const CompareInFilterKeys = ["$in", "$nin"] as const;
14
25
  export const BetweenFilterKeys = ["$between", "$notBetween"] as const;
15
26
 
16
-
17
27
  export const JsonbOperands = {
18
28
  "@>": {
19
- "Operator": "@>",
29
+ Operator: "@>",
20
30
  "Right Operand Type": "jsonb",
21
- "Description": "Does the left JSON value contain the right JSON path/value entries at the top level?",
22
- "Example": "'{\"a\":1, \"b\":2}'::jsonb @> '{\"b\":2}'::jsonb"
31
+ Description:
32
+ "Does the left JSON value contain the right JSON path/value entries at the top level?",
33
+ Example: '\'{"a":1, "b":2}\'::jsonb @> \'{"b":2}\'::jsonb',
23
34
  },
24
35
  "<@": {
25
- "Operator": "<@",
36
+ Operator: "<@",
26
37
  "Right Operand Type": "jsonb",
27
- "Description": "Are the left JSON path/value entries contained at the top level within the right JSON value?",
28
- "Example": "'{\"b\":2}'::jsonb <@ '{\"a\":1, \"b\":2}'::jsonb"
38
+ Description:
39
+ "Are the left JSON path/value entries contained at the top level within the right JSON value?",
40
+ Example: '\'{"b":2}\'::jsonb <@ \'{"a":1, "b":2}\'::jsonb',
29
41
  },
30
42
  "?": {
31
- "Operator": "?",
43
+ Operator: "?",
32
44
  "Right Operand Type": "text",
33
- "Description": "Does the string exist as a top-level key within the JSON value?",
34
- "Example": "'{\"a\":1, \"b\":2}'::jsonb ? 'b'"
45
+ Description: "Does the string exist as a top-level key within the JSON value?",
46
+ Example: "'{\"a\":1, \"b\":2}'::jsonb ? 'b'",
35
47
  },
36
48
  "?|": {
37
- "Operator": "?|",
49
+ Operator: "?|",
38
50
  "Right Operand Type": "text[]",
39
- "Description": "Do any of these array strings exist as top-level keys?",
40
- "Example": "'{\"a\":1, \"b\":2, \"c\":3}'::jsonb ?| array['b', 'c']"
51
+ Description: "Do any of these array strings exist as top-level keys?",
52
+ Example: "'{\"a\":1, \"b\":2, \"c\":3}'::jsonb ?| array['b', 'c']",
41
53
  },
42
54
  "?&": {
43
- "Operator": "?&",
55
+ Operator: "?&",
44
56
  "Right Operand Type": "text[]",
45
- "Description": "Do all of these array strings exist as top-level keys?",
46
- "Example": "'[\"a\", \"b\"]'::jsonb ?& array['a', 'b']"
57
+ Description: "Do all of these array strings exist as top-level keys?",
58
+ Example: "'[\"a\", \"b\"]'::jsonb ?& array['a', 'b']",
47
59
  },
48
60
  "||": {
49
- "Operator": "||",
61
+ Operator: "||",
50
62
  "Right Operand Type": "jsonb",
51
- "Description": "Concatenate two jsonb values into a new jsonb value",
52
- "Example": "'[\"a\", \"b\"]'::jsonb || '[\"c\", \"d\"]'::jsonb"
63
+ Description: "Concatenate two jsonb values into a new jsonb value",
64
+ Example: '\'["a", "b"]\'::jsonb || \'["c", "d"]\'::jsonb',
53
65
  },
54
66
  "-": {
55
- "Operator": "-",
67
+ Operator: "-",
56
68
  "Right Operand Type": "integer",
57
- "Description": "Delete the array element with specified index (Negative integers count from the end). Throws an error if top level container is not an array.",
58
- "Example": "'[\"a\", \"b\"]'::jsonb - 1"
69
+ Description:
70
+ "Delete the array element with specified index (Negative integers count from the end). Throws an error if top level container is not an array.",
71
+ Example: '\'["a", "b"]\'::jsonb - 1',
59
72
  },
60
73
  "#-": {
61
- "Operator": "#-",
74
+ Operator: "#-",
62
75
  "Right Operand Type": "text[]",
63
- "Description": "Delete the field or element with specified path (for JSON arrays, negative integers count from the end)",
64
- "Example": "'[\"a\", {\"b\":1}]'::jsonb #- '{1,b}'"
76
+ Description:
77
+ "Delete the field or element with specified path (for JSON arrays, negative integers count from the end)",
78
+ Example: "'[\"a\", {\"b\":1}]'::jsonb #- '{1,b}'",
65
79
  },
66
80
  "@?": {
67
- "Operator": "@?",
81
+ Operator: "@?",
68
82
  "Right Operand Type": "jsonpath",
69
- "Description": "Does JSON path return any item for the specified JSON value?",
70
- "Example": "'{\"a\":[1,2,3,4,5]}'::jsonb @? '$.a[*] ? (@ > 2)'"
83
+ Description: "Does JSON path return any item for the specified JSON value?",
84
+ Example: "'{\"a\":[1,2,3,4,5]}'::jsonb @? '$.a[*] ? (@ > 2)'",
71
85
  },
72
86
  "@@": {
73
- "Operator": "@@",
87
+ Operator: "@@",
74
88
  "Right Operand Type": "jsonpath",
75
- "Description": "Returns the result of JSON path predicate check for the specified JSON value. Only the first item of the result is taken into account. If the result is not Boolean, then null is returned.",
76
- "Example": "'{\"a\":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2'"
77
- }
89
+ Description:
90
+ "Returns the result of JSON path predicate check for the specified JSON value. Only the first item of the result is taken into account. If the result is not Boolean, then null is returned.",
91
+ Example: "'{\"a\":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2'",
92
+ },
78
93
  } as const;
79
94
 
80
95
  export const JsonbFilterKeys = getKeys(JsonbOperands);
@@ -83,85 +98,106 @@ export const TextFilterKeys = ["$ilike", "$like", "$nilike", "$nlike"] as const;
83
98
 
84
99
  export const TextFilterFTSKeys = ["@@", "@>", "<@", "$contains", "$containedBy"] as const;
85
100
 
86
- export const TextFilter_FullTextSearchFilterKeys = ["to_tsquery","plainto_tsquery","phraseto_tsquery","websearch_to_tsquery"] as const;
87
- export type FullTextSearchFilter =
88
- | ExactlyOne<Record<typeof TextFilter_FullTextSearchFilterKeys[number], string[]>>
89
- ;
101
+ export const TextFilter_FullTextSearchFilterKeys = [
102
+ "to_tsquery",
103
+ "plainto_tsquery",
104
+ "phraseto_tsquery",
105
+ "websearch_to_tsquery",
106
+ ] as const;
107
+ export type FullTextSearchFilter = ExactlyOne<
108
+ Record<(typeof TextFilter_FullTextSearchFilterKeys)[number], string[]>
109
+ >;
90
110
 
91
111
  /**
92
112
  * Example: col_name: { $gt: 2 }
93
113
  */
94
- export type CompareFilter<T extends AllowedTSType = string> =
95
- /**
96
- * column value equals provided value
97
- */
98
- | T
99
- | ExactlyOne<Record<typeof CompareFilterKeys[number], T>>
100
-
101
- | ExactlyOne<Record<typeof CompareInFilterKeys[number], T[]>>
102
- | ExactlyOne<Record<typeof BetweenFilterKeys[number],[T, T]>>
103
- ;
104
-
105
- export type TextFilter =
106
- | CompareFilter<string>
107
- | ExactlyOne<Record<typeof TextFilterKeys[number], string>>
108
-
109
- | ExactlyOne<Record<typeof TextFilterFTSKeys[number], FullTextSearchFilter>>
110
- ;
111
-
112
- export const ArrayFilterOperands = ["@>", "<@", "=", "$eq", "$contains", "$containedBy", "&&", "$overlaps"] as const;
113
- export type ArrayFilter<T extends AllowedTSType[]> =
114
- | Record<typeof ArrayFilterOperands[number], T>
115
- | ExactlyOne<Record<typeof ArrayFilterOperands[number], T>>
116
- ;
114
+ export type CompareFilter<T extends AllowedTSType = string> =
115
+ /**
116
+ * column value equals provided value
117
+ */
118
+ | T
119
+ | ExactlyOne<Record<(typeof CompareFilterKeys)[number], T>>
120
+ | ExactlyOne<Record<(typeof CompareInFilterKeys)[number], T[]>>
121
+ | ExactlyOne<Record<(typeof BetweenFilterKeys)[number], [T, T]>>;
122
+
123
+ export type TextFilter =
124
+ | CompareFilter<string>
125
+ | ExactlyOne<Record<(typeof TextFilterKeys)[number], string>>
126
+ | ExactlyOne<Record<(typeof TextFilterFTSKeys)[number], FullTextSearchFilter>>;
127
+
128
+ export const ArrayFilterOperands = [
129
+ "@>",
130
+ "<@",
131
+ "=",
132
+ "$eq",
133
+ "$contains",
134
+ "$containedBy",
135
+ "&&",
136
+ "$overlaps",
137
+ ] as const;
138
+ export type ArrayFilter<T extends AllowedTSType[]> =
139
+ | Record<(typeof ArrayFilterOperands)[number], T>
140
+ | ExactlyOne<Record<(typeof ArrayFilterOperands)[number], T>>;
117
141
 
118
142
  /* POSTGIS */
119
143
 
120
144
  /**
121
- * Makes bounding box from NW and SE points
122
- * float xmin, float ymin, float xmax, float ymax, integer srid=unknown
123
- * https://postgis.net/docs/ST_MakeEnvelope.html
124
- */
125
- export type GeoBBox = { ST_MakeEnvelope: number[] }
126
-
145
+ * Makes bounding box from NW and SE points
146
+ * float xmin, float ymin, float xmax, float ymax, integer srid=unknown
147
+ * https://postgis.net/docs/ST_MakeEnvelope.html
148
+ */
149
+ export type GeoBBox = { ST_MakeEnvelope: number[] };
127
150
 
128
151
  /**
129
- * Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
130
- * https://postgis.net/docs/reference.html#Operators
131
- */
132
- export type GeomFilter =
133
-
134
- /**
135
- * A's 2D bounding box intersects B's 2D bounding box.
136
- */
137
- | { "&&": GeoBBox }
138
- // | { "&&&": GeoBBox }
139
- // | { "&<": GeoBBox }
140
- // | { "&<|": GeoBBox }
141
- // | { "&>": GeoBBox }
142
- // | { "<<": GeoBBox }
143
- // | { "<<|": GeoBBox }
144
- // | { ">>": GeoBBox }
145
-
146
- // | { "=": GeoBBox }
147
-
148
- /**
149
- * A's bounding box is contained by B's
150
- */
151
- | { "@": GeoBBox }
152
- // | { "|&>": GeoBBox }
153
- // | { "|>>": GeoBBox }
154
-
155
- /**
156
- * A's bounding box contains B's.
157
- */
158
- // | { "~": GeoBBox }
159
- // | { "~=": GeoBBox }
160
- ;
161
- export const GeomFilterKeys = ["~","~=","@","|&>","|>>", ">>", "=", "<<|", "<<", "&>", "&<|", "&<", "&&&", "&&"] as const;
162
- export const GeomFilter_Funcs = [
163
- "ST_MakeEnvelope",
164
- "st_makeenvelope",
152
+ * Returns TRUE if A's 2D bounding box intersects B's 2D bounding box.
153
+ * https://postgis.net/docs/reference.html#Operators
154
+ */
155
+ export type GeomFilter =
156
+ /**
157
+ * A's 2D bounding box intersects B's 2D bounding box.
158
+ */
159
+ | { "&&": GeoBBox }
160
+ // | { "&&&": GeoBBox }
161
+ // | { "&<": GeoBBox }
162
+ // | { "&<|": GeoBBox }
163
+ // | { "&>": GeoBBox }
164
+ // | { "<<": GeoBBox }
165
+ // | { "<<|": GeoBBox }
166
+ // | { ">>": GeoBBox }
167
+
168
+ // | { "=": GeoBBox }
169
+
170
+ /**
171
+ * A's bounding box is contained by B's
172
+ */
173
+ | { "@": GeoBBox };
174
+ // | { "|&>": GeoBBox }
175
+ // | { "|>>": GeoBBox }
176
+
177
+ /**
178
+ * A's bounding box contains B's.
179
+ */
180
+ // | { "~": GeoBBox }
181
+ // | { "~=": GeoBBox }
182
+ export const GeomFilterKeys = [
183
+ "~",
184
+ "~=",
185
+ "@",
186
+ "|&>",
187
+ "|>>",
188
+ ">>",
189
+ "=",
190
+ "<<|",
191
+ "<<",
192
+ "&>",
193
+ "&<|",
194
+ "&<",
195
+ "&&&",
196
+ "&&",
197
+ ] as const;
198
+ export const GeomFilter_Funcs = [
199
+ "ST_MakeEnvelope",
200
+ "st_makeenvelope",
165
201
  "ST_MakePolygon",
166
202
  "st_makepolygon",
167
203
  ] as const;
@@ -169,61 +205,69 @@ export const GeomFilter_Funcs = [
169
205
  export type AnyObject = Record<string, any>;
170
206
 
171
207
  // PG will try to cast strings to appropriate type
172
- export type CastFromTSToPG<T extends AllowedTSType> =
173
- T extends number ? (T | string)
174
- : T extends string ? (T | number | Date)
175
- : T extends boolean ? (T | string)
176
- : T extends Date ? (T | string)
177
- : T
178
-
208
+ export type CastFromTSToPG<T extends AllowedTSType> =
209
+ T extends number ? T | string
210
+ : T extends string ? T | number | Date
211
+ : T extends boolean ? T | string
212
+ : T extends Date ? T | string
213
+ : T;
179
214
 
180
215
  export const EXISTS_KEYS = ["$exists", "$notExists", "$existsJoined", "$notExistsJoined"] as const;
181
- export type EXISTS_KEY = typeof EXISTS_KEYS[number];
182
-
183
-
216
+ export type EXISTS_KEY = (typeof EXISTS_KEYS)[number];
184
217
 
185
218
  export const ComplexFilterComparisonKeys = [
186
219
  ...TextFilterKeys,
187
220
  ...JsonbFilterKeys,
188
221
  ...CompareFilterKeys,
189
222
  ...BetweenFilterKeys,
190
- ...CompareInFilterKeys
223
+ ...CompareInFilterKeys,
191
224
  ] as const;
192
225
 
193
226
  export const COMPLEX_FILTER_KEY = "$filter" as const;
194
227
 
195
228
  /**
196
229
  * Complex filter that allows applying functions to columns
197
- * @example:
198
- * {
230
+ * @example:
231
+ * {
199
232
  * $filter: [
200
233
  * { $funcName: [...args] },
201
234
  * operand,
202
235
  * value | funcFilter
203
- * ]
236
+ * ]
204
237
  * }
205
238
  */
206
- export type ComplexFilter = Record<typeof COMPLEX_FILTER_KEY, [
207
- { [funcName: string]: any[] },
208
- typeof ComplexFilterComparisonKeys[number]?,
209
- any?
210
- ]>;
239
+ export type ComplexFilter = Record<
240
+ typeof COMPLEX_FILTER_KEY,
241
+ [{ [funcName: string]: any[] }, (typeof ComplexFilterComparisonKeys)[number]?, any?]
242
+ >;
211
243
 
212
244
  export type KeyofString<T> = keyof T & string;
213
245
 
214
246
  /**
215
247
  * Shortened filter operands
216
248
  */
217
- type BasicFilter<Field extends string, DataType extends any> = Partial<{
218
- [K in Extract<typeof CompareFilterKeys[number], string> as `${Field}.${K}`]: CastFromTSToPG<DataType>
219
- }> | Partial<{
220
- [K in Extract<typeof CompareInFilterKeys[number], string> as `${Field}.${K}`]: CastFromTSToPG<DataType>[]
221
- }>;
222
- type StringFilter<Field extends string, DataType extends any> = BasicFilter<Field, DataType> & (Partial<{
223
- [K in Extract<typeof TextFilterKeys[number], string> as `${Field}.${K}`]: DataType
224
- }> | Partial<{
225
- [K in Extract<typeof TextFilterFTSKeys[number], string> as `${Field}.${K}`]: any
226
- }>);
249
+ type BasicFilter<Field extends string, DataType extends any> =
250
+ | Partial<{
251
+ [K in Extract<
252
+ (typeof CompareFilterKeys)[number],
253
+ string
254
+ > as `${Field}.${K}`]: CastFromTSToPG<DataType>;
255
+ }>
256
+ | Partial<{
257
+ [K in Extract<
258
+ (typeof CompareInFilterKeys)[number],
259
+ string
260
+ > as `${Field}.${K}`]: CastFromTSToPG<DataType>[];
261
+ }>;
262
+ type StringFilter<Field extends string, DataType extends any> = BasicFilter<Field, DataType> &
263
+ (
264
+ | Partial<{
265
+ [K in Extract<(typeof TextFilterKeys)[number], string> as `${Field}.${K}`]: DataType;
266
+ }>
267
+ | Partial<{
268
+ [K in Extract<(typeof TextFilterFTSKeys)[number], string> as `${Field}.${K}`]: any;
269
+ }>
270
+ );
227
271
  export type ValueOf<T> = T[keyof T];
228
272
 
229
273
  /**
@@ -237,22 +281,21 @@ export type EqualityFilter<T extends AnyObject> = {
237
281
  /**
238
282
  * Filter operators for each PG data type
239
283
  */
240
- export type FilterDataType<T extends AllowedTSType> =
284
+ export type FilterDataType<T extends AllowedTSType> =
241
285
  T extends string ? TextFilter
242
- : T extends number ? CompareFilter<CastFromTSToPG<T>>
243
- : T extends boolean ? CompareFilter<CastFromTSToPG<T>>
244
- : T extends Date ? CompareFilter<CastFromTSToPG<T>>
245
- : T extends any[] ? ArrayFilter<T>
246
- : (CompareFilter<T> | TextFilter | GeomFilter)
247
- ;
286
+ : T extends number ? CompareFilter<CastFromTSToPG<T>>
287
+ : T extends boolean ? CompareFilter<CastFromTSToPG<T>>
288
+ : T extends Date ? CompareFilter<CastFromTSToPG<T>>
289
+ : T extends any[] ? ArrayFilter<T>
290
+ : CompareFilter<T> | TextFilter | GeomFilter;
248
291
 
249
292
  /**
250
293
  * Column filter with operators
251
294
  * Multiple columns are combined with AND
252
- * @example: { colName: { $operator: ["value"] } }
295
+ * @example: { colName: { $operator: ["value"] } }
253
296
  * */
254
297
  type NormalFilter<T> = {
255
- [K in keyof Partial<T>]: FilterDataType<T[K]>
298
+ [K in keyof Partial<T>]: FilterDataType<T[K]>;
256
299
  } & Partial<ComplexFilter>;
257
300
 
258
301
  /**
@@ -261,81 +304,73 @@ type NormalFilter<T> = {
261
304
  * @example: { "name.$ilike": 'abc' }
262
305
  */
263
306
  type ShorthandFilter<Obj extends Record<string, any>> = ValueOf<{
264
- [K in KeyofString<Obj>]: Obj[K] extends string? StringFilter<K, Required<Obj>[K]> : BasicFilter<K, Required<Obj>[K]>;
265
- }>
307
+ [K in KeyofString<Obj>]: Obj[K] extends string ? StringFilter<K, Required<Obj>[K]>
308
+ : BasicFilter<K, Required<Obj>[K]>;
309
+ }>;
266
310
 
267
311
  /* Traverses object keys to make filter */
268
- export type FilterForObject<T extends AnyObject = AnyObject> =
269
- | NormalFilter<T>
270
- | ShorthandFilter<T>
271
- ;
272
-
273
- export type ExistsFilter<S = void> = Partial<{
274
- [key in EXISTS_KEY]: S extends DBSchema?
275
- ExactlyOne<{
276
- [tname in KeyofString<S>]:
277
- | FullFilter<S[tname]["columns"], S>
278
- | {
279
- path: RawJoinPath[];
280
- filter: FullFilter<S[tname]["columns"], S>
281
- }
282
- }> : any
283
- /** ExactlyOne does not for any type. This produces error */
284
- // ExactlyOne<{
285
- // [key: string]: FullFilter<AnyObject,S>
286
- // }>
287
- }>;
288
-
289
-
312
+ export type FilterForObject<T extends AnyObject = AnyObject> = NormalFilter<T> | ShorthandFilter<T>;
313
+
314
+ export type ExistsFilter<S = void> = Partial<{
315
+ [key in EXISTS_KEY]: S extends DBSchema ?
316
+ ExactlyOne<{
317
+ [tname in KeyofString<S>]:
318
+ | FullFilter<S[tname]["columns"], S>
319
+ | {
320
+ path: RawJoinPath[];
321
+ filter: FullFilter<S[tname]["columns"], S>;
322
+ };
323
+ }>
324
+ : any;
325
+ /** ExactlyOne does not for any type. This produces error */
326
+ // ExactlyOne<{
327
+ // [key: string]: FullFilter<AnyObject,S>
328
+ // }>
329
+ }>;
330
+
290
331
  /**
291
332
  * Filter that relates to a single column
292
333
  */
293
- export type FilterItem<T extends AnyObject = AnyObject> =
294
- | FilterForObject<T>
334
+ export type FilterItem<T extends AnyObject = AnyObject> = FilterForObject<T>;
295
335
 
296
- export type AnyObjIfVoid<T extends AnyObject | void> = T extends AnyObject? T : AnyObject;
336
+ export type AnyObjIfVoid<T extends AnyObject | void> = T extends AnyObject ? T : AnyObject;
297
337
 
298
338
  /**
299
339
  * Group or simple filter
300
340
  * @example { $or: [ { id: 1 }, { status: 'live' } ] }
301
341
  */
302
- export type FullFilter<T extends AnyObject | void, S extends DBSchema | void> =
303
- | { $and: FullFilter<T, S>[] }
304
- | { $or: FullFilter<T, S>[] }
305
- | FilterItem<AnyObjIfVoid<T>>
306
- | ExistsFilter<S>
307
- | ComplexFilter
308
- ;
342
+ export type FullFilter<T extends AnyObject | void, S extends DBSchema | void> =
343
+ | { $and: FullFilter<T, S>[] }
344
+ | { $or: FullFilter<T, S>[] }
345
+ | FilterItem<AnyObjIfVoid<T>>
346
+ | ExistsFilter<S>
347
+ | ComplexFilter;
309
348
 
310
349
  /**
311
350
  * Simpler FullFilter to reduce load on compilation
312
351
  */
313
352
  export type FullFilterBasic<T = { [key: string]: any }> = {
314
- [key in keyof Partial<T> & { [key: string]: any }]: any
315
- }
316
-
353
+ [key in keyof Partial<T> & { [key: string]: any }]: any;
354
+ };
317
355
 
318
356
  /** Type checks */
319
357
  type RR = {
320
358
  h?: string[];
321
359
  id?: number;
322
360
  name?: string | null;
323
- }
361
+ };
324
362
 
325
363
  const _f: FilterItem<RR> = {
326
- "h.$eq": ["2"]
327
- }
364
+ "h.$eq": ["2"],
365
+ };
328
366
  const forcedFilter: FullFilter<RR, {}> = {
329
- // "h.$eq": ["2"]
330
- $and: [
331
- { "h.$eq": [] },
332
- { h: { "$containedBy": [] } }
333
- ]
334
- }
367
+ // "h.$eq": ["2"]
368
+ $and: [{ "h.$eq": [] }, { h: { $containedBy: [] } }],
369
+ };
335
370
  const _f2: FilterItem<RR> = {
336
- $filter: [{ $funcName: ["colname", "opts"] }, ">", 2]
337
- }
371
+ $filter: [{ $funcName: ["colname", "opts"] }, ">", 2],
372
+ };
338
373
 
339
- const _d: EqualityFilter<{ a: number; b: string; }> = {
374
+ const _d: EqualityFilter<{ a: number; b: string }> = {
340
375
  a: 2,
341
- };
376
+ };