-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
TypeScript Version: 3.4.0-dev.20190305
Code
const key: keyof Boolean = "toString"; // error - "toString" is not assignable to "valueOf"
const x: {toString(): string} = new Boolean(); // no error
const y: Boolean["toString"] = true.toString; // no error
class Bool extends Boolean {
protected toString() { // also no error, but should be
return "";
}
}
Expected behavior:
keyof Boolean
should be "toString" | "valueOf"
Playground
askirmas and stephenash
Metadata
Metadata
Assignees
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript