I'm trying to create a Linked List in Typescript, and I've created a INode interface, and a node class to start it off
interface INode<T> {
data: T;
next: INode<T> | null;
}
class Node<T> implements INode<T> {
public data: T;
public next: INode<T> | null;
constructor(data: T) {
this.data = data
this.next = null
}
}
The problem is: I'm getting a TS error that keeps saying:
Duplicate identifier "Node"
And based on the code I showed above, there's no duplicate identifier. How can I fix this error?