diff --git a/src/data/roadmaps/typescript/content/112-advanced-types/104-recursive-types.md b/src/data/roadmaps/typescript/content/112-advanced-types/104-recursive-types.md index e97aca9f0..8d7f3f1bd 100644 --- a/src/data/roadmaps/typescript/content/112-advanced-types/104-recursive-types.md +++ b/src/data/roadmaps/typescript/content/112-advanced-types/104-recursive-types.md @@ -5,7 +5,10 @@ Recursive types in TypeScript are a way to define a type that references itself. For example, the following is a recursive type that represents a linked list: ```typescript -type LinkedList = T & { next: LinkedList }; +type LinkedList = { + value: T; + next: LinkedList | null; +}; let list: LinkedList = { value: 1,