{"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":"kapec-jums-iespejams-vajadzetu-izmantot-typescript","status":"publish","type":"post","link":"https:\/\/thecodest.co\/lv\/blog\/why-you-should-probably-use-typescript\/","title":{"rendered":"K\u0101p\u0113c jums (iesp\u0113jams) vajadz\u0113tu izmantot Typescript"},"content":{"rendered":"<p>Pa\u0161reiz\u0113jais st\u0101voklis <a href=\"https:\/\/thecodest.co\/lv\/dictionary\/typescript-developer\/\">Ma\u0161\u012bnraksts<\/a> nerad\u0101s no nekurienes, jo \u0161\u012b tehnolo\u0123ija sp\u0113j patie\u0161\u0101m uzlabot m\u016bsu izstr\u0101d\u0101t\u0101ju pieredzi. Skaidr\u0101ka kod\u0113\u0161ana palielina kontroli un paredzam\u012bbu. <a href=\"https:\/\/thecodest.co\/lv\/dictionary\/what-is-code-refactoring\/\">kods<\/a>.<br>\u0160aj\u0101 rakst\u0101 es cent\u012b\u0161os j\u016bs p\u0101rliecin\u0101t izmantot Typescript.<\/p>\n\n\n\n<p>*- <a href=\"https:\/\/thecodest.co\/lv\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">Dati<\/a> avots: <a href=\"https:\/\/2020.stateofjs.com\/en-US\/technologies\/javascript-flavors\/\">JS st\u0101voklis 2020<\/a> un <a href=\"https:\/\/insights.stackoverflow.com\/survey\/2020#most-loved-dreaded-and-wanted\">Stack Overflow izstr\u0101d\u0101t\u0101ju aptauja 2020<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Uzziniet par k\u013c\u016bd\u0101m agr\u0101k<\/h2>\n\n\n\n<p>Parasti, izstr\u0101d\u0101jot lietojumprogrammu programm\u0101 <a href=\"https:\/\/thecodest.co\/lv\/blog\/hire-javascript-developer\/\">JavaScript<\/a>, j\u016bsu pl\u016bsma var\u0113tu<br>izskat\u0101s \u0161\u0101di:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Veikt izmai\u0146as,<\/li>\n\n\n\n<li>Dodieties uz lietotni un p\u0101rbaudiet main\u012bto da\u013cu \/ Izpild\u012bt (saist\u012btos) testus.<\/li>\n\n\n\n<li>Noskaidrojiet, vai viss ir k\u0101rt\u012bb\u0101.<\/li>\n<\/ol>\n\n\n\n<p>Izmantojot Typescript, varat veikt izmai\u0146as, un, ja ir k\u0101ds <strong>tipa k\u013c\u016bda<\/strong> kod\u0101, j\u016bs uzreiz uzzin\u0101siet, pateicoties kompilatora k\u013c\u016bdas zi\u0146ojumam vai IDE re\u0101llaika atgriezeniskajai saitei.<br>Protams, Typescript kompilators neatrisin\u0101s visas probl\u0113mas un nebr\u012bdin\u0101s par vis\u0101m k\u013c\u016bd\u0101m, ta\u010du t\u0101 pal\u012bdz\u012bba var b\u016bt nenov\u0113rt\u0113jama.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lab\u0101ka sintakses pabeig\u0161ana IDE<\/h2>\n\n\n\n<p>Tas ir \u013coti vienk\u0101r\u0161i. Ja izmantojat labas IDE, piem\u0113ram, WebStorm vai VSCode, j\u016bs sa\u0146emsiet<br>lab\u0101ka sintakses papildin\u0101\u0161ana ar Typescript. Varb\u016bt tas neizklaus\u0101s k\u0101 milz\u012bgs uzlabojums izstr\u0101d\u0101t\u0101ju pieredz\u0113, bet galu gal\u0101 katrs uzlabojums ir svar\u012bgs, jo tas var ietaup\u012bt. <a href=\"https:\/\/thecodest.co\/lv\/blog\/why-us-companies-are-opting-for-polish-developers\/\">mums<\/a> k\u0101du laiku un atkal nov\u0113rst p\u0101rrakst\u012b\u0161an\u0101s vai k\u013c\u016bdas. Turkl\u0101t m\u0113s varam vienreiz defin\u0113t savu tipu vai saskarni; t\u0101 k\u0101 mums nav vienm\u0113r j\u0101atceras strukt\u016bra, m\u0113s varam koncentr\u0113ties uz biznesa lo\u0123ikas rakst\u012b\u0161anu.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/code.png\" alt=\"kods\" title=\"JS kods\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/js-code.png\" alt=\"JS kods\" title=\"kods\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Maz\u0101k s\u0101p\u012bga refaktoriz\u0101cija<\/h2>\n\n\n\n<p>Iedom\u0101jieties, ka k\u0101da iemesla d\u0113\u013c jums ir nepiecie\u0161ams refaktors, piem\u0113ram, esat pievienojies k\u0101dam <a href=\"https:\/\/thecodest.co\/lv\/dictionary\/why-do-projects-fail\/\">projekts<\/a> un sa\u0146emat uzdevumu pievienot jaunu funkciju, bet \u0161\u012b funkcija ir kaut k\u0101d\u0101 veid\u0101 saist\u012bta ar mantoto kodu.<br>Typescript to var atvieglot un padar\u012bt maz\u0101k s\u0101p\u012bgu, jo, veicot izmai\u0146as un atrodoties v\u0113l k\u0101dai citai vietai, kur j\u0101veic izmai\u0146as, kompilators j\u016bs par to br\u012bdin\u0101s.<\/p>\n\n\n\n<p>Piem\u0113ram, tas var\u0113tu b\u016bt izmain\u012bts funkcijas paraksts vai, iesp\u0113jams, p\u0113c izmai\u0146u veik\u0161anas.<br>funkcija atgriez\u012bs kaut ko piln\u012bgi at\u0161\u0137ir\u012bgu, t\u0101p\u0113c ar\u012b atgrieztais tips b\u016bs at\u0161\u0137ir\u012bgs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Esi p\u0101rliecin\u0101t\u0101ks par kodu b\u0101zi<\/h2>\n\n\n\n<p>JavaScript ir v\u0101ji un dinamiski tipiz\u0113ts, t\u0101p\u0113c, inicializ\u0113jot main\u012bgo ar v\u0113rt\u012bbu <code>let query = ''<\/code> v\u0113l\u0101k kod\u0101 izstr\u0101d\u0101t\u0101js var k\u013c\u016bdas p\u0113c izdar\u012bt kaut ko neracion\u0101lu, piem\u0113ram. <code>vaic\u0101jums = true<\/code>, un tas b\u016bs der\u012bgs <a href=\"https:\/\/thecodest.co\/lv\/blog\/hire-vue-js-developers\/\">JS<\/a> kods.<\/p>\n\n\n\n<p>Labi uzrakst\u012bt\u0101 kod\u0101 bula v\u0113rt\u012bbas pie\u0161\u0137ir\u0161ana main\u012bgajam, kas iepriek\u0161 bija virkne, nedr\u012bkst notikt. T\u0101p\u0113c parasti \u0161\u0101ds pie\u0161\u0137ir\u0161ana ar tipa mai\u0146u notiek k\u013c\u016bdas d\u0113\u013c.<\/p>\n\n\n\n<p>Lietojot Typescript, m\u0113s nevaram main\u012bt main\u012bg\u0101 tipu, t\u0101p\u0113c, ja m\u0113s main\u012bgo <code>let query = ''<\/code> main\u012bgais, tas b\u016bs <code>virkne<\/code> tips, un m\u0113s nevar\u0113sim main\u012bt t\u0101 tipu k\u013c\u016bdas p\u0113c.<\/p>\n\n\n\n<p>Ja v\u0113lamies, lai main\u012bgajam b\u016btu vair\u0101k nek\u0101 viens tips, m\u0113s vienm\u0113r to dar\u0101m, izmantojot union type, piem\u0113ram. <code>virkne | numurs<\/code>.<\/p>\n\n\n\n<p>T\u0101p\u0113c Typescript padara m\u016bsu kodu paredzam\u0101ku un skaidr\u0101ku.<br>Turkl\u0101t Typescript r\u016bp\u0113sies par nep\u0101rprotamu kontroles pl\u016bsmas anal\u012bzi, un, ja past\u0101v iesp\u0113ja, ka kaut kas var\u0113tu notikt nepareizi, tas j\u016bs par to br\u012bdin\u0101s.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/code-sample.png\" alt=\"koda paraugs\" title=\"koda paraugs\"\/><\/figure>\n\n\n\n<p>\u0160eit, piem\u0113ram, pirmaj\u0101 piem\u0113r\u0101 <code>ja<\/code> blok\u0101 m\u0113s sa\u0146emsim k\u013c\u016bdu:<\/p>\n\n\n\n<p><code>TS2339: \u012apa\u0161\u012bba 'battery' nepast\u0101v tipam 'ClothingProduct'<\/code> 2 reizes, lai <code>akumulators<\/code>, un <code>ram<\/code> \u012bpa\u0161\u012bbas.<\/p>\n\n\n\n<p>Otraj\u0101 blok\u0101 - <code>cit\u0101di<\/code>, m\u0113s sa\u0146emsim \u0161o k\u013c\u016bdu par <code>izm\u0113rs<\/code> \u012bpa\u0161ums. Protams, tas ir tikai piem\u0113rs, lai par\u0101d\u012btu. <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/2\/narrowing.html#discriminated-unions\">diskrimin\u0113tas arodbiedr\u012bbas<\/a> un <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/2\/narrowing.html#control-flow-analysis\">vad\u012bbas pl\u016bsmas anal\u012bze<\/a> darbojas Typescript, t\u0101p\u0113c m\u0113s nedar\u0101m neko p\u0101r\u0101k sare\u017e\u0123\u012btu ar \u0161o kodu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Viegla, pak\u0101peniska migr\u0101cija no JavaScript<\/h2>\n\n\n\n<p>Der\u012bgs JavaScript kods vienlaikus ir ar\u012b der\u012bgs Typescript kods, t\u0101p\u0113c varat soli pa solim migr\u0113t savu kodu b\u0101zi. Parasti stingr\u0101 re\u017e\u012bma izmanto\u0161ana Typescript ir laba prakse, bet \u0161aj\u0101 gad\u012bjum\u0101,<br>mums j\u0101s\u0101k ar <code>\"strict\": false<\/code> vietn\u0113 <code>tsconfig.json<\/code> un mums vajadz\u0113tu iestat\u012bt v\u0113l 2 opcijas.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\"allowJs\": true, \/\/ tas \u013caus mums izmantot .js failus un tips netiks p\u0101rbaud\u012bts tajos\n\"skipLibCheck\": true \/\/ tas izlaid\u012bs tipu p\u0101rbaudi bibliot\u0113k\u0101s, kuras m\u0113s izmantojam.<\/code><\/pre>\n\n\n\n<p>Izmantojot \u0161\u012bs opcijas, m\u0113s varam pak\u0101peniski migr\u0113t no JS uz TS - failu p\u0113c faila, vienk\u0101r\u0161i mainot papla\u0161in\u0101jumu no <code>.js(x)<\/code> uz <code>.ts(x)<\/code> un failu tipu pievieno\u0161ana. Izmantojot \u0161o pieeju, m\u0113s varam izvair\u012bties no simtiem vai t\u016bksto\u0161iem bied\u0113jo\u0161u kompil\u0113\u0161anas k\u013c\u016bdu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Kopsavilkums<\/h2>\n\n\n\n<p>Es dom\u0101ju, ka mums vajadz\u0113tu izmantot <b>Ma\u0161\u012bnraksts<\/b> tik bie\u017ei, cik bie\u017ei <strong>iesp\u0113jams<\/strong>, jo ilgtermi\u0146\u0101 tas ir patie\u0161\u0101m izdev\u012bgi. Tas pal\u012bdz uztur\u0113t projektus, palielina izstr\u0101d\u0101t\u0101ju pieredzi un padara m\u016bsu kodu b\u0101zi skaidr\u0101ku un uzticam\u0101ku.<\/p>\n\n\n\n<p>Tom\u0113r, k\u0101 vienm\u0113r, ir iz\u0146\u0113mumi, piem\u0113ram, vienk\u0101r\u0161as m\u0113r\u0137lapas gad\u012bjum\u0101.<br>ja JavaScript tiek izmantots tikai klases p\u0101rsl\u0113g\u0161anai vai cit\u0101 vienk\u0101r\u0161\u0101 gad\u012bjum\u0101, Typescript nav j\u0113gas.<br>Turkl\u0101t j\u0101atceras, ka, lai piln\u012bb\u0101 izmantotu Typescript priek\u0161roc\u012bbas, ir j\u0101m\u0101c\u0101s to lietot pietiekam\u0101 l\u012bmen\u012b, un tas var pras\u012bt laiku. Manupr\u0101t, tas joproj\u0101m ir \u013coti izdev\u012bgs j\u016bsu laika ieguld\u012bjums.<\/p>\n\n\n\n<p><strong>Las\u012bt vair\u0101k:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/\">Rub\u012bns 3.0. Ruby un maz\u0101k zin\u0101mas priv\u0101tuma kontroles metodes<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/highest-quality-code-in-your-saas-project\/\">Visaugst\u0101k\u0101s kvalit\u0101tes kods j\u016bsu SaaS projekt\u0101. K\u0101p\u0113c jums k\u0101 (netehniskajam) dibin\u0101t\u0101jam par to b\u016btu j\u0101r\u016bp\u0113jas?<\/a><\/p>\n\n\n\n<p><em>*Nosaukuma grafika n\u0101k no t\u012bmek\u013ca vietnes Know Your Meme.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Ikviens, kur\u0161 izmanto JavaScript ekosist\u0113mu, m\u016bsdien\u0101s zina par Typescript. Typescript ir viena no iecien\u012bt\u0101kaj\u0101m tehnolo\u0123ij\u0101m*, un t\u0101s lietojums nep\u0101rtraukti pieaug (lietojuma da\u013ca palielin\u0101j\u0101s no 52% 2018. gad\u0101 l\u012bdz 78% 2020. gad\u0101)*.<\/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=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/lv\/emuars\/kapec-jums-iespejams-vajadzetu-izmantot-typescript\/\" \/>\n<meta property=\"og:locale\" content=\"lv_LV\" \/>\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\/lv\/emuars\/kapec-jums-iespejams-vajadzetu-izmantot-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 min\u016btes\" \/>\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\":\"lv-LV\",\"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\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/#breadcrumb\"},\"inLanguage\":\"lv-LV\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"lv-LV\",\"@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\":\"lv-LV\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"lv-LV\",\"@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\":\"lv-LV\",\"@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\\\/lv\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"K\u0101p\u0113c jums (iesp\u0113jams) vajadz\u0113tu izmantot Typescript - The Codest","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\/lv\/emuars\/kapec-jums-iespejams-vajadzetu-izmantot-typescript\/","og_locale":"lv_LV","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\/lv\/emuars\/kapec-jums-iespejams-vajadzetu-izmantot-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 min\u016btes"},"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":"lv-LV","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":"K\u0101p\u0113c jums (iesp\u0113jams) vajadz\u0113tu izmantot 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","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/#breadcrumb"},"inLanguage":"lv-LV","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/"]}]},{"@type":"ImageObject","inLanguage":"lv-LV","@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":"lv-LV"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"lv-LV","@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":"lv-LV","@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\/lv\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/posts\/3941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/comments?post=3941"}],"version-history":[{"count":7,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/posts\/3941\/revisions"}],"predecessor-version":[{"id":8171,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/posts\/3941\/revisions\/8171"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/media\/3942"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/media?parent=3941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/categories?post=3941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/lv\/wp-json\/wp\/v2\/tags?post=3941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}