Skip to content

Commit d51fc16

Browse files
committed
fix: TS 4.5 fixes
1 parent 161db22 commit d51fc16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mongo_types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export type WithoutId<TSchema> = Omit<TSchema, '_id'>;
5656

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

6262
/** @public */
@@ -434,7 +434,7 @@ export type Join<T extends unknown[], D extends string> = T extends []
434434
? `${T[0]}`
435435
: T extends [string | number, ...infer R]
436436
? `${T[0]}${D}${Join<R, D>}`
437-
: string | number;
437+
: string;
438438

439439
/** @public */
440440
export type PropertyType<Type, Property extends string> = string extends Property

0 commit comments

Comments
 (0)