5

In this stackblitz project we can use Object.values().

I'm trying to use it in this Angular project and it throws:

Property 'values' does not exist on type 'ObjectConstructor'.

I know that in general typescript projects via have to say that it's for a ES2017 environment specifically in TSConfig. Is there some setting in Stackblitz that can be flipped for this?

IIUC Angular should get Object.values from CoreJS.

2
  • I think you can manually add in your tsconfig.json at the .angular-cli.json level. Commented Sep 17, 2018 at 16:49
  • It's "lib": ["es2017"] in tsconfig.json, but I don't see it in .angular-cli.json` ... Commented Sep 17, 2018 at 16:54

1 Answer 1

3

I figured out that to fix that problem you can simply install typescript in stackblitz project dependencies. Just simply write:

npm i typescript

I had exacly the same error and now I have got fully working intellisense. Hope it helps!

Check out on this project:

https://stackblitz.com/edit/angular-validation-errors

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.