{"id":3941,"date":"2020-09-24T08:52:00","date_gmt":"2020-09-24T08:52:00","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/why-you-should-probably-use-typescript\/"},"modified":"2026-04-27T09:49:47","modified_gmt":"2026-04-27T09:49:47","slug":"proc-byste-pravdepodobne-meli-pouzivat-typescript","status":"publish","type":"post","link":"https:\/\/thecodest.co\/cs\/blog\/why-you-should-probably-use-typescript\/","title":{"rendered":"Pro\u010d byste (pravd\u011bpodobn\u011b) m\u011bli pou\u017e\u00edvat Typescript"},"content":{"rendered":"<p>Sou\u010dasn\u00e1 pozice <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/typescript-developer\/\">Typescript<\/a> nep\u0159i\u0161la z ni\u010deho nic, proto\u017ee tato technologie dok\u00e1\u017ee skute\u010dn\u011b zlep\u0161it na\u0161e zku\u0161enosti v\u00fdvoj\u00e1\u0159\u016f. Explicitn\u011bj\u0161\u00ed k\u00f3dov\u00e1n\u00ed zvy\u0161uje kontrolu a p\u0159edv\u00eddatelnost <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/what-is-code-refactoring\/\">k\u00f3d<\/a>.<br>V tomto \u010dl\u00e1nku se v\u00e1s pokus\u00edm p\u0159esv\u011bd\u010dit, abyste pou\u017e\u00edvali Typescript.<\/p>\n\n\n\n<p>*- <a href=\"https:\/\/thecodest.co\/cs\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">Data<\/a> zdroj: <a href=\"https:\/\/2020.stateofjs.com\/en-US\/technologies\/javascript-flavors\/\">Stav JS 2020<\/a> a <a href=\"https:\/\/insights.stackoverflow.com\/survey\/2020#most-loved-dreaded-and-wanted\">Pr\u016fzkum mezi v\u00fdvoj\u00e1\u0159i na serveru Stack Overflow 2020<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Zjist\u011bte si chyby d\u0159\u00edve<\/h2>\n\n\n\n<p>Obvykle se p\u0159i v\u00fdvoji aplikace v <a href=\"https:\/\/thecodest.co\/cs\/blog\/hire-javascript-developer\/\">JavaScript<\/a>, v\u00e1\u0161 tok m\u016f\u017ee<br>vypadat takto:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Prove\u010fte zm\u011bnu,<\/li>\n\n\n\n<li>P\u0159ejd\u011bte do aplikace a pod\u00edvejte se na zm\u011bn\u011bnou \u010d\u00e1st \/ Spustit (souvisej\u00edc\u00ed) testy.<\/li>\n\n\n\n<li>Zjist\u011bte, zda je v\u0161e v po\u0159\u00e1dku.<\/li>\n<\/ol>\n\n\n\n<p>Pomoc\u00ed Typescriptu m\u016f\u017eete zm\u011bnu skute\u010dn\u011b prov\u00e9st a pokud se objev\u00ed n\u011bjak\u00fd probl\u00e9m. <strong>chyba typu<\/strong> v k\u00f3du, okam\u017eit\u011b se to dozv\u00edte d\u00edky chybov\u00e9mu hl\u00e1\u0161en\u00ed p\u0159eklada\u010de nebo zp\u011btn\u00e9 vazb\u011b IDE v re\u00e1ln\u00e9m \u010dase.<br>Kompil\u00e1tor Typescriptu samoz\u0159ejm\u011b nevy\u0159e\u0161\u00ed v\u0161echny probl\u00e9my a neupozorn\u00ed v\u00e1s na v\u0161echny chyby, ale jeho pomoc m\u016f\u017ee b\u00fdt neoceniteln\u00e1.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lep\u0161\u00ed dokon\u010dov\u00e1n\u00ed syntaxe v IDE<\/h2>\n\n\n\n<p>Je to opravdu jednoduch\u00e9. Pokud pou\u017e\u00edv\u00e1te dobr\u00e9 IDE, jako je WebStorm nebo VSCode, z\u00edsk\u00e1te.<br>lep\u0161\u00ed dopl\u0148ov\u00e1n\u00ed syntaxe pomoc\u00ed Typescriptu. Mo\u017en\u00e1 to nezn\u00ed jako obrovsk\u00e9 zlep\u0161en\u00ed zku\u0161enost\u00ed v\u00fdvoj\u00e1\u0159\u016f, ale nakonec m\u00e1 ka\u017ed\u00e9 zlep\u0161en\u00ed v\u00fdznam, proto\u017ee m\u016f\u017ee u\u0161et\u0159it. <a href=\"https:\/\/thecodest.co\/cs\/blog\/why-us-companies-are-opting-for-polish-developers\/\">n\u00e1s<\/a> n\u011bjak\u00fd \u010das a op\u011bt zabr\u00e1nit p\u0159eklepu nebo chyb\u011b. Nav\u00edc m\u016f\u017eeme jednou definovat n\u00e1\u0161 typ nebo rozhran\u00ed; proto\u017ee si nemus\u00edme st\u00e1le pamatovat strukturu, m\u016f\u017eeme se soust\u0159edit na psan\u00ed obchodn\u00ed logiky.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/code.png\" alt=\"k\u00f3d\" title=\"K\u00f3d JS\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/js-code.png\" alt=\"K\u00f3d JS\" title=\"k\u00f3d\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">M\u00e9n\u011b bolestiv\u00fd refaktoring<\/h2>\n\n\n\n<p>P\u0159edstavte si, \u017ee mus\u00edte z jak\u00e9hokoli d\u016fvodu prov\u00e9st refaktorizaci, nap\u0159\u00edklad jste se p\u0159ipojili k n\u011bjak\u00e9mu <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/why-do-projects-fail\/\">projekt<\/a> a dostanete \u00fakol p\u0159idat novou funkci, kter\u00e1 je v\u0161ak n\u011bjak\u00fdm zp\u016fsobem spojena se star\u0161\u00edm k\u00f3dem.<br>Typescript v\u00e1m to m\u016f\u017ee usnadnit a uleh\u010dit, proto\u017ee kdy\u017e provedete zm\u011bnu a na jin\u00e9m m\u00edst\u011b je t\u0159eba prov\u00e9st dal\u0161\u00ed zm\u011bnu, p\u0159eklada\u010d v\u00e1s na to upozorn\u00ed.<\/p>\n\n\n\n<p>Nap\u0159\u00edklad - m\u016f\u017ee to b\u00fdt zm\u011bn\u011bn\u00e1 signatura funkce nebo po zm\u011bn\u011b t\u0159eba<br>vr\u00e1t\u00ed n\u011bco \u00fapln\u011b jin\u00e9ho, tak\u017ee se bude li\u0161it i vr\u00e1cen\u00fd typ.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">V\u011bt\u0161\u00ed jistota ohledn\u011b k\u00f3dov\u00e9 z\u00e1kladny<\/h2>\n\n\n\n<p>JavaScript je slab\u011b a dynamicky typovan\u00fd, tak\u017ee p\u0159i inicializaci prom\u011bnn\u00e9 hodnotou <code>let query = ''<\/code> pozd\u011bji v k\u00f3du m\u016f\u017ee v\u00fdvoj\u00e1\u0159 omylem ud\u011blat n\u011bco iracion\u00e1ln\u00edho, nap\u0159. <code>query = true<\/code>a bude platit <a href=\"https:\/\/thecodest.co\/cs\/blog\/hire-vue-js-developers\/\">JS<\/a> k\u00f3d.<\/p>\n\n\n\n<p>V dob\u0159e napsan\u00e9m k\u00f3du by nem\u011blo doj\u00edt k p\u0159i\u0159azen\u00ed logick\u00e9 hodnoty prom\u011bnn\u00e9, kter\u00e1 byla d\u0159\u00edve \u0159et\u011bzcem. Obvykle tedy takov\u00e9 p\u0159i\u0159azen\u00ed se zm\u011bnou typu vznik\u00e1 chybou.<\/p>\n\n\n\n<p>P\u0159i pou\u017eit\u00ed Typescriptu nem\u016f\u017eeme zm\u011bnit typ prom\u011bnn\u00e9, tak\u017ee pokud vytvo\u0159\u00edme prom\u011bnnou <code>let query = ''<\/code> prom\u011bnn\u00e1, bude to <code>\u0159et\u011bzec<\/code> a nebudeme moci omylem zm\u011bnit jeho typ.<\/p>\n\n\n\n<p>Pokud chceme, aby prom\u011bnn\u00e1 byla v\u00edce ne\u017e jednoho typu, v\u017edy to ud\u011bl\u00e1me explicitn\u011b pomoc\u00ed typu union, nap\u0159. <code>\u0159et\u011bzec | \u010d\u00edslo<\/code>.<\/p>\n\n\n\n<p>D\u00edky Typescriptu je tedy n\u00e1\u0161 k\u00f3d p\u0159edv\u00eddateln\u011bj\u0161\u00ed a jednozna\u010dn\u011bj\u0161\u00ed.<br>Typescript se tak\u00e9 postar\u00e1 o explicitnost anal\u00fdzy toku \u0159\u00edzen\u00ed, a pokud existuje mo\u017enost, \u017ee by se n\u011bco mohlo pokazit, upozorn\u00ed v\u00e1s.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/code-sample.png\" alt=\"uk\u00e1zka k\u00f3du\" title=\"uk\u00e1zka k\u00f3du\"\/><\/figure>\n\n\n\n<p>Zde v p\u0159\u00edkladu na prvn\u00edm m\u00edst\u011b <code>pokud<\/code> blok dostaneme chybu:<\/p>\n\n\n\n<p><code>TS2339: Vlastnost 'battery' neexistuje u typu 'ClothingProduct'<\/code> 2kr\u00e1t, pro <code>baterie<\/code>a <code>beran<\/code> vlastnosti.<\/p>\n\n\n\n<p>Ve druh\u00e9m bloku - <code>jinak<\/code>, dostaneme tuto chybu pro <code>velikost<\/code> nemovitosti. Je to samoz\u0159ejm\u011b jen p\u0159\u00edklad, kter\u00fd v\u00e1m uk\u00e1\u017ee, jak se d\u00e1 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/2\/narrowing.html#discriminated-unions\">diskriminovan\u00e9 odbory<\/a> a <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/2\/narrowing.html#control-flow-analysis\">anal\u00fdza toku \u0159\u00edzen\u00ed<\/a> pracovat v Typescriptu, tak\u017ee s t\u00edmto k\u00f3dem ned\u011bl\u00e1me nic p\u0159\u00edli\u0161 slo\u017eit\u00e9ho.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Snadn\u00fd a postupn\u00fd p\u0159echod z JavaScript<\/h2>\n\n\n\n<p>Platn\u00fd k\u00f3d JavaScript je z\u00e1rove\u0148 platn\u00fdm k\u00f3dem Typescriptu, tak\u017ee m\u016f\u017eete svou k\u00f3dovou z\u00e1kladnu migrovat krok za krokem. Obvykle je pou\u017eit\u00ed striktn\u00edho re\u017eimu v Typescriptu dobrou prax\u00ed, ale v tomto p\u0159\u00edpad\u011b,<br>mus\u00edme za\u010d\u00edt s <code>\"strict\": false<\/code> na adrese <code>tsconfig.json<\/code> a m\u011bli bychom tak\u00e9 nastavit dal\u0161\u00ed 2 mo\u017enosti.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\"allowJs\": true, \/\/ umo\u017en\u00ed n\u00e1m pou\u017e\u00edvat soubory .js a typ v nich nebude kontrolov\u00e1n\n\"skipLibCheck\": true \/\/ p\u0159esko\u010d\u00ed kontrolu typ\u016f v knihovn\u00e1ch, kter\u00e9 pou\u017e\u00edv\u00e1me<\/code><\/pre>\n\n\n\n<p>D\u00edky t\u011bmto mo\u017enostem m\u016f\u017eeme postupn\u011b p\u0159ej\u00edt z JS na TS - soubor po souboru, p\u0159i\u010dem\u017e sta\u010d\u00ed zm\u011bnit p\u0159\u00edponu z <code>.js(x)<\/code> na <code>.ts(x)<\/code> a p\u0159id\u00e1v\u00e1n\u00ed typ\u016f do soubor\u016f. T\u00edmto p\u0159\u00edstupem se m\u016f\u017eeme vyhnout stovk\u00e1m nebo tis\u00edc\u016fm d\u011bsiv\u00fdch chyb p\u0159i kompilaci.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Souhrn<\/h2>\n\n\n\n<p>Mysl\u00edm, \u017ee bychom m\u011bli pou\u017e\u00edvat <b>Typescript<\/b> co nej\u010dast\u011bji <strong>mo\u017en\u00e9<\/strong>, proto\u017ee je to z dlouhodob\u00e9ho hlediska skute\u010dn\u011b prosp\u011b\u0161n\u00e9. Pom\u00e1h\u00e1 udr\u017eovat projekty, zvy\u0161uje zku\u0161enosti v\u00fdvoj\u00e1\u0159\u016f a \u010din\u00ed na\u0161i k\u00f3dovou z\u00e1kladnu p\u0159ehledn\u011bj\u0161\u00ed a spolehliv\u011bj\u0161\u00ed.<\/p>\n\n\n\n<p>Jako v\u017edy v\u0161ak existuj\u00ed v\u00fdjimky - nap\u0159\u00edklad pro jednoduchou vstupn\u00ed str\u00e1nku.<br>kde se JavaScript pou\u017e\u00edv\u00e1 pouze pro p\u0159ep\u00edn\u00e1n\u00ed t\u0159\u00edd nebo jin\u00fd jednoduch\u00fd p\u0159\u00edpad, nem\u00e1 Typescript smysl.<br>Mus\u00edme si tak\u00e9 uv\u011bdomit, \u017ee abychom mohli Typescript pln\u011b vyu\u017e\u00edt, mus\u00edme se jej nau\u010dit pou\u017e\u00edvat na dostate\u010dn\u00e9 \u00farovni, co\u017e m\u016f\u017ee n\u011bjakou dobu trvat. P\u0159esto si mysl\u00edm, \u017ee je to velmi v\u00fdhodn\u00e1 investice va\u0161eho \u010dasu.<\/p>\n\n\n\n<p><strong>P\u0159e\u010dt\u011bte si v\u00edce:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/\">Ruby 3.0. Ruby a m\u00e9n\u011b zn\u00e1m\u00e9 metody kontroly soukrom\u00ed<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/highest-quality-code-in-your-saas-project\/\">Nejvy\u0161\u0161\u00ed kvalita k\u00f3du v projektu SaaS. Pro\u010d byste se o to jako (netechnick\u00fd) zakladatel m\u011bli zaj\u00edmat?<\/a><\/p>\n\n\n\n<p><em>*Tituln\u00ed grafika poch\u00e1z\u00ed z webov\u00fdch str\u00e1nek Know Your Meme.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Ka\u017ed\u00fd, kdo pou\u017e\u00edv\u00e1 ekosyst\u00e9m JavaScript, dnes zn\u00e1 Typescript. Typescript je jednou z nejobl\u00edben\u011bj\u0161\u00edch technologi\u00ed* a jeho vyu\u017eit\u00ed neust\u00e1le roste (pod\u00edl vyu\u017eit\u00ed vzrostl z 52% v roce 2018 na 78% v roce 2020)*.<\/p>","protected":false},"author":2,"featured_media":3942,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Why you should (probably) use Typescript - The Codest<\/title>\n<meta name=\"description\" content=\"Everyone who use JavaScript ecosystem is nowadays aware of Typescript. Typescript is one of the most beloved technologies* and its usage is constantly increasing (usage share increased from 52% in 2018 to 78% in 2020)*.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/cs\/blog\/proc-byste-pravdepodobne-meli-pouzivat-typescript\/\" \/>\n<meta property=\"og:locale\" content=\"cs_CZ\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why you should (probably) use Typescript\" \/>\n<meta property=\"og:description\" content=\"Everyone who use JavaScript ecosystem is nowadays aware of Typescript. Typescript is one of the most beloved technologies* and its usage is constantly increasing (usage share increased from 52% in 2018 to 78% in 2020)*.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/cs\/blog\/proc-byste-pravdepodobne-meli-pouzivat-typescript\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-24T08:52:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-27T09:49:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/typescript.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Why you should (probably) use Typescript\",\"datePublished\":\"2020-09-24T08:52:00+00:00\",\"dateModified\":\"2026-04-27T09:49:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\"},\"wordCount\":787,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/typescript.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\",\"name\":\"Why you should (probably) use Typescript - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/typescript.png\",\"datePublished\":\"2020-09-24T08:52:00+00:00\",\"dateModified\":\"2026-04-27T09:49:47+00:00\",\"description\":\"Everyone who use JavaScript ecosystem is nowadays aware of Typescript. Typescript is one of the most beloved technologies* and its usage is constantly increasing (usage share increased from 52% in 2018 to 78% in 2020)*.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#breadcrumb\"},\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/typescript.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/typescript.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Why you should (probably) use Typescript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"cs\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/cs\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pro\u010d byste (pravd\u011bpodobn\u011b) m\u011bli pou\u017e\u00edvat Typescript - The Codest","description":"Ka\u017ed\u00fd, kdo pou\u017e\u00edv\u00e1 ekosyst\u00e9m JavaScript, dnes zn\u00e1 Typescript. Typescript je jednou z nejobl\u00edben\u011bj\u0161\u00edch technologi\u00ed* a jeho vyu\u017eit\u00ed neust\u00e1le roste (pod\u00edl vyu\u017eit\u00ed vzrostl z 52% v roce 2018 na 78% v roce 2020)*.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/cs\/blog\/proc-byste-pravdepodobne-meli-pouzivat-typescript\/","og_locale":"cs_CZ","og_type":"article","og_title":"Why you should (probably) use Typescript","og_description":"Everyone who use JavaScript ecosystem is nowadays aware of Typescript. Typescript is one of the most beloved technologies* and its usage is constantly increasing (usage share increased from 52% in 2018 to 78% in 2020)*.","og_url":"https:\/\/thecodest.co\/cs\/blog\/proc-byste-pravdepodobne-meli-pouzivat-typescript\/","og_site_name":"The Codest","article_published_time":"2020-09-24T08:52:00+00:00","article_modified_time":"2026-04-27T09:49:47+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/typescript.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"5 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Why you should (probably) use Typescript","datePublished":"2020-09-24T08:52:00+00:00","dateModified":"2026-04-27T09:49:47+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/"},"wordCount":787,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/typescript.png","articleSection":["Software Development"],"inLanguage":"cs","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/","url":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/","name":"Pro\u010d byste (pravd\u011bpodobn\u011b) m\u011bli pou\u017e\u00edvat Typescript - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/typescript.png","datePublished":"2020-09-24T08:52:00+00:00","dateModified":"2026-04-27T09:49:47+00:00","description":"Ka\u017ed\u00fd, kdo pou\u017e\u00edv\u00e1 ekosyst\u00e9m JavaScript, dnes zn\u00e1 Typescript. Typescript je jednou z nejobl\u00edben\u011bj\u0161\u00edch technologi\u00ed* a jeho vyu\u017eit\u00ed neust\u00e1le roste (pod\u00edl vyu\u017eit\u00ed vzrostl z 52% v roce 2018 na 78% v roce 2020)*.","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#breadcrumb"},"inLanguage":"cs","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/"]}]},{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/typescript.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/typescript.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Why you should (probably) use Typescript"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"cs"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/cs\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/comments?post=3941"}],"version-history":[{"count":7,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3941\/revisions"}],"predecessor-version":[{"id":8171,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3941\/revisions\/8171"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media\/3942"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media?parent=3941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/categories?post=3941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/tags?post=3941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}