-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I read the proposal a couple of times now, but I'm still failing to see who implementation selection is going to work.
Let's say I create my own ToString
protocol:
Protocol ToString {
symbol;
toString() {
return this[ToString.symbol];
}
}
const myObject = {
[ToString.symbol]: 'myObject',
};
console.log(myObject.toString());
How is the implementation of .toString()
being selected? Will this run Object.prototype.toString()
or ToString.toString()
?
Metadata
Metadata
Assignees
Labels
No labels