Skip to content
Advertisement

Creating a new object in Typescript is giving an error that it requires an extra comma [closed]

I have the following classes:

JavaScript

I’m trying to create these types using the following syntax:

JavaScript

However, I get the following error:

‘,’ expected

Please could someone point me to what I’m doing wrong?

Advertisement

Answer

You’re not closing your map() function.

JavaScript
Advertisement