Aller au contenu

TypeScript

Si Wikipedia, tasanayt tilellit.
Aceggir-agi yettwag di 1 Yennayer 2018 à 19:57 sɣuṛ Sami At Ferḥat (mmeslay | attekki)

TypeScript d tameslayt n usihel sufella n JavaScript i tt-yesnulfan Anders Hejlsberg (Microsoft). Beɛd la compilation TypeScript yettuɣal Javascript g lBrowser.

TypeScript vs Javascript

Ttipaj

G JavaScript ulac Ttipaj, seddaw egzampl anda la fonction addition teqbel kulci (number, string...etc.) :

    function addition(x, y) {
        return x + y;
    }

S TypeScrit, nezmer ad nerna les Types akken ur nezmir ad nɛeddi ala number :

    function addition(x : number, y : number) : number {
        return x + y;
    }