Answer the question
In order to leave comments, you need to log in
Property does not exist on type {}?
When initializing the function, there is an empty object user = {}
Then I get the user and assign it to a variable.
Further, when I try to access its fields, for example user.name, I get an error ts -
Property 'name' does not exist on type {}
How can I get rid of this other than setting all fields initially as name: ''?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question