首页 > 解决方案 > Property 'values' does not exist on type 'ObjectConstructor' in Typescript Playground

问题描述

Please see link. Not sure why playground is giving me this error

https://www.typescriptlang.org/play/index.html?ssl=1&ssc=1&pln=27&pc=23#code/MYewdgzgLgBAtgTwGIEsCmAbAJhGBeGAbwCgYyYAzEEALiMuroHIqQmYBfAGlPICMAhgCc6hGIJEwmE9h2JzioSLAgghUNFlSYc+GAApeFdNgijeZANoBrNAjrQhKMAHMAuqJg2HUJ648wjs4u3LxyAJSerD5+LlziwjHBnPgAfES8StD0rPESKQQA8nwAVmjAUAB0AG4CGACuaBD6xjoQ4ZVCmvXAaIbkBi5CIPUADhDxrdjhaRkDZCgUBlNYlawzJPPkXVD1QmD0lUdDI+N5iV5HlSdjEJUSkyZYbpwW5HJbO3sHYlc3ZwwQFg6JY-sNbmtqFhHjoXh93jwBmJWMCvG5zpJLHDeOFiLwvvs5uRooDKqp1Ppwoj+BcJGS1FBKdS5ApyRotE9mohtKZwkA

标签: typescript

解决方案


The availability of ECMAScript features in the standard library is governed by a compiler option called "lib". As of now, you can't control "lib" in TypeScript Playground.

In local development, set "lib" to "es2017" or later just like Jared suggested.


推荐阅读