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

289
Visualizações
Is it possible that TypeScript syntax conflict with EMCAScript?

Typescript used to say that "TypeScript is a typed superset of JavaScript."

But if ECMAScript add some new syntax, which is conflict with the existing syntax of TypeScript, the 'superset' relationship between TypeScript and JavaScript will broken.

Will this happen?


eg: TypesScript has Parameter Decorators syntax, if ECMASript add Parameter Decorators syntax too in future, but the decorator function has different arguments.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Will this happen?

No one can predict the future, but with regard to decorators, note this from the TypeScript decorators documentation:

NOTE: Decorators are an experimental feature that may change in future releases.

In fact, we know that TypeScript's current decorators will not be compatible with JavaScript's own if/when they're finalized: TypeScript's decorators are based on an earlier version of the proposal that failed to get consensus from TC39 and has since been extensively reworked (at least twice). But TypeScript already has the experimentalDecorators flag to handle that. Eventually, if you don't have that flag set but you use decorators syntax, you'll be using JavaScript's own decorators syntax. If you do have the flag set, you're using TypeScript's current form of decorators.

But that (or other examples of minor incompatibility¹) don't necessarily mean that the sense of the saying "TypeScript is a typed superset of JavaScript" is wrong, just that the real picture is more complicated and nuanced than that overarching concept and goal.


¹ I don't recall the specific example, but IIRC it involves supplying explicit type arguments when calling a function (or is it the old angle-bracket form of type assertion?) conflicting in some very limited edge cases with the less-than operator <.

about 4 years ago · Juan Pablo Isaza Relatório
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