compareTag: typeof compareTag = ...

A symbol that is used to define a custom hash method for a certain class or object.

If this tag is present on an object, lessThan will use the method associated with this tag to compare the given object with something else.

Note that the value passed to the object's method does not have to be of the same type. It may be possible that a number is passed in, or something else entirely. It is your responsibility to perform the necessary checks.

class Character {

constructor(public readonly charCode) {

}

public [compareTag](other: any): boolean {
return other instanceof Character
&& this.charCode < other.charCode;
}

}