Skip to content

Commit

Permalink
ModelType不使用高级类型
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Nov 10, 2020
1 parent 6aec604 commit 593e769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type DocumentType<T> = {
T[TKey] extends Record<string, unknown> ? Types.Embedded & T[TKey] :
T[TKey]
} & Document
export type ModelType<T> = Model<DocumentType<T>>
export type ModelType<T> = Model<T & Document>
export type Ref<T extends {_id: unknown}> = T['_id'] | DocumentType<T>

const modelCache = new WeakMap<IMongooseClass, ModelType<InstanceType<IMongooseClass>>>()
Expand Down

0 comments on commit 593e769

Please sign in to comment.