3

Getting syntax error for below line of code. SyntaxError: Missing initializer in const declaration

const testMap : Map<string, any> = new Map();
0

1 Answer 1

5

It sounds like your code is being interpreted as JavaScript, not TypeScript. Change your file extension to .ts instead of .js, and make sure your Node environment is set up to interpret it properly (such as with ts-node)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.