Import error when using an inferred data tape #13710
Labels
help wanted
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Stale
Prerequisites
Mongoose version
6.7.3
Node.js version
18.16.0
MongoDB version
6
Operating system
None
Operating system version (i.e. 20.04, 11.3, 10)
Win10
Issue
Hello Mongoose Team,
I am trying to create a simple model derived from a Schema and an auto inferred type. To this end I am following the example code from the "schemas in typeScript" page.
I am using a very similar piece of code, but the IDE is complaining about having problems with the import of InferSchemaType
The compiler says "Cannot resolve symbol 'InferSchemaType'"
I see that there is a definition of InferSchemaType:
type InferSchemaType<TSchema> = IfAny<TSchema, any, ObtainSchemaGeneric<TSchema, 'DocType'>>;
but this definition is not being exported. What can I do in this case?
The text was updated successfully, but these errors were encountered: