TypeScript

Si Wikipedia, tasanayt tilellit.
Jump to navigation Jump to search
TypeScript
TypeScript Logo (Blue).svg
Original author(s) Anders Hejlsberg
Developer(s) Microsoft
Initial release Tuber 1, 2012
Repository Edit this at Wikidata
Written in JavaScript
Type Timeslayin n usihel akked free software Suqel
License Apache Software License, Version 2.0 Suqel
Website www.typescriptlang.org

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[ẓreg | ẓreg aɣbalu]

Ttipaj[ẓreg | ẓreg aɣbalu]

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

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

addition(3, 2) ad yefk 5, addition(3, 'toto') ad yefk '3toto'.

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;
    }

Win yesseqdacen addition s Typscript ur yezmir ara ad yessawel addition(3, 'toto').