-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix itThe severity and priority of this issue do not warrant the time or complexity needed to fix it
Description
We currently support extends null using #3516 and #3524, but I was wondering if we might also want to error on incorrectly using 'extends null'
class C extends null{
x: number;
}
var c: C;
c.toString()
From the Mozilla docs "Extending from null works like with a normal class, except that the prototype object does not inherit from Object.prototype."
I may be missing something in the above example (apologies if so), but it looks like we might want to warn on the use of toString since, assuming I'm reading it correctly, this method does not exist on an instance of C.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix itThe severity and priority of this issue do not warrant the time or complexity needed to fix it