{"id":3573,"date":"2022-10-01T10:34:05","date_gmt":"2022-10-01T18:34:05","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/typescript\/?p=3573"},"modified":"2022-10-01T10:34:05","modified_gmt":"2022-10-01T18:34:05","slug":"ten-years-of-typescript","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/typescript\/ten-years-of-typescript\/","title":{"rendered":"Ten Years of TypeScript"},"content":{"rendered":"<p>Today is TypeScript&#8217;s birthday!<\/p>\n<p>But this birthday is a special one &#8211; 10 years ago today, on October 1st, 2012, TypeScript was unveiled publicly for the first time.<\/p>\n<h2>The Early Days<\/h2>\n<p>When TypeScript first debuted, there was <em>a lot<\/em> of skepticism &#8211; and understandably so.\nTo some JavaScript users, a team trying to bring static types to JavaScript might have sounded like an evil plot or a joke.<\/p>\n<p>But the features had merit, right?\nType-checking, catching bugs before you even save your file, and getting rich editor features like code-completion, navigation, and refactorings?\nWe knew teams inside and outside of our company were having huge challenges with complex JavaScript codebases, and we knew that JavaScript was going to be used <em>everywhere<\/em>.\nSo who wouldn&#8217;t want powerful tools to help write it?\nFor the team, there was a vision for what TypeScript could be, and in fact, if you look back at <a href=\"https:\/\/web.archive.org\/web\/20121003001910\/https:\/\/blogs.msdn.com\/b\/somasegar\/archive\/2012\/10\/01\/typescript-javascript-development-at-application-scale.aspx\">our first announcement post<\/a>, the value proposition was largely the same as it is today!<\/p>\n<p>Luckily, that vision resonated with others.\nEarly on, we built a small but hard-working and enthusiastic community, willing to experiment and ride out the experience while we were still iterating, learning, and building something that hadn&#8217;t yet even hit 1.0.\nWe saw exciting new efforts like <a href=\"https:\/\/github.com\/DefinitelyTyped\/DefinitelyTyped\">the DefinitelyTyped project<\/a>, new community members helping out on StackOverflow and our issue tracker, authors writing books and tutorials for the language, and new libraries taking a bet on TypeScript.\nThese patient, hard-working, and energetic developers laid the foundation for the TypeScript community to grow.<\/p>\n<p>Still, most JavaScript developers were uncertain of TypeScript.\nSo how was this team going to convince JavaScript developers of the value of static types in a dynamically typed language?\n&quot;Types versus no types&quot; has been a&#8230; contentious topic, and that goes back <em>at least<\/em> half a century in the programming world.<\/p>\n<p>But we really wanted to create amazing JavaScript tools through the power of types.<\/p>\n<p>Could it be done?<\/p>\n<h2>Standing the Test of Time<\/h2>\n<p>The truth is that this required a completely different approach in development than we were used to, followed by persistence, outreach, and empathy.\nTypeScript had to be free and open source, and done in a truly out-in-the-open manner.\nIt also had to interoperate seamlessly with existing JavaScript, co-evolve with JavaScript, and <em>feel<\/em> like JavaScript.\nTypeScript never set out to build a separate, distinct, and prescriptive language.\nInstead, TypeScript had to be <em>descriptive<\/em> &#8211; innovating in the type system around conventions and patterns found &quot;in the wild&quot; of the JavaScript ecosystem.\nThis let us meet people where they were, and this philosophy really fit well with the project&#8217;s design goals.<\/p>\n<p>It&#8217;s actually surprising how well <a href=\"https:\/\/github.com\/microsoft\/TypeScript\/wiki\/TypeScript-Design-Goals\/53ffa9b1802cd8e18dfe4b2cd4e9ef5d4182df10\">the design goals<\/a> for TypeScript have held up.<\/p>\n<p>For example, some design goals like<\/p>\n<ul>\n<li>&quot;Impose no runtime overhead on emitted programs.&quot;<\/li>\n<li>&quot;Align with current and future ECMAScript proposals.&quot;<\/li>\n<li>&quot;Preserve runtime behavior of all JavaScript code.&quot;<\/li>\n<li>&quot;Avoid adding expression-level syntax.&quot;<\/li>\n<li>&quot;Use a consistent, fully erasable, structural type system.&quot;<\/li>\n<\/ul>\n<p>all really point TypeScript towards simply being a type-checker for JavaScript, adding only syntax that&#8217;s necessary for type-checking.<\/p>\n<p>So we focused chiefly on the type system, and avoided adding new runtime syntax and behaviors.\nThis might seem obvious 10 years later, but programming languages often try to differentiate themselves based on what their runnable code looks like &#8211; plus, lots of typed languages guide their runtime behavior based on the types.<\/p>\n<p>But these approaches don&#8217;t make sense when trying to build on, and integrate with, JavaScript.\nUntyped JavaScript had to work the same when pasted into a TypeScript file, and converting TypeScript to JavaScript needed to be as easy as stripping away types.\nIt took a few missteps early on for us to realize this, but it was a learning opportunity and the team has avoided runtime syntax for the better part of 10 years.\nNowadays, when TypeScript is missing a useful runtime feature, we don&#8217;t just add it to TypeScript.\nWe work within TC39 (the JavaScript standards body) to guide or champion new features so that <em>all<\/em> JavaScript developers can benefit from them.<\/p>\n<p>Another successful principle is that TypeScript hasn&#8217;t tried to be every tool in the toolbox.\nOne of our non goals is to not &quot;provide an end-to-end build pipeline. Instead, make the system extensible so that external tools can use the compiler for more complex build workflows.&quot;<\/p>\n<p>There have been plenty of times when TypeScript has gotten requests to be a linter, a bundler, an optimizer\/minifier, a build orchestrator, a bundler (again), and more.\nThe lines aren&#8217;t always clearly defined, especially when TypeScript already does <em>a lot<\/em> as a type-checker, compiler, and language service.\nIn the JavaScript ecosystem, where best practices have continued to evolve over the years, it&#8217;s been incredibly important that TypeScript stay scoped and flexible to fit different needs.\nGiven all the different bundlers, different runtimes, different build orchestrators, and different linters over the past years, it&#8217;s been crucial that TypeScript integrate well with each of these without trying to displace any of them.\nIt&#8217;s been our privilege to collaborate with tool authors in this space, as we all work to make TypeScript and JavaScript easier to use.<\/p>\n<h2>Back to Today<\/h2>\n<p>Today TypeScript is a thriving language that&#8217;s used by millions of developers around the world.\nIn surveys and language rankings like <a href=\"https:\/\/survey.stackoverflow.co\/2022\/\">StackOverflow&#8217;s Annual Survey<\/a>, <a href=\"https:\/\/octoverse.github.com\/#top-languages-over-the-years\">GitHub&#8217;s Octoverse Report<\/a>, and <a href=\"https:\/\/redmonk.com\/sogrady\/category\/programming-languages\/\">Redmonk&#8217;s Language Rankings<\/a>, TypeScript has consistently stood in the top 10 (if not 5) most-used and most-loved languages.<\/p>\n<p>Of course, the context is important &#8211; TypeScript&#8217;s use is fundamentally intertwined with JavaScript&#8217;s, and every TypeScript developer is also a JavaScript developer.\nThankfully, even when asking JavaScript developers if they use TypeScript and like it &#8211; <a href=\"https:\/\/2021.stateofjs.com\/en-US\/other-tools\">like in the State of JS Survey<\/a> &#8211; the answer is a resounding &quot;yes&quot;!<\/p>\n<p>Today&#8217;s success is far and above where the core team imagined TypeScript being even a few years ago, let alone a decade ago.\nThe core team has worked hard on TypeScript, but we know that the fundamental thing that&#8217;s enabled this success is the community.\nThat includes the external contributors to TypeScript, the library authors and everyday developers who took a bet on TypeScript and proved the language out, the DefinitelyTyped contributors, the community organizers, the experts who took the time to answer questions and taught others and made a path for newcomers &#8211; every TypeScript user, from the bottom of our hearts, <strong>thank you<\/strong>.\nYou&#8217;ve been a part of building something great.\nWe hope that the next 10 years of TypeScript treat you well!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today is TypeScript&#8217;s birthday! But this birthday is a special one &#8211; 10 years ago today, on October 1st, 2012, TypeScript was unveiled publicly for the first time. The Early Days When TypeScript first debuted, there was a lot of skepticism &#8211; and understandably so. To some JavaScript users, a team trying to bring static [&hellip;]<\/p>\n","protected":false},"author":381,"featured_media":1797,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-typescript"],"acf":[],"blog_post_summary":"<p>Today is TypeScript&#8217;s birthday! But this birthday is a special one &#8211; 10 years ago today, on October 1st, 2012, TypeScript was unveiled publicly for the first time. The Early Days When TypeScript first debuted, there was a lot of skepticism &#8211; and understandably so. To some JavaScript users, a team trying to bring static [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/3573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/users\/381"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/comments?post=3573"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/3573\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/media\/1797"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/media?parent=3573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/categories?post=3573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/tags?post=3573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}