Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

143
Vistas
PhpStorm warns about Object methods in Vue component when using TypeScript

When creating Vue components using TypeScript (via the lang="ts" attribute of the script tag), PhpStorm (version 2021.2.2) shows a warning about any methods of the native JavaScript Object as "Unresolved function or method", e.g.:

<template>
  ...
</template>

<script lang="ts">
const v = Object.values({ a: 'a', b: 'b' });
</script>

Results in:

Screenshot of PhpStorm highlighting Object.values as undefined

How can PhpStorm (or WebStorm) be configured to recognise Object as the native JS ES6+ Object?

(For reference, Cmd + clicking on Object jumps to lib.es5.d.ts so it's assuming the wrong version of JavaScript. However, under Languages & Frameworks > JavasScript, the version is already set to ECMAScript 6+)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Object.values() is part of ES2017. Make sure to either set "target" to "esnext" or add "esnext" to "lib": [] in tsconfig.json

enter image description here

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda