{"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":"hvorfor-du-sannsynligvis-bor-bruke-typescript","status":"publish","type":"post","link":"https:\/\/thecodest.co\/nb\/blog\/why-you-should-probably-use-typescript\/","title":{"rendered":"Derfor b\u00f8r du (sannsynligvis) bruke Typescript"},"content":{"rendered":"<p>N\u00e5v\u00e6rende posisjon for <a href=\"https:\/\/thecodest.co\/nb\/dictionary\/typescript-developer\/\">Maskinskrevet manuskript<\/a> kom ikke ut av det bl\u00e5, for denne teknologien kan virkelig forbedre utvikleropplevelsen v\u00e5r. Mer eksplisitt koding \u00f8ker kontrollen og forutsigbarheten av <a href=\"https:\/\/thecodest.co\/nb\/dictionary\/what-is-code-refactoring\/\">kode<\/a>.<br>I denne artikkelen skal jeg pr\u00f8ve \u00e5 overbevise deg om \u00e5 bruke Typescript.<\/p>\n\n\n\n<p>*- <a href=\"https:\/\/thecodest.co\/nb\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">Data<\/a> kilde: <a href=\"https:\/\/2020.stateofjs.com\/en-US\/technologies\/javascript-flavors\/\">Tilstanden til JS 2020<\/a> og <a href=\"https:\/\/insights.stackoverflow.com\/survey\/2020#most-loved-dreaded-and-wanted\">Stack Overflow Developer Survey 2020<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Finn ut om feil tidligere<\/h2>\n\n\n\n<p>N\u00e5r du utvikler en applikasjon i <a href=\"https:\/\/thecodest.co\/nb\/blog\/hire-javascript-developer\/\">JavaScript<\/a>kan det hende at flyten din<br>se slik ut:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Gj\u00f8r en forandring,<\/li>\n\n\n\n<li>G\u00e5 til appen og sjekk ut den endrede delen \/ Kj\u00f8r (relaterte) tester.<\/li>\n\n\n\n<li>Finn ut om alt er i orden.<\/li>\n<\/ol>\n\n\n\n<p>Med Typescript kan du faktisk gj\u00f8re endringen, og hvis det er noen <strong>type feil<\/strong> i koden din, vil du vite det umiddelbart takket v\u00e6re kompilatorens feilmelding eller IDE-tilbakemelding i sanntid.<br>Typescript-kompilatoren vil selvf\u00f8lgelig ikke l\u00f8se alle problemer og vil ikke advare om alle feil, men hjelpen kan v\u00e6re uvurderlig.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bedre syntaksfullf\u00f8ring i IDE-er<\/h2>\n\n\n\n<p>Det er veldig enkelt. Hvis du bruker gode IDE-er, som WebStorm eller VSCode, vil du f\u00e5<br>bedre syntaksfullf\u00f8ring med Typescript. Det h\u00f8res kanskje ikke ut som en stor forbedring av utvikleropplevelsen, men til syvende og sist er hver eneste forbedring viktig, ettersom den kan spare <a href=\"https:\/\/thecodest.co\/nb\/blog\/why-us-companies-are-opting-for-polish-developers\/\">oss<\/a> og igjen, forhindre skrivefeil eller feil. Dessuten kan vi definere typen eller grensesnittet v\u00e5rt \u00e9n gang, og siden vi ikke alltid trenger \u00e5 huske strukturen, kan vi fokusere p\u00e5 \u00e5 skrive forretningslogikken.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/code.png\" alt=\"kode\" title=\"JS-kode\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/js-code.png\" alt=\"JS-kode\" title=\"kode\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Mindre smertefull refaktorisering<\/h2>\n\n\n\n<p>Tenk deg at du av en eller annen grunn m\u00e5 refaktorere, for eksempel at du har sluttet deg til en <a href=\"https:\/\/thecodest.co\/nb\/dictionary\/why-do-projects-fail\/\">prosjekt<\/a> og du f\u00e5r i oppgave \u00e5 legge til en ny funksjon, men denne funksjonen er p\u00e5 en eller annen m\u00e5te knyttet til eldre kode.<br>Typescript kan gj\u00f8re det enklere og mindre smertefullt, for n\u00e5r du gj\u00f8r en endring og det er et annet sted der du m\u00e5 gj\u00f8re en ny endring, vil kompilatoren advare deg om det.<\/p>\n\n\n\n<p>Det kan for eksempel v\u00e6re en endret funksjonssignatur, eller kanskje etter endringen, en<br>funksjon vil returnere noe helt annet, s\u00e5 ogs\u00e5 den returnerte typen vil v\u00e6re forskjellig.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bli tryggere p\u00e5 kodebasen<\/h2>\n\n\n\n<p>JavaScript er svakt og dynamisk typet, s\u00e5 n\u00e5r du initialiserer en variabel med verdien <code>let query = ''<\/code> senere i koden kan utvikleren gj\u00f8re noe irrasjonelt ved en feiltakelse, for eksempel <code>query = true<\/code>, og den vil v\u00e6re gyldig <a href=\"https:\/\/thecodest.co\/nb\/blog\/hire-vue-js-developers\/\">JS<\/a> kode.<\/p>\n\n\n\n<p>I en velskrevet kode skal det ikke skje at en boolsk verdi tilordnes en variabel som tidligere var en streng. S\u00e5 vanligvis skyldes denne tilordningen med typeendring en feil.<\/p>\n\n\n\n<p>N\u00e5r vi bruker Typescript, kan vi ikke endre typen p\u00e5 variabelen, s\u00e5 hvis vi gj\u00f8r <code>let query = ''<\/code> variabel, vil den v\u00e6re <code>streng<\/code> typen, og vi vil ikke kunne endre typen ved en feiltakelse.<\/p>\n\n\n\n<p>Hvis vi \u00f8nsker \u00e5 la en variabel v\u00e6re mer enn \u00e9n type, gj\u00f8r vi det alltid eksplisitt ved \u00e5 bruke union type, for eksempel <code>streng | tall<\/code>.<\/p>\n\n\n\n<p>Derfor gj\u00f8r Typescript koden v\u00e5r mer forutsigbar og eksplisitt.<br>Typescript tar ogs\u00e5 hensyn til eksplikativitet i kontrollstr\u00f8manalysen, og hvis det er en mulighet for at noe kan g\u00e5 galt, vil den advare deg.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/code-sample.png\" alt=\"kodeeksempel\" title=\"kodeeksempel\"\/><\/figure>\n\n\n\n<p>Her i eksempel i f\u00f8rste <code>hvis<\/code> blokken f\u00e5r vi en feilmelding:<\/p>\n\n\n\n<p><code>TS2339: Egenskapen 'battery' finnes ikke p\u00e5 typen 'ClothingProduct'<\/code> 2 ganger, for <code>batteri<\/code>, og <code>ram<\/code> egenskaper.<\/p>\n\n\n\n<p>I den andre blokken - <code>ellers<\/code>vil vi f\u00e5 den feilen for <code>st\u00f8rrelse<\/code> eiendom. Det er selvf\u00f8lgelig bare et eksempel for \u00e5 vise deg hvordan <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/2\/narrowing.html#discriminated-unions\">diskriminerte fagforeninger<\/a> og <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/2\/narrowing.html#control-flow-analysis\">kontrollflytanalyse<\/a> fungerer i Typescript, s\u00e5 vi gj\u00f8r ikke noe altfor komplisert med den koden.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enkel, gradvis migrering fra JavaScript<\/h2>\n\n\n\n<p>Gyldig JavaScript-kode er samtidig gyldig Typescript-kode, slik at du kan migrere kodebasen din trinn for trinn. Vanligvis er det god praksis \u00e5 bruke strict-modus i Typescript, men i dette tilfellet,<br>m\u00e5 vi begynne med <code>\"strict\": false<\/code> i <code>tsconfig.json<\/code> og vi b\u00f8r ogs\u00e5 angi to alternativer til.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\"allowJs\": true, \/\/ det vil tillate oss \u00e5 bruke .js-filer, og typen vil ikke bli sjekket i dem\n\"skipLibCheck\": true \/\/ det vil hoppe over \u00e5 sjekke typer i biblioteker som vi bruker<\/code><\/pre>\n\n\n\n<p>Med disse alternativene kan vi migrere fra JS til TS trinn for trinn - fil for fil, ved ganske enkelt \u00e5 endre filtypen fra <code>.js(x)<\/code> til <code>.ts(x)<\/code> og legge til typer i filene. P\u00e5 denne m\u00e5ten kan vi unng\u00e5 hundrevis eller tusenvis av skumle kompileringsfeil.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sammendrag<\/h2>\n\n\n\n<p>Jeg synes vi b\u00f8r bruke <b>Maskinskrevet manuskript<\/b> s\u00e5 ofte som <strong>mulig<\/strong>Vi gj\u00f8r det fordi det er veldig gunstig p\u00e5 lang sikt. Det bidrar til \u00e5 vedlikeholde prosjekter, \u00f8ker utviklernes erfaring og gj\u00f8r kodebasen v\u00e5r mer tydelig og p\u00e5litelig.<\/p>\n\n\n\n<p>Men som alltid finnes det unntak - for eksempel for en enkel landingsside<br>der JavaScript bare brukes til \u00e5 veksle klasse eller et annet enkelt tilfelle, gir Typescript ingen mening.<br>Vi m\u00e5 ogs\u00e5 huske at for \u00e5 dra full nytte av Typescript, m\u00e5 vi l\u00e6re oss \u00e5 bruke det p\u00e5 et tilstrekkelig niv\u00e5, og det kan ta litt tid. Jeg tror likevel det er en sv\u00e6rt l\u00f8nnsom investering av tiden din.<\/p>\n\n\n\n<p><strong>Les mer om dette:<\/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 og mindre kjente metoder for personvernkontroll<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/highest-quality-code-in-your-saas-project\/\">H\u00f8yeste kvalitetskode i SaaS-prosjektet ditt. Hvorfor b\u00f8r du som (ikke-teknisk) grunnlegger bry deg om det?<\/a><\/p>\n\n\n\n<p><em>*Tittelgrafikken kommer fra nettstedet Know Your Meme.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Alle som bruker JavaScript-\u00f8kosystemet, kjenner i dag til Typescript. Typescript er en av de mest popul\u00e6re teknologiene*, og bruken av den \u00f8ker stadig (andelen \u00f8kte fra 52% i 2018 til 78% i 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=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/nb\/blogg\/hvorfor-du-sannsynligvis-bor-bruke-typescript\/\" \/>\n<meta property=\"og:locale\" content=\"nb_NO\" \/>\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\/nb\/blogg\/hvorfor-du-sannsynligvis-bor-bruke-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 minutter\" \/>\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\":\"nb-NO\",\"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\":\"nb-NO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-you-should-probably-use-typescript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"nb-NO\",\"@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\":\"nb-NO\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nb-NO\",\"@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\":\"nb-NO\",\"@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\\\/nb\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Derfor b\u00f8r du (sannsynligvis) bruke 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\/nb\/blogg\/hvorfor-du-sannsynligvis-bor-bruke-typescript\/","og_locale":"nb_NO","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\/nb\/blogg\/hvorfor-du-sannsynligvis-bor-bruke-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 minutter"},"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":"nb-NO","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":"Derfor b\u00f8r du (sannsynligvis) bruke 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":"nb-NO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\/"]}]},{"@type":"ImageObject","inLanguage":"nb-NO","@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":"nb-NO"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"nb-NO","@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":"nb-NO","@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\/nb\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/posts\/3941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/comments?post=3941"}],"version-history":[{"count":7,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/posts\/3941\/revisions"}],"predecessor-version":[{"id":8171,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/posts\/3941\/revisions\/8171"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/media\/3942"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/media?parent=3941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/categories?post=3941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/nb\/wp-json\/wp\/v2\/tags?post=3941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}