diff --git a/page-data/course/enterprise-v2/page-data.json b/page-data/course/enterprise-v2/page-data.json index f3208d6fc..eb6ef9d4f 100644 --- a/page-data/course/enterprise-v2/page-data.json +++ b/page-data/course/enterprise-v2/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/enterprise-v2", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"Enterprise TypeScript v2","id":"enterprise-v2","visibleInCourseIndex":false,"visibleInTopNav":false,"visibleInCoursePage":true,"summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":false,"femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","femWorkshopPublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"Enterprise TypeScript v2","id":"enterprise-v2","visibleInCourseIndex":false,"visibleInTopNav":false,"visibleInCoursePage":true,"summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":false,"femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","femWorkshopPublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/course/full-stack-typescript/page-data.json b/page-data/course/full-stack-typescript/page-data.json index febd1dbf6..b96adaa4a 100644 --- a/page-data/course/full-stack-typescript/page-data.json +++ b/page-data/course/full-stack-typescript/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/full-stack-typescript", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"Full Stack TypeScript","id":"full-stack-typescript","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"Full Stack TypeScript","id":"full-stack-typescript","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/course/fundamentals-v3/page-data.json b/page-data/course/fundamentals-v3/page-data.json index e301d511c..585456624 100644 --- a/page-data/course/fundamentals-v3/page-data.json +++ b/page-data/course/fundamentals-v3/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/fundamentals-v3", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"TypeScript Fundamentals v3","id":"fundamentals-v3","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"TypeScript Fundamentals v3","id":"fundamentals-v3","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/course/fundamentals-v4/page-data.json b/page-data/course/fundamentals-v4/page-data.json index 96084b779..8bb71c67e 100644 --- a/page-data/course/fundamentals-v4/page-data.json +++ b/page-data/course/fundamentals-v4/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/fundamentals-v4", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"TypeScript Fundamentals v4","id":"fundamentals-v4","visibleInCourseIndex":false,"visibleInTopNav":false,"visibleInCoursePage":true,"summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":false,"femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","femWorkshopPublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"TypeScript Fundamentals v4","id":"fundamentals-v4","visibleInCourseIndex":false,"visibleInTopNav":false,"visibleInCoursePage":true,"summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":false,"femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","femWorkshopPublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/course/intermediate-v1/page-data.json b/page-data/course/intermediate-v1/page-data.json index 5e71e370c..bf763fd50 100644 --- a/page-data/course/intermediate-v1/page-data.json +++ b/page-data/course/intermediate-v1/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/intermediate-v1", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"Intermediate TypeScript","id":"intermediate-v1","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"Intermediate TypeScript","id":"intermediate-v1","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/course/intermediate-v2/page-data.json b/page-data/course/intermediate-v2/page-data.json index 325139d61..ac390edd6 100644 --- a/page-data/course/intermediate-v2/page-data.json +++ b/page-data/course/intermediate-v2/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/intermediate-v2", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"Intermediate TypeScript","id":"intermediate-v2","visibleInCourseIndex":false,"visibleInTopNav":false,"visibleInCoursePage":true,"summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":false,"femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","femWorkshopPublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"Intermediate TypeScript","id":"intermediate-v2","visibleInCourseIndex":false,"visibleInTopNav":false,"visibleInCoursePage":true,"summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":false,"femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","femWorkshopPublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/course/making-typescript-stick/page-data.json b/page-data/course/making-typescript-stick/page-data.json index 979c1706c..bec1b2fa7 100644 --- a/page-data/course/making-typescript-stick/page-data.json +++ b/page-data/course/making-typescript-stick/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-templates-course-page-tsx", "path": "/course/making-typescript-stick", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}}]}},"pageContext":{"name":"Making TypeScript Stick","id":"making-typescript-stick","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":true}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","topNavOrder":1,"courseIndexOrder":1,"currentCourse":"fundamentals-v3","courses":["fundamentals-v3","fundamentals-v4"]},{"id":"intermediate-typescript","topNavOrder":2,"courseIndexOrder":2,"currentCourse":"intermediate-v1","courses":["intermediate-v1","intermediate-v2"]},{"id":"making-typescript-stick","topNavOrder":5,"courseIndexOrder":5,"currentCourse":"making-typescript-stick","courses":["making-typescript-stick"]},{"id":"enterprise-typescript","topNavOrder":3,"courseIndexOrder":3,"currentCourse":"enterprise-v2","courses":["enterprise-v2"]},{"id":"full-stack-typescript","topNavOrder":4,"courseIndexOrder":4,"currentCourse":"full-stack-typescript","courses":["full-stack-typescript"]}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/typescript-v4/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/enterprise-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","femWorkshopPublished":null,"femWorkshopUrl":null,"visibleInTopNav":true,"visibleInCourseIndex":true,"visibleInCoursePage":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","femWorkshopPublished":"true","femWorkshopUrl":"https://frontendmasters.com/workshops/intermediate-typescript-v2/","visibleInTopNav":false,"visibleInCourseIndex":false,"visibleInCoursePage":true}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v3","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v4","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v4","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v4","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v4","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v4","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","order":11,"isExercise":null,"course":"fundamentals-v4","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v4","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v4","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v3","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v4","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v4","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v3","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v3","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","order":5,"isExercise":null,"course":"fundamentals-v3","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n"}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","order":6,"isExercise":null,"course":"fundamentals-v3","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n"}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","order":7,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n"}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","order":8,"isExercise":true,"course":"fundamentals-v3","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n"}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","order":9,"isExercise":null,"course":"fundamentals-v3","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n"}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","order":10,"isExercise":null,"course":"fundamentals-v3","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n"}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","order":12,"isExercise":null,"course":"fundamentals-v3","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n"}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","order":13,"isExercise":null,"course":"fundamentals-v3","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n"}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","order":14,"isExercise":null,"course":"fundamentals-v3","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n"}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","order":15,"isExercise":true,"course":"fundamentals-v3","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n"}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","order":1,"isExercise":null,"course":"fundamentals-v4","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","order":2,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n"}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","order":3,"isExercise":null,"course":"fundamentals-v4","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n"}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","order":4,"isExercise":null,"course":"fundamentals-v4","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"enterprise-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"enterprise-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"enterprise-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"enterprise-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v4","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v1","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v1","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v1","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v1","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v1","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v1","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v1","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"enterprise-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"enterprise-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"enterprise-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"enterprise-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"enterprise-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","order":16,"isExercise":null,"course":"fundamentals-v3","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v1","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v1","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","order":1,"isExercise":null,"course":"intermediate-v2","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","order":2,"isExercise":null,"course":"intermediate-v2","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n"}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","order":3,"isExercise":null,"course":"intermediate-v2","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n"}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","order":4,"isExercise":null,"course":"intermediate-v2","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n"}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","order":5,"isExercise":null,"course":"intermediate-v2","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n"}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","order":6,"isExercise":null,"course":"intermediate-v2","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n"}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","order":7,"isExercise":null,"course":"intermediate-v2","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n"}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","order":8,"isExercise":null,"course":"intermediate-v2","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n"}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","order":9,"isExercise":null,"course":"intermediate-v2","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n"}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","order":3,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n"}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","order":4,"isExercise":null,"course":"making-typescript-stick","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n"}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","order":5,"isExercise":null,"course":"making-typescript-stick","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n"}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","order":6,"isExercise":null,"course":"making-typescript-stick","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n"}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","order":7,"isExercise":null,"course":"making-typescript-stick","description":"A familiar American game show, with a TypeScript twist!\n"}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","order":8,"isExercise":null,"course":"making-typescript-stick","description":"We'll explore solving problems using only TypeScript's types\n"}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","order":9,"isExercise":null,"course":"making-typescript-stick","description":"Turn your brain into a TypeScript compiler with this game\n"}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","order":10,"isExercise":null,"course":"making-typescript-stick","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n"}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","order":1,"isExercise":null,"course":"making-typescript-stick","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n"}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","order":2,"isExercise":null,"course":"making-typescript-stick","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n"}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","order":1,"isExercise":null,"course":"full-stack-typescript","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n"}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","order":2,"isExercise":null,"course":"full-stack-typescript","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n"}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","order":3,"isExercise":null,"course":"full-stack-typescript","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n"}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","order":4,"isExercise":null,"course":"full-stack-typescript","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n"}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","order":5,"isExercise":null,"course":"full-stack-typescript","description":"We'll make our first GraphQL resolver, to make our new API queryable\n"}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","order":6,"isExercise":null,"course":"full-stack-typescript","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n"}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","order":7,"isExercise":null,"course":"full-stack-typescript","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n"}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","order":8,"isExercise":null,"course":"full-stack-typescript","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n"}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","order":9,"isExercise":null,"course":"full-stack-typescript","description":"Let's get some data from our database flowing through GraphQL and into the UI\n"}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","order":10,"isExercise":null,"course":"full-stack-typescript","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","order":11,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","order":12,"isExercise":null,"course":"full-stack-typescript","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","order":13,"isExercise":null,"course":"full-stack-typescript","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n"}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","order":14,"isExercise":null,"course":"full-stack-typescript","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n"}}}]}},"pageContext":{"name":"Making TypeScript Stick","id":"making-typescript-stick","visibleInCourseIndex":true,"visibleInTopNav":true,"visibleInCoursePage":true,"summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":true}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file diff --git a/page-data/index/page-data.json b/page-data/index/page-data.json index 6316dda28..3d5ac68de 100644 --- a/page-data/index/page-data.json +++ b/page-data/index/page-data.json @@ -1,5 +1,5 @@ { "componentChunkName": "component---src-pages-index-tsx", "path": "/", - "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","name":"TypeScript Fundamentals","courses":["fundamentals-v3","fundamentals-v4"],"currentCourse":"fundamentals-v3","courseIndexOrder":1},{"id":"intermediate-typescript","name":"Intermediate TypeScript","courses":["intermediate-v1","intermediate-v2"],"currentCourse":"intermediate-v1","courseIndexOrder":2},{"id":"making-typescript-stick","name":"Making TypeScript Stick","courses":["making-typescript-stick"],"currentCourse":"making-typescript-stick","courseIndexOrder":5},{"id":"enterprise-typescript","name":"Enterprise TypeScript","courses":["enterprise-v2"],"currentCourse":"enterprise-v2","courseIndexOrder":3},{"id":"full-stack-typescript","name":"Full Stack TypeScript","courses":["full-stack-typescript"],"currentCourse":"full-stack-typescript","courseIndexOrder":4}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","visibleInCourseIndex":false},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","visibleInCourseIndex":false},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","visibleInCourseIndex":false}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n","order":1}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n","order":2}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n","order":2}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n","order":2}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n","order":2}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n","order":2}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n","order":2}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n","order":2}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n","order":3}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n","order":3}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n","order":3}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n","order":3}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n","order":3}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n","order":3}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n","order":3}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n","order":4}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n","order":4}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n","order":4}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n","order":4}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n","order":4}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n","order":4}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n","order":4}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n","order":5}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n","order":5}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","description":"We'll make our first GraphQL resolver, to make our new API queryable\n","order":5}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n","order":5}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n","order":5}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n","order":5}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n","order":5}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n","order":6}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n","order":6}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n","order":6}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n","order":6}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n","order":6}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n","order":6}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n","order":6}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n","order":7}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","description":"A familiar American game show, with a TypeScript twist!\n","order":7}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n","order":7}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n","order":7}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n","order":7}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n","order":7}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n","order":7}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n","order":8}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n","order":8}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","description":"We'll explore solving problems using only TypeScript's types\n","order":8}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n","order":8}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n","order":8}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n","order":8}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n","order":8}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","description":"Let's get some data from our database flowing through GraphQL and into the UI\n","order":9}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","description":"Turn your brain into a TypeScript compiler with this game\n","order":9}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n","order":9}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n","order":9}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n","order":9}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n","order":9}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n","order":9}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n","order":10}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n","order":10}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n","order":10}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n","order":10}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n","order":11}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n","order":11}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n","order":11}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n","order":12}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n","order":12}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n","order":12}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n","order":13}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n","order":13}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n","order":13}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n","order":14}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n","order":14}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n","order":14}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n","order":15}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n","order":15}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n","order":16}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n","order":16}}}]}},"pageContext":{}}, + "result": {"data":{"site":{"siteMetadata":{"title":"Learn TypeScript w/ Mike North","courseGroups":[{"id":"typescript-fundamentals","name":"TypeScript Fundamentals","courses":["fundamentals-v3","fundamentals-v4"],"currentCourse":"fundamentals-v3","courseIndexOrder":1},{"id":"intermediate-typescript","name":"Intermediate TypeScript","courses":["intermediate-v1","intermediate-v2"],"currentCourse":"intermediate-v1","courseIndexOrder":2},{"id":"making-typescript-stick","name":"Making TypeScript Stick","courses":["making-typescript-stick"],"currentCourse":"making-typescript-stick","courseIndexOrder":5},{"id":"enterprise-typescript","name":"Enterprise TypeScript","courses":["enterprise-v2"],"currentCourse":"enterprise-v2","courseIndexOrder":3},{"id":"full-stack-typescript","name":"Full Stack TypeScript","courses":["full-stack-typescript"],"currentCourse":"full-stack-typescript","courseIndexOrder":4}],"courses":[{"id":"fundamentals-v3","name":"TypeScript Fundamentals v3","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v3.png","facebookImage":"/fb-ts-fundamentals-v3.png","twitterImage":"/tw-ts-fundamentals-v3.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v3/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"fundamentals-v4","name":"TypeScript Fundamentals v4","summary":"Learn everything you need to know in order to confidently and successfully use TypeScript to build a modern JavaScript app.","squareImage":"/ts-fundamentals-v4.png","facebookImage":"/fb-ts-fundamentals-v4.png","twitterImage":"/tw-ts-fundamentals-v4.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-v4/","femCoursePublished":"false","visibleInCourseIndex":false},{"id":"intermediate-v1","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts.png","facebookImage":"/fb-intermediate-ts.png","twitterImage":"/tw-intermediate-ts.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"making-typescript-stick","name":"Making TypeScript Stick","summary":"Tackle a series of challenges designed to reinforce your knowledge and make\nthe important concepts truly \"stick\" in your mind.\n","squareImage":"/making-typescript-stick.png","facebookImage":"/fb-making-typescript-stick.png","twitterImage":"/tw-making-typescript-stick.png","femCourseUrl":"https://frontendmasters.com/courses/typescript-practice/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"enterprise-v2","name":"Enterprise TypeScript v2","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/enterprise-typescript-v2/","femCoursePublished":"false","visibleInCourseIndex":false},{"id":"full-stack-typescript","name":"Full Stack TypeScript","summary":"Combine TypeScript and GraphQL's type systems to create full-stack, fully\ntype-checked code bases that are shockingly easy to refactor and maintain.\n","squareImage":"/full-stack-ts.png","facebookImage":"/fb-full-stack-ts.png","twitterImage":"/tw-full-stack-ts.png","femCourseUrl":"https://frontendmasters.com/courses/fullstack-typescript/","femCoursePublished":"true","visibleInCourseIndex":true},{"id":"intermediate-v2","name":"Intermediate TypeScript","summary":"Leverage TypeScript's strengths to provide clarity in the face of\ncomplexity, while protecting your codebase and team from it's weaknesses.\n","squareImage":"/intermediate-ts-v2.png","facebookImage":"/fb-intermediate-ts-v2.png","twitterImage":"/tw-intermediate-ts-v2.png","femCourseUrl":"https://frontendmasters.com/courses/intermediate-typescript-v2/","femCoursePublished":"false","visibleInCourseIndex":false}]}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/enterprise-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v3/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v1/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"What does “full stack typing” look like? TS is great, and gives us a lot of confidence around safety and refactoring where type-checking…","fields":{"slug":"/course/full-stack-typescript/01-intro/"},"frontmatter":{"date":"March 24, 2022","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Sr. Staff Engineer @ LinkedIn Works in the Developer Productivity and Happiness org Main focus: Infra UX TypeScript…","fields":{"slug":"/course/fundamentals-v4/01-intro/"},"frontmatter":{"date":"June 08, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"About the Instructor Developer Platform lead @ Stripe One of Stripe’s Product Architects Top Goals for this course Pass along key knowledge…","fields":{"slug":"/course/intermediate-v2/01-project-setup/"},"frontmatter":{"date":"June 10, 2021","title":"Intro","description":"We'll discuss the goals and agenda of this course, and how to get up and\nrunning with the workshop project in 2 minutes or less.\n","order":1}}},{"node":{"excerpt":"What to expect Aside from a small update on the latest developments in the TS language,\nwe won’t be covering much new material, but we’ll…","fields":{"slug":"/course/making-typescript-stick/01-intro/"},"frontmatter":{"date":"March 22, 2022","title":"Intro","description":"We'll discuss the inspiration and goals of this course, and how\nto best build your TypeScript understanding over time\n","order":1}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/enterprise-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n","order":2}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v3/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n","order":2}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v1/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n","order":2}}},{"node":{"excerpt":"A few problems that something like GQL solves Let’s imagine we’re adding a “list of doctors” page to a hospital UI. On the screen to the…","fields":{"slug":"/course/full-stack-typescript/02-graphql-intro/"},"frontmatter":{"date":"March 24, 2022","title":"GraphQL Intro","description":"A conceptual overview of GraphQL, and the problems that it aims to solve\n","order":2}}},{"node":{"excerpt":"In this chapter we will… Get hands-on with our first TypeScript program and the\ncompiler CLI command Learn how the compiler-emitted JS code…","fields":{"slug":"/course/fundamentals-v4/02-hello-typescript/"},"frontmatter":{"date":"June 08, 2021","title":"Hello TypeScript","description":"In this chapter, we'll get hands on with our first TypeScript program and the\ncompiler CLI command, and examine a simple program's compiled output\n","order":2}}},{"node":{"excerpt":"We have different types of “named things” in TypeScript, including values and functions (and occasionally things that can be used as both…","fields":{"slug":"/course/intermediate-v2/02-declaration-merging/"},"frontmatter":{"date":"June 10, 2021","title":"Declaration Merging","description":"In order to truly understand how types and values \"stack\" on\neach other, we'll first tackle the concept of declaration merging.\nOften when people grasp how TypeScript handles this, they never look\nat the language the same way again\n","order":2}}},{"node":{"excerpt":"Question 1 Compare and contrast the #name and age fields #name is a JS private field, and it’s actually inaccessible outside of the class at…","fields":{"slug":"/course/making-typescript-stick/02-warm-up/"},"frontmatter":{"date":"March 22, 2022","title":"JS/TS Warm-up Quiz","description":"Before jumping in, let's get those neurons firing by taking a quick\nquiz. Remember, wrong answers aren't anything more than an indication\nof where you need a little more practice!\n","order":2}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/enterprise-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n","order":3}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v3/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n","order":3}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v1/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n","order":3}}},{"node":{"excerpt":"Variadic Tuple Types We know that a tuple type is an ordered collection (often of known length),\nwith the type of each member known as well…","fields":{"slug":"/course/making-typescript-stick/03-recent-updates-to-typescript/"},"frontmatter":{"date":"March 22, 2022","title":"Recent updates to TypeScript","description":"We'll discuss a curated list of advancements in the TS language\nand compiler, starting with the 4.0 release.\n","order":3}}},{"node":{"excerpt":"The GitHub repo for the workshop project is here. Project Setup First, if you want to ensure you’re using the correct Node.js and package…","fields":{"slug":"/course/full-stack-typescript/03-project-tour/"},"frontmatter":{"date":"March 24, 2022","title":"Project Tour","description":"Let's take a look at the starting point code for our workshop project, a twitter clone\n","order":3}}},{"node":{"excerpt":"Now that we have compiled a simple TypeScript program, let’s look at\nthe basics of the programming language. Variable Declarations…","fields":{"slug":"/course/fundamentals-v4/03-variables-and-values/"},"frontmatter":{"date":"June 08, 2021","title":"Variables and Values","description":"We will begin our study of the TypeScript language with simple variables\nand functions.\n","order":3}}},{"node":{"excerpt":"The JS ecosystem was without an “official” module specification\nuntil 2015, which led to a variety of different community-defined\nmodule…","fields":{"slug":"/course/intermediate-v2/03-modules/"},"frontmatter":{"date":"June 10, 2021","title":"Modules & CJS interop","description":"Although most of the code we write today is in the form of\nES modules, plenty of dependencies are packaged in the\nCommonJS module format. In this chapter, we'll look at modules in depth\nso that you have all the tools you need in order to consume all\nthe dependencies you care about, while keeping the TS compiler happy\n","order":3}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/enterprise-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n","order":4}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v3/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n","order":4}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v1/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n","order":4}}},{"node":{"excerpt":"The Challenge Let’s get some hands on experience working with template literal types by building a\ndata store, whose method names are based…","fields":{"slug":"/course/making-typescript-stick/04-data-layer-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 1: Building a typed data store","description":"Let's practice using template literal types, mapped types and generics\nby building our typed data store.\n","order":4}}},{"node":{"excerpt":"Create a new file server/src/apollo-server.ts with the following contents In server/src/index.ts add the following imports Next, add the…","fields":{"slug":"/course/full-stack-typescript/04-hello-apollo/"},"frontmatter":{"date":"March 24, 2022","title":"Hello Apollo","description":"We'll get our GraphQL API up and running quickly and easily using Apollo server\n","order":4}}},{"node":{"excerpt":"Now that we know how to type simple variables and functions, let’s make things\na bit more interesting with collections. In JavaScript, this…","fields":{"slug":"/course/fundamentals-v4/04-objects-arrays-and-tuples/"},"frontmatter":{"date":"June 08, 2021","title":"Objects, Arrays and Tuples","description":"Now that we know how to type simple variables and functions, let's make things\na bit more interesting with collections: in JavaScript this includes Objects and Arrays.\n","order":4}}},{"node":{"excerpt":"Type queries allow us to obtain type information from values, which\nis an incredibly important capability — particularly when working\nwith…","fields":{"slug":"/course/intermediate-v2/04-type-queries/"},"frontmatter":{"date":"June 10, 2021","title":"Type Queries","description":"Type queries allow us to obtain type information from values.\nAs we work toward building our own \"standard library\" of\nutility types, we'll need this important tool in our toolbox\n","order":4}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v4/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n","order":5}}},{"node":{"excerpt":"Ways of categorizing type systems Now is a good time to take a step back and think about some conceptual\naspects of types and type systems…","fields":{"slug":"/course/fundamentals-v3/05-structural-vs-nominal-types/"},"frontmatter":{"date":"June 08, 2021","title":"Structural vs. Nominal Types","description":"In this unit, we will explore how TypeScript is fundamentally different from\nnominal type systems, such as the ones found in Java and C++.\n","order":5}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v1/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n","order":5}}},{"node":{"excerpt":"Example 1 Yes, this will compile. Unfortunately, obviously NaN is a number in JavaScript. Example 2 Yes, this will compile. Unfortunately…","fields":{"slug":"/course/making-typescript-stick/05-does-it-compile/"},"frontmatter":{"date":"March 22, 2022","title":"Game 1: Does it compile?","description":"Let's play a game! We'll look at a few TypeScript code samples and see if we\ncan figure out if they will compile\n","order":5}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/enterprise-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n","order":5}}},{"node":{"excerpt":"Go back to the server/src/apollo-server.ts file, remove the underscore before _db here and insert the following code immediately before you…","fields":{"slug":"/course/full-stack-typescript/05-first-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"First Resolver","description":"We'll make our first GraphQL resolver, to make our new API queryable\n","order":5}}},{"node":{"excerpt":"Ternary operator with values In a wide range of programming languages, we can find if/then/else logic.\nJavaScript provides a ternary…","fields":{"slug":"/course/intermediate-v2/05-conditional-types/"},"frontmatter":{"date":"June 10, 2021","title":"Conditional Types","description":"Conditional types can be thought of as \"a ternary operator, for types\".\nWhile there is no \"control flow\" in a world where we're describing constraints with types\n(instead of procedural steps to execute \"in a flow\"), this tool does provide\nan important foundation for switching logic based on type information\n","order":5}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v4/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n","order":6}}},{"node":{"excerpt":"Union and Intersection Types, Conceptually Union and intersection types can conceptually be thought of as logical boolean operators\n(AND, OR…","fields":{"slug":"/course/fundamentals-v3/06-union-and-intersection-types/"},"frontmatter":{"date":"June 08, 2021","title":"Union and Intersection Types","description":"We will discuss and explore TypeScript's union and intersection types,\nwhich are effectively \"AND\" and \"OR\" boolean logic operators for types.\n","order":6}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v1/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n","order":6}}},{"node":{"excerpt":"What’s a jQuery? Back in the age of inconsistent DOM APIs (I’m looking at you IE6)\nthere arose a dominant solution that allowed us to do…","fields":{"slug":"/course/making-typescript-stick/06-jquery-challenge/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 2: Typing jQuery","description":"Just for fun (and practice), we'll write our own version of jQuery, built on\ntop of the now standardized DOM APIs.\n","order":6}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/enterprise-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n","order":6}}},{"node":{"excerpt":"In this chapter, we’ll get both our schema and resolver out of the apollo-server.ts file. Ideal Getting the schema out Go back to the server…","fields":{"slug":"/course/full-stack-typescript/06-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Imported Resolver","description":"To get the full advantage of one GraphQL schema that both client and server\nsub-projects use, we need to break it out into a separate file.\n","order":6}}},{"node":{"excerpt":"There are several types that are broadly useful enough that TypeScript\nincludes them as part of the “core types” for the JS language. Now…","fields":{"slug":"/course/intermediate-v2/06-extract-exclude/"},"frontmatter":{"date":"June 10, 2021","title":"Extract and Exclude","description":"Now that we've learned about conditional types, let's study\nthe built-in utility types Extract and Exclude, which are\n*implemented* with conditional types\n","order":6}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v4/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n","order":7}}},{"node":{"excerpt":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We…","fields":{"slug":"/course/fundamentals-v3/07-interfaces-and-type-aliases/"},"frontmatter":{"date":"June 08, 2021","title":"Interfaces and Type Aliases","description":"TypeScript provides two mechanisms for centrally defining types and giving them\nuseful and meaningful names: interfaces and type aliases. We will study both\nconcepts in depth, and explain when it makes sense to use each.\n","order":7}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v1/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n","order":7}}},{"node":{"excerpt":"Download the game\nhere\nand open with Microsoft Powerpoint","fields":{"slug":"/course/making-typescript-stick/07-typepardy/"},"frontmatter":{"date":"March 22, 2022","title":"Game 2: Typepardy","description":"A familiar American game show, with a TypeScript twist!\n","order":7}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/enterprise-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n","order":7}}},{"node":{"excerpt":"The Types From within the ./server sub-project, run the following command You should see a new file appear with lots of types in it server…","fields":{"slug":"/course/full-stack-typescript/07-imported-resolver/"},"frontmatter":{"date":"March 24, 2022","title":"Typed Resolver","description":"Let's deliver on the promise of two type systems coming together in blissful unity, by adding\nautomatically generated types to our resolvers\n","order":7}}},{"node":{"excerpt":"Conditional types are not just for switching behavior based\non comparison — they can be used with an ‘infer’ keyword\nto access sub-parts of…","fields":{"slug":"/course/intermediate-v2/07-infer/"},"frontmatter":{"date":"June 10, 2021","title":"Inference with conditional types","description":"Conditional types are not just for switching behavior based\non comparison -- they can be used with an 'infer' keyword\nto access sub-parts of type information within a larger type\n","order":7}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v4/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n","order":8}}},{"node":{"excerpt":"Let’s put our knowledge to the test, by defining a type\nthat describes any allowable JSON value. Here’s the relevant section of the…","fields":{"slug":"/course/fundamentals-v3/08-exercise-json-types/"},"frontmatter":{"date":"June 08, 2021","title":"JSON types","description":"We will take on our first challenge together: defining types\nthat describe any valid JSON value\n","order":8}}},{"node":{"excerpt":"Type challenges\nare a great way to\npractice using the TS type system. These are often quite challenging, but they give\nyou valuable practice…","fields":{"slug":"/course/making-typescript-stick/08-type-challenges/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 3: Type Challenges","description":"We'll explore solving problems using only TypeScript's types\n","order":8}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/enterprise-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n","order":8}}},{"node":{"excerpt":"Setting up the apollo client The first thing we’ll need to do is bring the apollo graphql client into the app. Open client/src/index.tsx and…","fields":{"slug":"/course/full-stack-typescript/08-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"UI Consumes Real Data","description":"Now that we have a GraphQL API up and running, let's actually bring it into our React app!\n","order":8}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v1/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n","order":8}}},{"node":{"excerpt":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices. We’ll\nlook at how this kind of type…","fields":{"slug":"/course/intermediate-v2/08-indexed-access-types/"},"frontmatter":{"date":"June 10, 2021","title":"Indexed Access Types","description":"Indexed Access types provide a mechanism for retrieving\npart(s) of an array or object type via indices.\n","order":8}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v4/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n","order":9}}},{"node":{"excerpt":"We have dealt with function argument and return types, but there\nare a few more in-depth features we need to cover. Callable types Both type…","fields":{"slug":"/course/fundamentals-v3/09-functions/"},"frontmatter":{"date":"June 08, 2021","title":"Functions","description":"So far, we have dealt with function argument and return types. There\nare a few more in-depth features we need to cover, including\nmultiple function heads and callable types.\n","order":9}}},{"node":{"excerpt":"1 2 3 4 5 6 7 8 9 10 11","fields":{"slug":"/course/making-typescript-stick/09-guess-that-type/"},"frontmatter":{"date":"March 22, 2022","title":"Game 3: Guess That Type","description":"Turn your brain into a TypeScript compiler with this game\n","order":9}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/enterprise-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n","order":9}}},{"node":{"excerpt":"Open server/src/resolvers/Query.ts and replace the fixture array in suggestions() with a call\nto the db. And do something similar for…","fields":{"slug":"/course/full-stack-typescript/09-ui-consumes-data/"},"frontmatter":{"date":"March 24, 2022","title":"Data from the database","description":"Let's get some data from our database flowing through GraphQL and into the UI\n","order":9}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v1/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n","order":9}}},{"node":{"excerpt":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We’ll\nstudy this type in detail…","fields":{"slug":"/course/intermediate-v2/09-mapped-types/"},"frontmatter":{"date":"June 10, 2021","title":"Mapped Types","description":"Mapped allow types to be defined in other types through a\nmuch more flexible version of an index signature. We'll\nstudy this type in detail, and demonstrate how it makes\nlanguage features like indexed access types and conditional\ntypes even more powerful!\n","order":9}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v4/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n","order":10}}},{"node":{"excerpt":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a closer…","fields":{"slug":"/course/fundamentals-v3/10-classes/"},"frontmatter":{"date":"June 08, 2021","title":"Classes","description":"TypeScript classes add some powerful and important features on top\nof traditional JavaScript classes. In this unit, we will take a close look\nclass fields, access modifier keywords and more!\n","order":10}}},{"node":{"excerpt":"The Challenge Years ago I was doing some work that involved Web Workers. If you’ve never used these before, you can think of them as totally…","fields":{"slug":"/course/making-typescript-stick/10-penpal-types/"},"frontmatter":{"date":"March 22, 2022","title":"Challenge 4: Penpal types","description":"Take on one of the real-world challenges that Mike encountered\non his path to becoming a typescript pro!\n","order":10}}},{"node":{"excerpt":"Schema changes Open schema.graphql and add the following types and make the following changes Run yarn codegen in both the client and server…","fields":{"slug":"/course/full-stack-typescript/10-nested-data/"},"frontmatter":{"date":"March 24, 2022","title":"Nested data","description":"In two situations, there's some \"detail\" in a nested object that we need to build only when needed\n","order":10}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v3/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n","order":11}}},{"node":{"excerpt":"Types describe sets of allowed values Let’s imagine that types describe a set of allowed values that a value might be. For example: x could…","fields":{"slug":"/course/fundamentals-v4/11-top-and-bottom-types/"},"frontmatter":{"date":"June 08, 2021","title":"Top and bottom types","description":"Top types can be anything, bottom types can't be anything. We will also look\nat three \"extreme types\" in TypeScript: any, unknown and never.\n","order":11}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following Run yarn codegen in both the client and server sub-projects to get\nupdated TS…","fields":{"slug":"/course/full-stack-typescript/11-nested-data copy/"},"frontmatter":{"date":"March 24, 2022","title":"Mutations","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n","order":11}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v4/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n","order":12}}},{"node":{"excerpt":"We’ve explored built-in type guards like typeof and instanceof,\nbut there’s a lot more power in type guards, including the ability\nto define…","fields":{"slug":"/course/fundamentals-v3/12-type-guards/"},"frontmatter":{"date":"June 08, 2021","title":"Type guards and narrowing","description":"We have explored built-in type guards like typeof and instanceof,\nbut there's a lot more power in type guards, including the ability\nto define your own!\n","order":12}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add a favorites field to the User type In client/src/App.tsx update the…","fields":{"slug":"/course/full-stack-typescript/12-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites","description":"We'll create new data for the first time, using a GraphQL mutation for the \"post a new tweet\" feature\n","order":12}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v4/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n","order":13}}},{"node":{"excerpt":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter\nwe’ll dive…","fields":{"slug":"/course/fundamentals-v3/13-nullish-values/"},"frontmatter":{"date":"June 08, 2021","title":"Nullish values","description":"There are situations where we have to plan for, and deal with\nthe possibility that values are null or undefined. In this chapter,\nwe will dive deep into null, undefined, definite assignment,\nand the non-null assertion operator.\n","order":13}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add two new mutations In client/src/Tweet.tsx add these imports and add…","fields":{"slug":"/course/full-stack-typescript/13-favorites/"},"frontmatter":{"date":"March 24, 2022","title":"Favorites Interactivity","description":"Let's make our \"like\" button clickable, by creating and deleting a \"favorite\" resource\n","order":13}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v4/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n","order":14}}},{"node":{"excerpt":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project. This is a…","fields":{"slug":"/course/fundamentals-v3/14-generics/"},"frontmatter":{"date":"June 08, 2021","title":"Generics","description":"Generics allow us to parameterize types, which unlocks great opportunity\nto reuse types broadly across a TypeScript project.\n","order":14}}},{"node":{"excerpt":"Schema Update your graphql.schema by adding the following and add add a new top-level query In client/src/App.tsx add the following to the…","fields":{"slug":"/course/full-stack-typescript/14-trends/"},"frontmatter":{"date":"March 24, 2022","title":"Trends","description":"Let's try using a union type to implement the \"trends\" portion of the sidebar in the twitter UI\n","order":14}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v4/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n","order":15}}},{"node":{"excerpt":"Let’s put our newfound knowledge around Generics to the test by building out\nsome higher-order functions that operate on dictionaries:","fields":{"slug":"/course/fundamentals-v3/15-dict-map-filter-reduce/"},"frontmatter":{"date":"June 08, 2021","title":"Dictionary map, filter and reduce","description":"Many of us use array the higher-order functions map, filter and reduce\nquite often. Let's build out similar utilities that operate on dictionaries!\n","order":15}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v4/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n","order":16}}},{"node":{"excerpt":"Now that we have covered the basic use of Generics, let’s layer on\ntwo more concepts: how scoping work with type params, and how we\ncan…","fields":{"slug":"/course/fundamentals-v3/16-type-param-scopes-and-constraints/"},"frontmatter":{"date":"June 10, 2021","title":"Generics Scopes and Constraints","description":"In this chapter, we'll learn about scopes and constraints, as they pertain to\ntype params, and what the language would look like if we didn't have these\nimportant tools\n","order":16}}}]}},"pageContext":{}}, "staticQueryHashes": ["2785745750","2841359383"]} \ No newline at end of file