DEV Community

Discussion on: PokeAPI REST in NodeJS with Express, Typescript, MongoDB and Docker — Part 3

Collapse
 
aslasn profile image
Ande

You didn't encounter typescript's annoying type errors when using mongoose models? I'm just having the problem. I created a model and called for let modelRecord = MyModel.create({ data }). Then when i tried to access some data from there like this modelRecord.data.somedata there typerrors like Property not defined in type Document stuff like that

Collapse
 
mirkorainer profile image
Mirko Rainer

Can we see a more clear example of the code giving you issue?