I have a TypeScript project with ES6 target, it uses core-js to polyfill ES2017 functions, and tsconfig.json is configured accordingly.
When Object.entries(...) and Object.values(...) , the results do not have array methods and properties ( map , forEach , length , etc.), they are displayed as simple objects for the IDE, so any[] must be explicitly set:

While Object.keys(...) behaves as it should.
At the same time, the IDE somehow "knows" about the corresponding types for Object.entries and Object.values , they are displayed in accordance with TypeScript lib.es2017.object.d.ts in Ctrl + Shift + P. But, it seems they ignore types to check because overriding the ObjectConstructor in the current file solves the problem:
interface ObjectConstructor { values(o: any): any[]; entries(o: any): [string, any][]; }
tsc seems to be great for typing, so it looks like an IDE specific issue.
This only happens if the Use TypeScript service in Languages & Frameworks > TypeScript not installed. Everything works fine when the TypeScript service is turned on (it is turned off intentionally because there were problems with the TS service before).
Here is tsconfig.json:
{ "compilerOptions": { "target": "es6", "module": "commonjs", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "alwaysStrict": true, "strictNullChecks": false, "baseUrl": "./src", "paths": [], "lib": [ "es2016", "es2017.object" ] }, "exclude": [ "node_modules" ] }
What does it mean? Did something happen to me?
The problem persists with TypeScript 2.1.5 and the latest IDE (EAP 2017.1).