Improve TypeScript roadmap content (#6961)

* Verify Phase - 1

* Verify Phase - 2

* Phase - 3

* Final Changes in TS Roadmap
pull/6972/head
Vedansh 3 months ago committed by GitHub
parent ec60a125af
commit 47c9eb4860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      src/data/roadmaps/typescript/content/abstract-classes@tZFWeWHdOUJcCEtHfXH9p.md
  2. 2
      src/data/roadmaps/typescript/content/access-modifiers@RJ7on8WoxrKcXrR3qY5Rs.md
  3. 2
      src/data/roadmaps/typescript/content/advanced-types@2F7vOL__v9dLBohA263aj.md
  4. 2
      src/data/roadmaps/typescript/content/ambient-modules@k_5y77k8ZZ9_O2WpWXWTY.md
  5. 2
      src/data/roadmaps/typescript/content/any@yXiLegSlL7SveU8rBGj8U.md
  6. 2
      src/data/roadmaps/typescript/content/array@YbDuIo1BbZKEAZwmXlCdZ.md
  7. 4
      src/data/roadmaps/typescript/content/as-any@afTNr36VqeXoJpHxm2IoS.md
  8. 2
      src/data/roadmaps/typescript/content/as-const@pGFnTqi0-RSj0YRmNA5iy.md
  9. 4
      src/data/roadmaps/typescript/content/as-type@Ba0baUbomrW9td_K8U-5L.md
  10. 2
      src/data/roadmaps/typescript/content/awaited@aEhI_9mFWXRIZh1ZxTuzu.md
  11. 2
      src/data/roadmaps/typescript/content/class@tTSITP1W1ymS-njbFb8Ts.md
  12. 2
      src/data/roadmaps/typescript/content/classes@ib0jfZzukYOZ42AdJqt_W.md
  13. 6
      src/data/roadmaps/typescript/content/combining-types@qefnsugcveizVq2TORRgn.md
  14. 2
      src/data/roadmaps/typescript/content/compiler-options@RrExVb7l2gd0s_TlNdLeD.md
  15. 2
      src/data/roadmaps/typescript/content/conditional-types@ubGIhi-WLE0EopTYXzmPL.md
  16. 2
      src/data/roadmaps/typescript/content/constructor-overloading@oxzcYXxy2I7GI7nbvFYVa.md
  17. 2
      src/data/roadmaps/typescript/content/constructor-params@3XrKbK5Od2eoM0BLaS4kU.md
  18. 2
      src/data/roadmaps/typescript/content/decorators@TRx3wvWnRdJJf5eL-GBG4.md
  19. 2
      src/data/roadmaps/typescript/content/enum@bfZIXHceDKDGQl-24kQpT.md
  20. 2
      src/data/roadmaps/typescript/content/equality@Wy2yIK5vgLjEcc9VjuQK5.md
  21. 2
      src/data/roadmaps/typescript/content/exclude@0fvOXi9gJbEc7etqTggNE.md
  22. 2
      src/data/roadmaps/typescript/content/extending-interfaces@O-9WQqidujLIEOTcOfy4n.md
  23. 2
      src/data/roadmaps/typescript/content/external-modules@egQWk1n3p8Pep83yIwCtI.md
  24. 2
      src/data/roadmaps/typescript/content/extract@IIAbAzXiVQm1JEi2MTMZN.md
  25. 2
      src/data/roadmaps/typescript/content/function-overloading@-0Zp6b8NjDyz9MAQE3HfS.md
  26. 2
      src/data/roadmaps/typescript/content/generic-constraints@0NXHAOUYGIwuPwlN7r_B3.md
  27. 2
      src/data/roadmaps/typescript/content/generic-types@T2-VAVfntouJOoWHpHZ3n.md
  28. 2
      src/data/roadmaps/typescript/content/generics@4gaKqNtGLFqpk9WVKZl0v.md
  29. 2
      src/data/roadmaps/typescript/content/global-augmentation@JQwWeB1gkANSYfQmH69Bs.md
  30. 4
      src/data/roadmaps/typescript/content/hybrid-types@lvtTSHH9yBTCiLng8btnI.md
  31. 1
      src/data/roadmaps/typescript/content/inheritance-vs-polymorphism@8P0-vb9nlnmz7iC4UvyJZ.md
  32. 2
      src/data/roadmaps/typescript/content/installation-and-configuration@dA8CNQOgJRDa0T7rmyS7f.md
  33. 2
      src/data/roadmaps/typescript/content/instanceof@EDOU5a7UK17yp3PdFBJMc.md
  34. 2
      src/data/roadmaps/typescript/content/instancetype@izGAjNtrh3BzQt3KiZX0W.md
  35. 2
      src/data/roadmaps/typescript/content/interface-declaration@fY40W8prpgiNqRL50w7ub.md
  36. 2
      src/data/roadmaps/typescript/content/interface@mVKsM7R4Ivpdhnbwt1aRb.md
  37. 4
      src/data/roadmaps/typescript/content/introduction-to-typescript@KDd40JOAvZ8O1mfhTYB3K.md
  38. 2
      src/data/roadmaps/typescript/content/keyof-operator@t1Tcesfq7bV2TkHcfD6lU.md
  39. 2
      src/data/roadmaps/typescript/content/literal-types@CWzGwvl6NwYCaLYSLIjqQ.md
  40. 2
      src/data/roadmaps/typescript/content/mapped-types@VQ-V9qIdKgnpSJg2UnpuB.md
  41. 2
      src/data/roadmaps/typescript/content/method-overriding@aknqutxN2WDQ4RFcT-szM.md
  42. 2
      src/data/roadmaps/typescript/content/namespace-agumentation@16TT8R4N-9tCfWmPetqMP.md
  43. 6
      src/data/roadmaps/typescript/content/namespaces@EtVwQ4lnWi3IIFHGb2Qib.md
  44. 2
      src/data/roadmaps/typescript/content/never@0pi9VTbngcAIswuu5LIYg.md
  45. 2
      src/data/roadmaps/typescript/content/non-null-assertion@mjaL5ocLnM8VQlhUxW6KU.md
  46. 2
      src/data/roadmaps/typescript/content/nonnullable@_BAZlBEzE7ddr315OeHvl.md
  47. 2
      src/data/roadmaps/typescript/content/null@cjAwawhZLo1qVQ93XIdm2.md
  48. 2
      src/data/roadmaps/typescript/content/number@UH9d3cvGy_e67WFNFwCyf.md
  49. 2
      src/data/roadmaps/typescript/content/object@vnqvm_WiaKqpdxrW4wRGa.md
  50. 2
      src/data/roadmaps/typescript/content/omit@yjlxygHl8QONNUrdx-Q0A.md
  51. 2
      src/data/roadmaps/typescript/content/parameters@a7hl0iMZ-jcUACxqIYVqv.md
  52. 2
      src/data/roadmaps/typescript/content/partial@gBTem9Dp3IQLAkqGX4fOF.md
  53. 2
      src/data/roadmaps/typescript/content/pick@E88tHQvARkHURZwGaO02l.md
  54. 2
      src/data/roadmaps/typescript/content/readonly@IuO9-O_DQdDYuAbdGWdgb.md
  55. 2
      src/data/roadmaps/typescript/content/record@DRdBmF5Dt_r09LoPOxOuq.md
  56. 4
      src/data/roadmaps/typescript/content/recursive-types@N8xBTJ74xv1E5hSLYZtze.md
  57. 2
      src/data/roadmaps/typescript/content/returntype@On75JR_UkiIlha0_qaSeu.md
  58. 2
      src/data/roadmaps/typescript/content/running-typescript@qdy4ZIY2EKgmPNdu_ndcg.md
  59. 2
      src/data/roadmaps/typescript/content/satisfies-keyword@HD1UGOidp7JGKdW6CEdQ_.md
  60. 2
      src/data/roadmaps/typescript/content/string@d8iV-IBZ6cSnH8Z5_HRmc.md
  61. 2
      src/data/roadmaps/typescript/content/template-literal-types@xP25nGw42VqdfZ_9pDMXd.md
  62. 2
      src/data/roadmaps/typescript/content/truthiness@Xonbxc7MvMEonKBvbkCAH.md
  63. 2
      src/data/roadmaps/typescript/content/ts-and-js-interoperability@dcLaEU_lb0z_QypL1ZhpX.md
  64. 2
      src/data/roadmaps/typescript/content/ts-playground@_bZ71i36haWgHQTY0yMOx.md
  65. 2
      src/data/roadmaps/typescript/content/tsc@Iv_t13PSVzet5VPKFtAp1.md
  66. 2
      src/data/roadmaps/typescript/content/tsconfigjson@DmqrX56d9KnBcOSwlJR2q.md
  67. 2
      src/data/roadmaps/typescript/content/tuple@jq-GD0DLyzrEXQKUmt5kv.md
  68. 2
      src/data/roadmaps/typescript/content/type-aliases@M_3O21zjppgWptIT5dtu8.md
  69. 2
      src/data/roadmaps/typescript/content/type-compatibility@alMJCEyUZ90xz-2_g3YRj.md
  70. 2
      src/data/roadmaps/typescript/content/type-guards--narrowing@cFZsxpYHDxm7IWwergb3r.md
  71. 2
      src/data/roadmaps/typescript/content/type-inference@KUur-gfOBQodTS-irFet7.md
  72. 2
      src/data/roadmaps/typescript/content/type-predicates@1DOSAieOmWUNNsQQrqf2m.md
  73. 2
      src/data/roadmaps/typescript/content/typeof@ZiOcFZy85p7tLzUkyKDei.md
  74. 2
      src/data/roadmaps/typescript/content/types-vs-interfaces@TxkEpoOiuUm-fXJuFVKcH.md
  75. 2
      src/data/roadmaps/typescript/content/typescript-functions@qOynVkDi1gFz0mxyJHjfJ.md
  76. 2
      src/data/roadmaps/typescript/content/typescript-interfaces@aH1DxiG5xrdNlKutJ_gTz.md
  77. 2
      src/data/roadmaps/typescript/content/typescript-modules@sE9lqkkqwnsVJxTJv37YZ.md
  78. 2
      src/data/roadmaps/typescript/content/typescript-types@qcrGApxNzkGYxgcd7o45d.md
  79. 2
      src/data/roadmaps/typescript/content/typescript-vs-javascript@MQWzN_kXxVJMOYbRXSGJc.md
  80. 2
      src/data/roadmaps/typescript/content/typing-functions@9FIhHwDNzyKpb42NmSv3K.md
  81. 2
      src/data/roadmaps/typescript/content/undefined@Sa6IZtM4XJstultz-pbh0.md
  82. 2
      src/data/roadmaps/typescript/content/union-types@5z5w3yv1HbOpMlzEd4Iot.md
  83. 2
      src/data/roadmaps/typescript/content/unknown@O2TYbd9i_OQwQk2dKh-ly.md
  84. 2
      src/data/roadmaps/typescript/content/utility-types@LSwUHfalnk5MgHt21PANb.md
  85. 2
      src/data/roadmaps/typescript/content/void@yLlQg7BF--ZwRHbXBWfOi.md

@ -20,4 +20,4 @@ class Dog extends Animal {
Learn more from the following resources:
- [@article@Abstract Classes](https://www.typescriptlang.org/docs/handbook/2/classes.html#abstract-classes-and-members)
- [@official@Abstract Classes](https://www.typescriptlang.org/docs/handbook/2/classes.html#abstract-classes-and-members)

@ -10,4 +10,4 @@ Access modifiers in TypeScript allow you to define the level of visibility and a
Learn more from the following resources:
- [@article@TypeScript Access Modifiers](https://www.typescripttutorial.net/typescript-tutorial/typescript-access-modifiers/)
- [@official@TypeScript Access Modifiers](https://www.typescripttutorial.net/typescript-tutorial/typescript-access-modifiers/)

@ -14,5 +14,5 @@ These advanced types allow for more complex and expressive type systems, and ena
Learn more from the following links:
- [@article@Advanced Topics](https://www.typescriptlang.org/docs/handbook/type-compatibility.html#advanced-topics)
- [@official@Advanced Topics](https://www.typescriptlang.org/docs/handbook/type-compatibility.html#advanced-topics)
- [@video@Tutorial of Typescript - Advanced Types](https://www.youtube.com/playlist?list=PLw5h0DiJ-9PBIgIyd2ZA1CVnJf0BLFJg2)

@ -19,4 +19,4 @@ In this example, we declare an ambient module "my-module" in the `myModule.d.ts`
Learn more from the following links:
- [@article@Ambient Modules](https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules)
- [@official@Ambient Modules](https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules)

@ -18,4 +18,4 @@ const n: number = obj;
Learn more from the following links:
- [@article@any type in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)
- [@official@any type in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)

@ -8,4 +8,4 @@ const numbers: number[] = [1, 2, 3];
Learn more from the following links:
- [@article@Arrays](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays)
- [@official@Arrays](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays)

@ -11,3 +11,7 @@ let anyValue: any = 42;
anyValue = 'Hello, world!';
anyValue = true;
```
Learn more from the following links:
- [@official@Arrays](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)

@ -14,4 +14,4 @@ Using as const allows TypeScript to infer more accurate types for constants, whi
Learn more from the following links:
- [@article@const assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions)
- [@official@const assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions)

@ -1,6 +1,5 @@
# As Type
In TypeScript, the as keyword is used for type assertions, allowing you to explicitly inform the compiler about the type of a value when it cannot be inferred automatically. Type assertions are a way to override the default static type-checking behavior and tell the compiler that you know more about the type of a particular expression than it does.
Here's a simple example:
@ -11,8 +10,9 @@ let strLength: number = (someValue as string).length;
console.log(strLength); // Outputs: 18
```
In this example, someValue is initially of type any, and we use the as operator to assert that it is of type string before accessing its length property.
It's important to note that type assertions do not change the runtime type of a value, and do not cause any type of conversion. They are a compile-time construct used for static type checking in TypeScript.
- [@article@Type assertions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions)
- [@official@Type assertions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions)

@ -15,4 +15,4 @@ type C = Awaited<boolean | Promise<number>>;
Learn more from the following links:
- [@article@Awaited<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype)
- [@official@Awaited`<Type>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype)

@ -22,4 +22,4 @@ class Car {
Learn more from the following links:
- [@article@TypeScript Classes](https://www.typescriptlang.org/docs/handbook/2/classes.html)
- [@official@TypeScript Classes](https://www.typescriptlang.org/docs/handbook/2/classes.html)

@ -24,4 +24,4 @@ In this example, the `Animal` class has a name field, a constructor that sets th
Learn more from the following resources:
- [@article@Tutorial - Classes](https://www.typescriptlang.org/docs/handbook/2/classes.html)
- [@official@Tutorial - Classes](https://www.typescriptlang.org/docs/handbook/2/classes.html)

@ -2,7 +2,7 @@
In TypeScript, you can combine types using type union and type intersection.
### Type Union:
## Type Union
The union operator `|` is used to combine two or more types into a single type that represents all the possible types. For example:
@ -13,7 +13,7 @@ let value: stringOrNumber = 'hello';
value = 42;
```
### Type Intersection:
## Type Intersection
The intersection operator `&` is used to intersect two or more types into a single type that represents the properties of all the types. For example:
@ -32,7 +32,7 @@ let value: AB = { a: 'hello', b: 42 };
Learn more from the following links:
- [@article@Union Types in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
- [@official@Union Types in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
- [@article@Intersection Types in TypeScript](https://www.typescripttutorial.net/typescript-tutorial/typescript-intersection-types/)
- [@article@Type Aliases](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-aliases)
- [@article@Keyof Type Operator](https://www.typescriptlang.org/docs/handbook/2/keyof-types.html#handbook-content)

@ -8,4 +8,4 @@ tsc --target ES5 --module commonjs
Learn more from the following links:
- [@article@Compiler Options](https://www.typescriptlang.org/docs/handbook/compiler-options.html)
- [@official@Compiler Options](https://www.typescriptlang.org/docs/handbook/compiler-options.html)

@ -15,5 +15,5 @@ In this example, the Extends conditional type takes two types T and U and return
Learn more from the following links:
- [@article@Conditional Types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#handbook-content)
- [@official@Conditional Types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#handbook-content)
- [@video@Conditional Types - Advanced TypeScript](https://www.youtube.com/watch?v=QFWrbNehKk0)

@ -17,4 +17,4 @@ Note that, similar to function overloading, we only have one implementation of t
Learn more from the following resources:
- [@article@Constructors - TypeScript](https://www.typescriptlang.org/docs/handbook/2/classes.html#constructors)
- [@official@Constructors - TypeScript](https://www.typescriptlang.org/docs/handbook/2/classes.html#constructors)

@ -12,4 +12,4 @@ In this example, the constructor has two parameters: name and age. name has a pr
Learn more from the following links:
- [@article@TypeScript - Construct](https://www.typescriptlang.org/docs/handbook/2/classes.html#constructors)
- [@official@TypeScript - Construct](https://www.typescriptlang.org/docs/handbook/2/classes.html#constructors)

@ -37,4 +37,4 @@ In this example, we use the `@log` decorator to modify the behavior of the `add`
Learn more from the following links:
- [@article@Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html#handbook-content)
- [@official@Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html#handbook-content)

@ -19,4 +19,4 @@ If we left off the initializer for `Up`, it would have the value `0` and the res
Learn more from the following links:
- [@article@TypeScript - Enums](https://www.typescriptlang.org/docs/handbook/enums.html)
- [@official@TypeScript - Enums](https://www.typescriptlang.org/docs/handbook/enums.html)

@ -19,4 +19,4 @@ When we checked that `x` and `y` are both equal in the above example, TypeScript
Learn more from the following links:
- [@article@Equality Narrowing](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#equality-narrowing)
- [@official@Equality Narrowing](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#equality-narrowing)

@ -10,4 +10,4 @@ type T2 = Exclude<string | number | (() => void), Function>; // string | number
Learn more from the following links:
- [@article@Exclude<UnionType, ExcludedMembers>](https://www.typescriptlang.org/docs/handbook/utility-types.html#excludeuniontype-excludedmembers)
- [@official@Exclude<UnionType, ExcludedMembers>](https://www.typescriptlang.org/docs/handbook/utility-types.html#excludeuniontype-excludedmembers)

@ -23,4 +23,4 @@ In this example, the `Square` interface extends the `Shape` interface and adds a
Learn more from the following links:
- [@article@Extending Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)
- [@official@Extending Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)

@ -19,5 +19,5 @@ In this example, we use the "export" keyword in the "myModule.ts" file to export
Learn more from the following links:
- [@article@External Module](https://www.javatpoint.com/typescript-module)
- [@official@External Module](https://www.javatpoint.com/typescript-module)
- [@article@TypeScript - External Module](https://learncodeweb.com/typescript/modules-in-typescript-explain-with-an-example/)

@ -9,4 +9,4 @@ type T0 = Extract<'a' | 'b' | 'c', 'a' | 'f'>;
Learn more from the following links:
- [@article@Extract<Type, Union>](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union)
- [@official@Extract<Type, Union>](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union)

@ -16,4 +16,4 @@ console.log(add('Hello', ' World')); // "Hello World"
Learn more from the following links:
- [@article@Function Overloads](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads)
- [@official@Function Overloads](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads)

@ -24,4 +24,4 @@ In this example, the `Lengthwise` interface defines a `length` property. The `lo
Learn more from the following resources:
- [@article@Generic Constraints - TypeScript](https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints)
- [@official@Generic Constraints - TypeScript](https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints)

@ -33,4 +33,4 @@ myGenericNumber.add = function (x, y) {
Learn more from the following resources:
- [@article@Hello World of Generics](https://www.typescriptlang.org/docs/handbook/2/generics.html#hello-world-of-generics)
- [@official@Hello World of Generics](https://www.typescriptlang.org/docs/handbook/2/generics.html#hello-world-of-generics)

@ -16,4 +16,4 @@ In this example, the `identity` function takes a single argument of any data typ
Learn more from the following resources:
- [@article@Hello World of Generics](https://www.typescriptlang.org/docs/handbook/2/generics.html#hello-world-of-generics)
- [@official@Hello World of Generics](https://www.typescriptlang.org/docs/handbook/2/generics.html#hello-world-of-generics)

@ -24,4 +24,4 @@ In this example, we declare a new namespace "NodeJS" and add an interface "Globa
Learn more from the following links:
- [@article@Global augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation)
- [@official@Global augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation)

@ -24,3 +24,7 @@ type User = {
education: Education;
};
```
Learn more from the following links:
- [@official@Geeksforgeeks.org - Hybrid Types](https://www.geeksforgeeks.org/what-are-hybrid-types-in-typescript/#:~:text=Hybrid%20types%20are%20a%20combination,properties%20like%20a%20regular%20object.)

@ -36,4 +36,5 @@ animal.makeSound(); // Output: Meow
Learn more from the following resources:
- [@article@Dev.to - Mastering OOP in TypeScript](https://dev.to/rajrathod/mastering-object-oriented-programming-with-typescript-encapsulation-abstraction-inheritance-and-polymorphism-explained-c6p)
- [@video@Inheritance and Polymorphism In TypeScript](https://www.youtube.com/watch?v=Sn6K57YSuwU)

@ -45,5 +45,5 @@ And you're all set! You can now start writing TypeScript code in your project.
Learn more from the following links:
- [@article@Install and Configure TypeScript](https://www.typescriptlang.org/download)
- [@official@Install and Configure TypeScript](https://www.typescriptlang.org/download)
- [@article@TypeScript Getting Started](https://thenewstack.io/typescript-tutorial-a-guide-to-using-the-programming-language/)

@ -24,4 +24,4 @@ if (pet instanceof Bird) {
Learn more from the following links:
- [@article@instanceOf Operator](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#instanceof-narrowing)
- [@official@instanceOf Operator](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#instanceof-narrowing)

@ -26,4 +26,4 @@ type T4 = InstanceType<Function>;
Learn more from the following links:
- [@article@InstanceType<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#instancetypetype)
- [@official@InstanceType`<Type>`](https://www.typescriptlang.org/docs/handbook/utility-types.html#instancetypetype)

@ -18,4 +18,4 @@ In this example, the Person interface defines four properties: `firstName`, `las
Learn more from the following links:
- [@article@Extending Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)
- [@official@Extending Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)

@ -15,4 +15,4 @@ function greet(person: Person) {
Learn more from the following links:
- [@article@Object Types - Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)
- [@official@Object Types - Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)

@ -11,8 +11,8 @@ The main benefits of using TypeScript include:
Learn more from the following links:
- [@article@Overview of TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html)
- [@article@TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html)
- [@official@Overview of TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html)
- [@official@TypeScript Official Handbook](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html)
- [@article@What Is TypeScript?](https://thenewstack.io/what-is-typescript/)
- [@video@Video: Where TypeScript Excels](https://youtu.be/BUo7B6UuoJ4)
- [@feed@Explore top posts about TypeScript](https://app.daily.dev/tags/typescript?ref=roadmapsh)

@ -17,4 +17,4 @@ In this example, `UserKeys` is a type that represents the union of keys from the
Learn more from the following links:
- [@article@Keyof Type Operator](https://www.typescriptlang.org/docs/handbook/2/keyof-types.html#handbook-content)
- [@official@keyof Type Operator](https://www.typescriptlang.org/docs/handbook/2/keyof-types.html#handbook-content)

@ -15,4 +15,4 @@ In this example, the `Age` literal type is created by using the number `42` as a
Learn more from the following links:
- [@article@Literal Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types)
- [@official@Literal Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types)

@ -17,4 +17,4 @@ In this example, the `Readonly` mapped type takes an object type `T` and creates
Learn more from the following links:
- [@article@Mapped Types](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#handbook-content)
- [@official@Mapped Types](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#handbook-content)

@ -27,4 +27,4 @@ In this example, the `Dog` class overrides the makeSound method defined in the A
Learn more from the following resources:
- [@article@TypeScript - Overriding Methods](https://www.typescriptlang.org/docs/handbook/2/classes.html#overriding-methods)
- [@official@TypeScript - Overriding Methods](https://www.typescriptlang.org/docs/handbook/2/classes.html#overriding-methods)

@ -30,4 +30,4 @@ In this example, we use namespace augmentation to add a new function "newFunctio
Learn more from the following links:
- [@article@Module Augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)
- [@official@Module Augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)

@ -21,6 +21,6 @@ In this example, we use the `namespace` keyword in the "myNamespace.ts" file to
Learn more from the following resources:
- [@article@Overview of Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
- [@article@Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html)
- [@article@TypeScript - Using Namespaces](https://typescriptlang.org/docs/handbook/namespaces-and-modules.html#using-namespaces)
- [@official@Overview of Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
- [@official@Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html)
- [@official@TypeScript - Using Namespaces](https://typescriptlang.org/docs/handbook/namespaces-and-modules.html#using-namespaces)

@ -25,4 +25,4 @@ function infiniteLoop(): never {
Learn more from the following links:
- [@article@Never](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#the-never-type)
- [@official@Never Type](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#the-never-type)

@ -13,4 +13,4 @@ The non-null assertion operator is used to assert that a value is not null or un
Learn more from the following links:
- [@article@Non-null assertion operator](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html#non-null-assertion-operator)
- [@official@Non-null assertion operator](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html#non-null-assertion-operator)

@ -12,4 +12,4 @@ type T1 = NonNullable<string[] | null | undefined>;
Learn more from the following links:
- [@article@NonNullable<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#nonnullabletype)
- [@official@NonNullable<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#nonnullabletype)

@ -20,4 +20,4 @@ function doSomething(x: string | null) {
Learn more from the following links:
- [@article@null and undefined](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#null-and-undefined)
- [@official@null and undefined](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#null-and-undefined)

@ -9,4 +9,4 @@ let floatValue: number = 3.14;
Learn more from the following links:
- [@article@Number, String, Boolean, Symbol and Object](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#the-primitives-string-number-and-boolean)
- [@official@Number, String, Boolean, Symbol and Object](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#the-primitives-string-number-and-boolean)

@ -16,4 +16,4 @@ printCoord({ x: 3, y: 7 });
Learn more from the following links:
- [@article@Object Types in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#object-types)
- [@official@Object Types in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#object-types)

@ -28,4 +28,4 @@ const todoInfo: TodoInfo = {
Learn more from the following links:
- [@article@Omit<Type, Keys>](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)
- [@official@Omit<Type, Keys>](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)

@ -34,4 +34,4 @@ type T7 = Parameters<Function>;
Learn more from the following links:
- [@article@Parameters<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#parameterstype)
- [@official@Parameters<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#parameterstype)

@ -28,4 +28,4 @@ console.log(newUser);
Learn more from the following links:
- [@article@Partial<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)
- [@official@Partial<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)

@ -19,4 +19,4 @@ const todo: TodoPreview = {
Learn more from the following links:
- [@article@Pick<Type, Keys>](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)
- [@official@Pick<Type, Keys>](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys)

@ -17,4 +17,4 @@ todo.title = 'Hello';
Learn more from the following links:
- [@article@Readonly<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)
- [@official@Readonly<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)

@ -19,4 +19,4 @@ const cats: Record<CatName, CatInfo> = {
Learn more from the following links:
- [@article@Record<Keys, Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)
- [@official@Record<Keys, Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)

@ -17,3 +17,7 @@ let list: LinkedList<number> = {
```
In this example, the `LinkedList` type is defined as a type that extends `T` and contains a property `next` of the same type `LinkedList<T>`. This allows us to create a linked list where each node contains a value of type `T` and a reference to the next node in the list.
Learn more from the following links:
- [@official@Recursive Types in TypeScript](https://www.typescriptlang.org/play/3-7/types-and-code-flow/recursive-type-references.ts.html)

@ -37,4 +37,4 @@ type T8 = ReturnType<Function>;
Learn more from the following links:
- [@article@ReturnType<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype)
- [@official@ReturnType<Type>](https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype)

@ -17,5 +17,5 @@ node app.js
Learn more from the following link:
- [@article@Running your TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-tooling-in-5-minutes.html)
- [@official@Running your TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-tooling-in-5-minutes.html)
- [@feed@Explore top posts about TypeScript](https://app.daily.dev/tags/typescript?ref=roadmapsh)

@ -56,4 +56,4 @@ const greenNormalized = palette.green.toUpperCase();
Learn more from the following resources:
- [@article@Satisfies Keyword](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator)
- [@official@satisfies Keyword](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator)

@ -8,4 +8,4 @@ let name: string = 'John Doe';
Learn more from the following link
- [@article@Number, String, Boolean, Symbol and Object](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#the-primitives-string-number-and-boolean)
- [@official@Number, String, Boolean, Symbol and Object](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#the-primitives-string-number-and-boolean)

@ -15,4 +15,4 @@ In this example, the `Name` template literal type is created by concatenating th
Learn more from the following links:
- [@article@Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#handbook-content)
- [@official@Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#handbook-content)

@ -16,4 +16,4 @@ function getUsersOnlineMessage(numUsersOnline: number) {
Learn more from the following links:
- [@article@Truthiness Narrowing](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#truthiness-narrowing)
- [@official@Truthiness Narrowing](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#truthiness-narrowing)

@ -24,5 +24,5 @@ function add(a, b) {
Learn more from the following links:
- [@article@Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html)
- [@official@Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html)
- [@video@Using JavaScript in TypeScript](https://youtu.be/AZhZlEbBaB4)

@ -4,5 +4,5 @@ The TypeScript Playground is a great tool to learn TypeScript. It allows you to
Learn more from the following links:
- [@article@TypeScript - Playground](https://www.typescriptlang.org/play)
- [@official@TypeScript Official - Playground](https://www.typescriptlang.org/play)
- [@feed@Explore top posts about TypeScript](https://app.daily.dev/tags/typescript?ref=roadmapsh)

@ -20,5 +20,5 @@ You can run `tsc --help` to see a list of all the available options and flags.
Learn more from the following links:
- [@article@tsc CLI Options](https://www.typescriptlang.org/docs/handbook/compiler-options.html#using-the-cli)
- [@official@tsc CLI Options](https://www.typescriptlang.org/docs/handbook/compiler-options.html#using-the-cli)
- [@feed@Explore top posts about TypeScript](https://app.daily.dev/tags/typescript?ref=roadmapsh)

@ -28,4 +28,4 @@ Given below is the sample `tsconfig.json` file:
Learn more from the following links:
- [@article@What is a tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#handbook-content)
- [@official@What is a tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#handbook-content)

@ -16,4 +16,4 @@ const third = pair[2];
Learn more from the following links:
- [@article@Tuple Types](https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types)
- [@official@Tuple Types](https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types)

@ -16,4 +16,4 @@ In the example above, `Name` and `Age` are type aliases for `string` and `number
Learn more from the following links:
- [@article@Type Aliases](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-aliases)
- [@official@Type Aliases](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-aliases)

@ -20,4 +20,4 @@ In this example, `p1` has the type `Point`, while `p2` has the type `{ x: number
Learn more from the following links:
- [@article@Type Compatibility](https://www.typescriptlang.org/docs/handbook/type-compatibility.html)
- [@official@Type Compatibility](https://www.typescriptlang.org/docs/handbook/type-compatibility.html)

@ -4,4 +4,4 @@ Type guards are a way to narrow down the type of a variable. This is useful when
Learn more from the following resources:
- [@article@Type Guards - TypeScript Docs](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#typeof-type-guards)
- [@official@Type Guards - TypeScript Docs](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#typeof-type-guards)

@ -12,4 +12,4 @@ In this example, the TypeScript compiler automatically infers that the type of t
Learn more from the following links:
- [@article@Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html#handbook-content)
- [@official@Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html#handbook-content)

@ -19,4 +19,4 @@ function example(x: unknown) {
Learn more from the following links:
- [@article@Type Guards and Differentiating Types](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)
- [@official@Type Guards and Differentiating Types](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)

@ -14,4 +14,4 @@ if (typeof value === 'string') {
Learn more from the following links:
- [@article@Type Guards and Differentiating Types](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#typeof-type-guards)
- [@official@Type Guards and Differentiating Types](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#typeof-type-guards)

@ -32,5 +32,5 @@ const person: Person = {
Learn more from the following links:
- [@article@Interfaces vs. Type Aliases](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces)
- [@official@Interfaces vs. Type Aliases](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces)
- [@article@Interfaces vs Types in TypeScript](https://stackoverflow.com/questions/37233735/interfaces-vs-types-in-typescript)

@ -20,4 +20,4 @@ let name = function(param1: type1, param2: type2, ...): returnType {
Learn more from the following links:
- [@article@Functions in TypeScript](https://www.typescriptlang.org/docs/handbook/2/functions.html)
- [@official@Functions in TypeScript](https://www.typescriptlang.org/docs/handbook/2/functions.html)

@ -20,4 +20,4 @@ In this example, the `User` interface defines the structure of the `user` object
Learn more from the following links:
- [@article@TypeScript - Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)
- [@official@TypeScript - Interfaces](https://www.typescriptlang.org/docs/handbook/2/objects.html)

@ -26,5 +26,5 @@ MyModule.doSomething(); // Output: "Doing something..."
Learn more from the following links:
- [@article@Modules](https://www.typescriptlang.org/docs/handbook/modules.html#handbook-content)
- [@official@Modules](https://www.typescriptlang.org/docs/handbook/modules.html#handbook-content)
- [@video@TypeScript - Modules](https://www.youtube.com/watch?v=EpOPR03z4Vw)

@ -23,5 +23,5 @@ You can also create custom types in TypeScript using interfaces, classes, and ty
Learn more from the following links:
- [@article@TypeScript - Everyday Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html)
- [@official@TypeScript - Everyday Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html)
- [@feed@Explore top posts about TypeScript](https://app.daily.dev/tags/typescript?ref=roadmapsh)

@ -11,6 +11,6 @@ Here are a few key differences between TypeScript and JavaScript:
Learn more from the following links:
- [@article@Learning JavaScript and TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html#learning-javascript-and-typescript)
- [@official@Learning JavaScript and TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html#learning-javascript-and-typescript)
- [@article@TypeScript vs. JavaScript](https://thenewstack.io/typescript-vs-javascript/)
- [@feed@Explore top posts about JavaScript](https://app.daily.dev/tags/javascript?ref=roadmapsh)

@ -30,4 +30,4 @@ divide = (a, b) => {
Learn more from the following links:
- [@article@TypeScript Functions](https://www.typescriptlang.org/docs/handbook/2/functions.html)
- [@official@TypeScript Functions](https://www.typescriptlang.org/docs/handbook/2/functions.html)

@ -20,4 +20,4 @@ function doSomething(x: string | null) {
Learn more from the following links:
- [@article@null and undefined](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#null-and-undefined)
- [@official@null and undefined](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#null-and-undefined)

@ -12,4 +12,4 @@ function combine(input1: string | number, input2: string | number) {
Learn more from the following links:
- [@article@Union Types in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
- [@official@Union Types in TypeScript](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)

@ -15,4 +15,4 @@ function f2(a: unknown) {
Learn more from the following links:
- [@article@Unknown Type in TypeScript](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type)
- [@official@Unknown Type in TypeScript](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type)

@ -11,6 +11,6 @@ TypeScript provides several utility types that can be used to manipulate and tra
Learn more from the following links:
- [@article@TypeScript - Utility Types](https://www.typescriptlang.org/docs/handbook/utility-types.html)
- [@official@TypeScript - Utility Types](https://www.typescriptlang.org/docs/handbook/utility-types.html)
- [@article@TypeScript Utility Types Guide](https://camchenry.com/blog/typescript-utility-types)
- [@article@TypeScript Utility Types: Key Concepts And Best Practices](https://marketsplash.com/tutorials/typescript/typescript-utility-types/)

@ -13,4 +13,4 @@ In JavaScript, a function that doesn’t return any value will implicitly return
Learn more from the following links:
- [@article@void - TypeScript Docs](https://www.typescriptlang.org/docs/handbook/2/functions.html#void)
- [@official@void - TypeScript Docs](https://www.typescriptlang.org/docs/handbook/2/functions.html#void)

Loading…
Cancel
Save