File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/search/lib/commands Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -198,18 +198,20 @@ type CreateSchemaField<
198
198
INDEXMISSING ?: boolean ;
199
199
} & E ) ;
200
200
201
+ type CommonFieldArguments = {
202
+ SORTABLE ?: boolean | 'UNF' ;
203
+ NOINDEX ?: boolean ;
204
+ } ;
205
+
201
206
type CreateSchemaCommonField <
202
207
T extends SchemaFieldTypes ,
203
208
E = Record < PropertyKey , unknown >
204
209
> = CreateSchemaField <
205
210
T ,
206
- ( {
207
- SORTABLE ?: true | 'UNF' ;
208
- NOINDEX ?: true ;
209
- } & E )
211
+ ( CommonFieldArguments & E )
210
212
> ;
211
213
212
- function pushCommonFieldArguments ( args : RedisCommandArguments , fieldOptions : CreateSchemaCommonField < SchemaFieldTypes > ) {
214
+ function pushCommonFieldArguments ( args : RedisCommandArguments , fieldOptions : CommonFieldArguments ) {
213
215
if ( fieldOptions . SORTABLE ) {
214
216
args . push ( 'SORTABLE' ) ;
215
217
You can’t perform that action at this time.
0 commit comments