Skip to content

Commit 64d4bba

Browse files
authored
fix for last commit
1 parent 15580a3 commit 64d4bba

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/search/lib/commands/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,20 @@ type CreateSchemaField<
198198
INDEXMISSING?: boolean;
199199
} & E);
200200

201+
type CommonFieldArguments = {
202+
SORTABLE?: boolean | 'UNF';
203+
NOINDEX?: boolean;
204+
};
205+
201206
type CreateSchemaCommonField<
202207
T extends SchemaFieldTypes,
203208
E = Record<PropertyKey, unknown>
204209
> = CreateSchemaField<
205210
T,
206-
({
207-
SORTABLE?: true | 'UNF';
208-
NOINDEX?: true;
209-
} & E)
211+
(CommonFieldArguments & E)
210212
>;
211213

212-
function pushCommonFieldArguments(args: RedisCommandArguments, fieldOptions: CreateSchemaCommonField<SchemaFieldTypes>) {
214+
function pushCommonFieldArguments(args: RedisCommandArguments, fieldOptions: CommonFieldArguments) {
213215
if (fieldOptions.SORTABLE) {
214216
args.push('SORTABLE');
215217

0 commit comments

Comments
 (0)