I have a class as follows (just showing part):
export class LinkedListNode<t> extends windward.WrObject implements ILinkedListNode<t>{
public get next():LinkedListNode<t> {
return this._next === this._list._first ? null : this._next;
}
}
So in the interface I want to declare next as a method. However, the following does not work:
export interface ILinkedListNode<t> {
get next() : LinkedListNode<t>;
}
The following does work, but is inaccurate:
export interface ILinkedListNode<t> {
next : LinkedListNode<t>;
}
Is there a way to declare a getter in an interface? A getter is different than a member variable, for example it is not passed across to a web worker when posting an object.
thanks - dave