-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
We define Boolean like this:
interface Boolean {
}
declare var Boolean: {
new (value?: any): Boolean;
(value?: any): boolean;
prototype: Boolean;
}
Which as you might expect means we allow you to assign anything to a variable of type Boolean. Obviously the uses for Boolean rather than boolean are few (if any) but nonetheless:
var b = new Boolean();
b = 1; // ok
b = "a"; // ok
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue