Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

'immutable' option in @prop decorator missing in the types #320

Closed
naorzr opened this issue Jul 11, 2019 · 4 comments
Closed

'immutable' option in @prop decorator missing in the types #320

naorzr opened this issue Jul 11, 2019 · 4 comments

Comments

@naorzr
Copy link

naorzr commented Jul 11, 2019

It seems like it's supported, but not updated in the prop.d.ts file.

@hasezoey
Copy link
Contributor

Sorry for the late response for this issue:
i cant find a native "immutable" option in mongoose, but i can find mongoose-immutable module, and because this is not native mongoose, it will probably never be supported, but with the plugin and // @ts-ignore you can always add options that have no type

@naorzr
Copy link
Author

naorzr commented Jul 17, 2019

@hasezoey it seems like they haven't updated their own .d.ts files, but it is a native feature.
please see https://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-immutable.

I think that adding it with immutable: boolean and a todo to update it when mongoose .d files are updated would be a good option in this case

@hasezoey
Copy link
Contributor

@naorzr sorry, but i meant that i couldnt find anything on google that would be related to the native one, only to the one module, but yes, it could be easily added ... when i find it documented correctly (.d.ts), i will add it

hasezoey referenced this issue in typegoose/typegoose Aug 10, 2019
- adds immutable prop option
@hasezoey hasezoey mentioned this issue Aug 10, 2019
14 tasks
@hasezoey
Copy link
Contributor

hasezoey commented Sep 8, 2019

@Ben305 this can be closed because it is included in v6.0.0

@Ben305 Ben305 closed this as completed Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants