Currently, I am in the process of developing a Linked List using Typescript. I have established an INode interface and a node class as a starting point.
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
}
}
However, an issue has arisen where I keep encountering a TS error stating:
Duplicate identifier "Node"
Upon reviewing the provided code snippet, there does not appear to be any duplication of identifiers. How can I go about resolving this error?