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

270
Vistas
what is difference of 'class' in typescript?

i have some questions about typescript.

Q1. what is the difference of this two cases?

In the first case, an object is created with properties initialized to undefined, and in the second case, an empty object is being created. I used the same code, but the results are different. I want to know the difference between these two cases

1.1) first case: i use playCode to run the code.

enter image description here

1.2) second case: i use typescript playground to run the code. enter image description here

Q2. An error is occurring when the code does not have required properties as follows: However, in my Angular project, there is no error even if it is the same code. I wonder why.

enter image description here

tsconfig of my angular project

    "skipLibCheck": true,
    "noImplicitAny": true,
    "noImplicitThis": false,
    "alwaysStrict": true,
    "strictNullChecks": false,
    "noImplicitReturns": true,
    "suppressExcessPropertyErrors": false,
    "suppressImplicitAnyIndexErrors": true,
    "noStrictGenericChecks": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "strictFunctionTypes": true,
    "allowUnreachableCode": true,
    "allowUnusedLabels": true
about 4 years ago · Juan Pablo Isaza
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