This content originally appeared on DEV Community and was authored by hevertonam
É Uma linguagem open source criada pela microsoft em 2012.
É Um superset do javaScript, ou seja é um javaScript com funcionalidades a mais.
Possui tipagem estática o que impossibilita a alteração do tipo da variavel depois de sua criação.
No exemplo acima temos duas situações onde não permite a mudança do tipo da variavel.
se passar string onde esperar um number dara erro ((soma(“1”, “2”))
se passar apenas um parametro onde espera por 2 também da erro(soma(1));
A linguagem pode ser usada no lado do cliente e no lado do servidor (Node.js ou Deno).
This content originally appeared on DEV Community and was authored by hevertonam
hevertonam | Sciencx (2022-07-05T20:25:45+00:00) O que é Typescript?. Retrieved from https://www.scien.cx/2022/07/05/o-que-e-typescript/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.