論理型 (boolean type)
JavaScriptの論理型(boolean type)は、trueとfalseの論理値からなる型です。
論理型リテラル
JavaScriptの論理型リテラルはtrueまたはfalseを用いて次のように書きます。
tsconstisOk = true;constisPanda = false;
tsconstisOk = true;constisPanda = false;
論理型の型注釈
TypeScriptの論理型の型注釈はbooleanを使います。
tsconstisOk : boolean = true;
tsconstisOk : boolean = true;
TypeScriptには大文字で始まるBoolean型がありますが、これとbooleanは別の型です。