Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

278
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda