Avatar ·

Ignoring TypeScript errors: "Property does not exist on type"

Hi everyone! I'm new to TypeScript and using Visual Studio 2013 for development. I have a `user` object that I get from an API. In the browser console, I can see that the object has a `name` property, but TypeScript throws an error: "Property 'name' does not exist on type '{}'". \n\nHere's my code:\n\n```typescript\nlet user = {};\nuser.name = "John"; // Error: Property 'name' does not exist on type '{}'\nconsole.log(user.name);\n```\n\nI understand that TypeScript is strictly typed, but I need to just ignore this error so the code works. I tried using `// @ts-ignore`, but it doesn't help. How can I make TypeScript not complain about such properties? Is there some flag in the compiler settings? Or do I need to use `any`? Please advise on how to properly solve this.