mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
exhaustive tests
This commit is contained in:
parent
346253a0d5
commit
581f52a7ea
@ -4,6 +4,12 @@ function test1(a: any) {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +18,12 @@ function test2(a: any) {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,10 +31,154 @@ function test3(a: any) {
|
||||
if (typeof a === "undefined" || typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test4(a: any) {
|
||||
if (typeof a !== "undefined" && typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test5(a: boolean | void) {
|
||||
if (typeof a !== "undefined") {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test6(a: boolean | void) {
|
||||
if (typeof a === "undefined") {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test7(a: boolean | void) {
|
||||
if (typeof a === "undefined" || typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test8(a: boolean | void) {
|
||||
if (typeof a !== "undefined" && typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test9(a: boolean | number) {
|
||||
if (typeof a !== "undefined") {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test10(a: boolean | number) {
|
||||
if (typeof a === "undefined") {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test11(a: boolean | number) {
|
||||
if (typeof a === "undefined" || typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test12(a: boolean | number) {
|
||||
if (typeof a !== "undefined" && typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test13(a: boolean | number | void) {
|
||||
if (typeof a !== "undefined") {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test14(a: boolean | number | void) {
|
||||
if (typeof a === "undefined") {
|
||||
if (typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test15(a: boolean | number | void) {
|
||||
if (typeof a === "undefined" || typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
function test16(a: boolean | number | void) {
|
||||
if (typeof a !== "undefined" && typeof a === "boolean") {
|
||||
a;
|
||||
}
|
||||
else {
|
||||
a;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user