Can someone please explain the difference between Boolean and boolean in Typescript?
Boolean is an object type.
boolean is a primitive type.
You should always use
boolean (the primitive type in your programs).
You shouldn’t write:
function yourFunction(foo: Boolean)
But instead always write:
function yourFunction(foo: boolean)
For more info, see TypeScript Lang – Basic Types
Answered By – Joel