Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parameters on SchemaType #10609

Closed
simllll opened this issue Aug 25, 2021 · 0 comments
Closed

Missing parameters on SchemaType #10609

simllll opened this issue Aug 25, 2021 · 0 comments
Labels
typescript Types or Types-test related issue / Pull Request
Milestone

Comments

@simllll
Copy link
Contributor

simllll commented Aug 25, 2021

Do you want to request a feature or report a bug?
bug

What is the current behavior?

error TS2339: Property 'instance' does not exist on type 'SchemaType'.
error TS2339: Property 'options' does not exist on type 'SchemaType'.
error TS2339: Property 'schema' does not exist on type 'SchemaType'.

If the current behavior is a bug, please provide the steps to reproduce.
According to the documentation and in preivous versions this was working, by accesing .instance .optoins or .schema of a SchemaType, e.g. by
Model.schema.path(schemaPath).instance;SchemaType
see also https://mongoosejs.com/docs/schematypes.html

What is the expected behavior?
Add type def for instance, options and schema.

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
mongoose 6.0.0

@vkarpov15 vkarpov15 added this to the 6.0.1 milestone Aug 25, 2021
@vkarpov15 vkarpov15 added the typescript Types or Types-test related issue / Pull Request label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

No branches or pull requests

2 participants