Check out example codes for "implement a linked list in typescript". It will help you in understanding the concepts better.

Code Example 1

1
2
3
4
5
6
	class LinkedList {
		private head: LinkedListItem;
		constructor(item: LinkedListItem) {
			this.head = item;
		}
	}

Code Example 2

class LinkedListItem {
		value: any;
		next: LinkedListItem;

		constructor(val) {
			this.value = val;
			this.next = null;
		}
	}

Learn ReactJs, React Native from akashmittal.com