Skip to content

Commit 4034125

Browse files
fix: simplify type
1 parent b993355 commit 4034125

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ export type BulkWriteOperation<TSchema, TOptions extends SchemaOptions<TSchema>>
102102
type FilterKeys<TObject, ValueType> = {
103103
[TKey in keyof TObject]: TObject[TKey] extends ValueType ? TKey : never;
104104
}[keyof TObject];
105-
type FilterProperties<TObject, ValueType> = {
106-
[TKey in FilterKeys<TObject, ValueType>]: TObject[TKey];
107-
};
105+
type FilterProperties<TObject, ValueType> = Pick<TObject, FilterKeys<TObject, ValueType>>;
108106
export type ProjectionType<
109107
TSchema extends BaseSchema,
110108
Projection extends

0 commit comments

Comments
 (0)