b'\n_START_ARTICLE_\nTypeScript\n_START_SECTION_\nAnotace typ\xc5\xaf\n_START_PARAGRAPH_\nTypeScript nab\xc3\xadz\xc3\xad statick\xc3\xa9 typov\xc3\xa1n\xc3\xad prost\xc5\x99ednictv\xc3\xadm anotac\xc3\xad umo\xc5\xbe\xc5\x88uj\xc3\xadc\xc3\xad typovou kontrolu p\xc5\x99i kompilaci. Tyto anotace jsou nepovinn\xc3\xa9 a nen\xc3\xad t\xc5\x99eba je pou\xc5\xbe\xc3\xadt, pokud chceme vyu\xc5\xbe\xc3\xadvat dynamick\xc3\xa9ho typov\xc3\xa1n\xc3\xad._NEWLINE_function secti(a: number, b: number): number {_NEWLINE_return a + b;}_NEWLINE_Pro primitivn\xc3\xad datov\xc3\xa9 typy zav\xc3\xa1d\xc3\xad TypeScript anotace number, string a boolean. Pro dynamick\xc3\xbd typ lze pou\xc5\xbe\xc3\xadt anotaci any._NEWLINE_Anotace typ\xc5\xaf lze um\xc3\xadstit do samostatn\xc3\xa9ho souboru, co\xc5\xbe umo\xc5\xbe\xc5\x88uje mj. pou\xc5\xbe\xc3\xadvat uvnit\xc5\x99 TypeScript k\xc3\xb3du ji\xc5\xbe existuj\xc3\xadc\xc3\xad JavaScriptov\xc3\xa9 knihovny. T\xc4\x9bm sta\xc4\x8d\xc3\xad pouze nadefinovat tyto anotace a vyu\xc5\xbe\xc3\xadt tak statick\xc3\xa9ho typov\xc3\xa1n\xc3\xad.\n_START_SECTION_\nRozhran\xc3\xad\n_START_PARAGRAPH_\ninterface IOsoba{_NEWLINE_naRetezec(): string;}\n_START_SECTION_\nT\xc5\x99\xc3\xaddy\n_START_PARAGRAPH_\nTypeScript podporuje t\xc5\x99\xc3\xaddy dle standardu ECMAScript 6._NEWLINE_class Osoba implements IOsoba{_NEWLINE_private jmeno: string;_NEWLINE_private vek: number;_NEWLINE_private plat: number;_NEWLINE__NEWLINE_constructor(jmeno: string, vek: number, plat: number) {_NEWLINE_this.jmeno = jmeno;_NEWLINE_this.vek = vek;_NEWLINE_this.plat = plat;_NEWLINE_}_NEWLINE_    _NEWLINE_naRetezec(): string {_NEWLINE_return this.jmeno + " (" + this.vek + ")" + "(" + this.plat + ")";_NEWLINE_}}\n_START_SECTION_\nGenericita\n_START_PARAGRAPH_\nTypeScript podporuje Generick\xc3\xa9 programov\xc3\xa1n\xc3\xad.\n_START_SECTION_\nModuly\n_START_PARAGRAPH_\nTypeScript umo\xc5\xbe\xc5\x88uje pomoc\xc3\xad modul\xc5\xaf zapouzd\xc5\x99en\xc3\xad t\xc5\x99\xc3\xadd, rozhran\xc3\xad, funkc\xc3\xad a prom\xc4\x9bnn\xc3\xbdch do vlastn\xc3\xadho jmenn\xc3\xa9ho prostoru._NEWLINE_module Organismy{_NEWLINE__NEWLINE_class Osoba {_NEWLINE_// ..._NEWLINE_}}'