Skip to content

Commit 8047283

Browse files
committed
fix: TS 4.5 fixes
1 parent 6786a3e commit 8047283

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mongo_types.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export type WithoutId<TSchema> = Omit<TSchema, '_id'>;
5757

5858
/** A MongoDB filter can be some portion of the schema or a set of operators @public */
5959
export type Filter<TSchema> = {
60-
[P in Join<NestedPaths<WithId<TSchema>>, '.'>]?: Condition<PropertyType<WithId<TSchema>, P>>;
60+
[Property in Join<NestedPaths<WithId<TSchema>>, '.'>]?: Condition<
61+
PropertyType<WithId<TSchema>, Property>
62+
>;
6163
} & RootFilterOperators<WithId<TSchema>>;
6264

6365
/** @public */
@@ -435,7 +437,7 @@ export type Join<T extends unknown[], D extends string> = T extends []
435437
? `${T[0]}`
436438
: T extends [string | number, ...infer R]
437439
? `${T[0]}${D}${Join<R, D>}`
438-
: string | number;
440+
: string;
439441

440442
/** @public */
441443
export type PropertyType<Type, Property extends string> = string extends Property

0 commit comments

Comments
 (0)