mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-26 03:19:10 -06:00
Add "bigint" to typeof x in baselines
This commit is contained in:
parent
ac2a118f07
commit
0499f5d801
@ -11,7 +11,7 @@ function f1(x: Color | string) {
|
||||
|
||||
if (typeof x === "number") {
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Color
|
||||
>"number" : "number"
|
||||
|
||||
@ -38,7 +38,7 @@ function f2(x: Color | string | string[]) {
|
||||
|
||||
if (typeof x === "object") {
|
||||
>typeof x === "object" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Color | string[]
|
||||
>"object" : "object"
|
||||
|
||||
@ -51,7 +51,7 @@ function f2(x: Color | string | string[]) {
|
||||
}
|
||||
if (typeof x === "number") {
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Color | string[]
|
||||
>"number" : "number"
|
||||
|
||||
@ -72,7 +72,7 @@ function f2(x: Color | string | string[]) {
|
||||
}
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Color | string[]
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ declare module "indirect" {
|
||||
>"indirect" : typeof import("indirect")
|
||||
|
||||
export default typeof Foo.default;
|
||||
>typeof Foo.default : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof Foo.default : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>Foo.default : number
|
||||
>Foo : typeof Foo
|
||||
>default : number
|
||||
@ -41,7 +41,7 @@ declare module "indirect2" {
|
||||
>"indirect2" : typeof import("indirect2")
|
||||
|
||||
export = typeof Foo2;
|
||||
>typeof Foo2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof Foo2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>Foo2 : number
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ function f() {
|
||||
|
||||
return typeof class {} === "function";
|
||||
>typeof class {} === "function" : boolean
|
||||
>typeof class {} : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof class {} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>class {} : typeof (Anonymous class)
|
||||
>"function" : "function"
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ function isNumber(x: any): x is number {
|
||||
|
||||
return typeof x === "number";
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
>"number" : "number"
|
||||
}
|
||||
|
||||
@ -100,17 +100,17 @@ var r6 = foo6(1);
|
||||
>1 : 1
|
||||
|
||||
function foo7(x) {
|
||||
>foo7 : (x: any) => "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>foo7 : (x: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
|
||||
return typeof x;
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
}
|
||||
var r7 = foo7(1);
|
||||
>r7 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>foo7(1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>foo7 : (x: any) => "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>r7 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>foo7(1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>foo7 : (x: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>1 : 1
|
||||
|
||||
// object types
|
||||
|
||||
@ -182,7 +182,7 @@ declare var A;
|
||||
>(<any>typeof A).x : any
|
||||
>(<any>typeof A) : any
|
||||
><any>typeof A : any
|
||||
>typeof A : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof A : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>A : any
|
||||
>x : any
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ async function f() {
|
||||
>0 : 0
|
||||
|
||||
typeof await 0;
|
||||
>typeof await 0 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>await 0 : 0
|
||||
>0 : 0
|
||||
|
||||
@ -21,7 +21,7 @@ async function f() {
|
||||
>await void <string> typeof <number> void await 0 : undefined
|
||||
>void <string> typeof <number> void await 0 : undefined
|
||||
><string> typeof <number> void await 0 : string
|
||||
>typeof <number> void await 0 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof <number> void await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
><number> void await 0 : number
|
||||
>void await 0 : undefined
|
||||
>await 0 : 0
|
||||
|
||||
@ -68,7 +68,7 @@ function monaLisa(sb) {
|
||||
return typeof sb === 'string' ? 1 : 2;
|
||||
>typeof sb === 'string' ? 1 : 2 : 1 | 2
|
||||
>typeof sb === 'string' : boolean
|
||||
>typeof sb : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof sb : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>sb : any
|
||||
>'string' : "string"
|
||||
>1 : 1
|
||||
|
||||
@ -18,7 +18,7 @@ var x: StringTree;
|
||||
|
||||
if (typeof x !== "string") {
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : StringTree
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ xx = (typeof xx, 'unused');
|
||||
>xx : any
|
||||
>(typeof xx, 'unused') : "unused"
|
||||
>typeof xx, 'unused' : "unused"
|
||||
>typeof xx : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof xx : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>xx : any
|
||||
>'unused' : "unused"
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ true ? exprString1 : exprBoolean1; // union
|
||||
typeof "123" == "string" ? exprBoolean1 : exprBoolean2;
|
||||
>typeof "123" == "string" ? exprBoolean1 : exprBoolean2 : boolean
|
||||
>typeof "123" == "string" : boolean
|
||||
>typeof "123" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof "123" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>"123" : "123"
|
||||
>"string" : "string"
|
||||
>exprBoolean1 : boolean
|
||||
@ -260,7 +260,7 @@ var resultIsBoolean3 = typeof "123" == "string" ? exprBoolean1 : exprBoolean2;
|
||||
>resultIsBoolean3 : boolean
|
||||
>typeof "123" == "string" ? exprBoolean1 : exprBoolean2 : boolean
|
||||
>typeof "123" == "string" : boolean
|
||||
>typeof "123" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof "123" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>"123" : "123"
|
||||
>"string" : "string"
|
||||
>exprBoolean1 : boolean
|
||||
@ -297,7 +297,7 @@ var resultIsStringOrBoolean4 = typeof "123" === "string" ? exprString1 : exprBoo
|
||||
>resultIsStringOrBoolean4 : string | boolean
|
||||
>typeof "123" === "string" ? exprString1 : exprBoolean1 : string | boolean
|
||||
>typeof "123" === "string" : boolean
|
||||
>typeof "123" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof "123" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>"123" : "123"
|
||||
>"string" : "string"
|
||||
>exprString1 : string
|
||||
|
||||
@ -121,7 +121,7 @@ var array = ["1", "2", "3"];
|
||||
|
||||
typeof condString ? exprAny1 : exprAny2;
|
||||
>typeof condString ? exprAny1 : exprAny2 : any
|
||||
>typeof condString : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof condString : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>condString : string
|
||||
>exprAny1 : any
|
||||
>exprAny2 : any
|
||||
@ -252,7 +252,7 @@ var resultIsStringOrBoolean2 = "hello" ? exprString1 : exprBoolean1; // union
|
||||
var resultIsAny3 = typeof condString ? exprAny1 : exprAny2;
|
||||
>resultIsAny3 : any
|
||||
>typeof condString ? exprAny1 : exprAny2 : any
|
||||
>typeof condString : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof condString : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>condString : string
|
||||
>exprAny1 : any
|
||||
>exprAny2 : any
|
||||
@ -295,7 +295,7 @@ var resultIsObject3 = array[1] ? exprIsObject1 : exprIsObject2;
|
||||
var resultIsStringOrBoolean3 = typeof condString ? exprString1 : exprBoolean1; // union
|
||||
>resultIsStringOrBoolean3 : string | boolean
|
||||
>typeof condString ? exprString1 : exprBoolean1 : string | boolean
|
||||
>typeof condString : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof condString : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>condString : string
|
||||
>exprString1 : string
|
||||
>exprBoolean1 : boolean
|
||||
|
||||
@ -413,13 +413,13 @@ function zeroOf<T extends number | string | boolean>(value: T) {
|
||||
>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : false | "" | 0
|
||||
>typeof value === "number" ? 0 : typeof value === "string" ? "" : false : false | "" | 0
|
||||
>typeof value === "number" : boolean
|
||||
>typeof value : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>value : T
|
||||
>"number" : "number"
|
||||
>0 : 0
|
||||
>typeof value === "string" ? "" : false : false | ""
|
||||
>typeof value === "string" : boolean
|
||||
>typeof value : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>value : T
|
||||
>"string" : "string"
|
||||
>"" : ""
|
||||
|
||||
@ -69,7 +69,7 @@ function isFunction<T>(value: T): value is Extract<T, Function> {
|
||||
|
||||
return typeof value === "function";
|
||||
>typeof value === "function" : boolean
|
||||
>typeof value : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>value : T
|
||||
>"function" : "function"
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ function f1() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -35,7 +35,7 @@ function f2() {
|
||||
|
||||
if (typeof x !== "string") {
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -59,7 +59,7 @@ function f3() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -82,7 +82,7 @@ function f4() {
|
||||
|
||||
if (typeof x !== "string") {
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -106,7 +106,7 @@ function f5() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ function bar(this: string | number) {
|
||||
|
||||
if (typeof this === "string") {
|
||||
>typeof this === "string" : boolean
|
||||
>typeof this : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof this : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>this : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ function f(x: string | number | boolean) {
|
||||
>y : string | number | boolean
|
||||
>"" : ""
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -36,7 +36,7 @@ function f(x: string | number | boolean) {
|
||||
>z : string | number | boolean
|
||||
>1 : 1
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ function c() {
|
||||
|
||||
if (typeof x === "string") continue;
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ function d() {
|
||||
>x : string | number | boolean
|
||||
>"" : ""
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
>x = 5 : 5
|
||||
@ -106,7 +106,7 @@ function e() {
|
||||
>"" : ""
|
||||
>0 : 0
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : number | true
|
||||
>"string" : "string"
|
||||
>x = "" || true : true
|
||||
@ -127,7 +127,7 @@ function f() {
|
||||
|
||||
for (; typeof x !== "string";) {
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -136,7 +136,7 @@ function f() {
|
||||
|
||||
if (typeof x === "number") break;
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ function f1() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -40,7 +40,7 @@ function f2() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -72,7 +72,7 @@ function f3() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ function c<T>(data: string | T): T {
|
||||
|
||||
if (typeof data === 'string') {
|
||||
>typeof data === 'string' : boolean
|
||||
>typeof data : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof data : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>data : string | T
|
||||
>'string' : "string"
|
||||
|
||||
@ -117,7 +117,7 @@ function d<T extends string>(data: string | T): never {
|
||||
|
||||
if (typeof data === 'string') {
|
||||
>typeof data === 'string' : boolean
|
||||
>typeof data : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof data : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>data : string | T
|
||||
>'string' : "string"
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ function distinguish(thing: string | number | Date) {
|
||||
|
||||
} else if (typeof thing === 'string') {
|
||||
>typeof thing === 'string' : boolean
|
||||
>typeof thing : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof thing : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>thing : string | number
|
||||
>'string' : "string"
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ function c() {
|
||||
|
||||
if (typeof x === "string") continue;
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ function foo1() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -49,7 +49,7 @@ function foo2() {
|
||||
|
||||
if (typeof x === "number") {
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ declare const envVar: string | undefined;
|
||||
|
||||
if (typeof envVar === `string`) {
|
||||
>typeof envVar === `string` : boolean
|
||||
>typeof envVar : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof envVar : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>envVar : string | undefined
|
||||
>`string` : "string"
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ export function f(x: any): x is number {
|
||||
|
||||
return typeof x === "number";
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
>"number" : "number"
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ export function f(x: any): x is I {
|
||||
|
||||
return typeof x.a === "number";
|
||||
>typeof x.a === "number" : boolean
|
||||
>typeof x.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x.a : any
|
||||
>x : any
|
||||
>a : any
|
||||
|
||||
@ -3,7 +3,7 @@ class A { }
|
||||
>A : A
|
||||
|
||||
interface Class extends (typeof A) { }
|
||||
>(typeof A) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof A : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof A) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof A : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>A : typeof A
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ function f2() {
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ function f1(x: Foo | Bar | string) {
|
||||
|
||||
if (typeof x !== 'string') {
|
||||
>typeof x !== 'string' : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Foo | Bar
|
||||
>'string' : "string"
|
||||
|
||||
@ -49,7 +49,7 @@ function f2(x: Foo | Bar | string | undefined) {
|
||||
|
||||
if (typeof x === "object") {
|
||||
>typeof x === "object" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Foo | Bar | undefined
|
||||
>"object" : "object"
|
||||
|
||||
@ -78,7 +78,7 @@ function f3(x: Foo | Bar | string | null) {
|
||||
>x && typeof x !== "string" : boolean | "" | null
|
||||
>x : string | Foo | Bar | null
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | Foo | Bar
|
||||
>"string" : "string"
|
||||
|
||||
@ -107,7 +107,7 @@ function f4(x: Foo | Bar | string | number | null) {
|
||||
>x && typeof x === "object" : boolean | "" | 0 | null
|
||||
>x : string | number | Foo | Bar | null
|
||||
>typeof x === "object" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | Foo | Bar
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ export class TestRunner {
|
||||
|
||||
if (typeof testcase.errorMessageRegEx === "string") {
|
||||
>typeof testcase.errorMessageRegEx === "string" : boolean
|
||||
>typeof testcase.errorMessageRegEx : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof testcase.errorMessageRegEx : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>testcase.errorMessageRegEx : string
|
||||
>testcase : TestCase
|
||||
>errorMessageRegEx : string
|
||||
|
||||
@ -63,7 +63,7 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
>`${typeof (t1 ** t2 ** t1) } world` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -161,14 +161,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`;
|
||||
>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,7 +222,7 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1)}`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1)}` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -63,7 +63,7 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
>`${typeof (t1 ** t2 ** t1) } world` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -161,14 +161,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`;
|
||||
>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,7 +222,7 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1)}`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1)}` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -53,7 +53,7 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) }`;
|
||||
>`${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>`${1 + typeof (t1 ** t2 ** t1) }` : string
|
||||
>1 + typeof (t1 ** t2 ** t1) : string
|
||||
>1 : 1
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -140,14 +140,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`;
|
||||
>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,14 +222,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -53,7 +53,7 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) }`;
|
||||
>`${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>`${1 + typeof (t1 ** t2 ** t1) }` : string
|
||||
>1 + typeof (t1 ** t2 ** t1) : string
|
||||
>1 : 1
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -140,14 +140,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`;
|
||||
>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,14 +222,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -53,7 +53,7 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1) }`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string
|
||||
>1 + typeof (t1 ** t2 ** t1) : string
|
||||
>1 : 1
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -140,14 +140,14 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,14 +222,14 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -53,7 +53,7 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1) }`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string
|
||||
>1 + typeof (t1 ** t2 ** t1) : string
|
||||
>1 : 1
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -140,14 +140,14 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,14 +222,14 @@ var s;
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -53,7 +53,7 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
>`${typeof (t1 ** t2 ** t1) } world` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>`${1 + typeof (t1 ** t2 ** t1) } world` : string
|
||||
>1 + typeof (t1 ** t2 ** t1) : string
|
||||
>1 : 1
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -140,14 +140,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`;
|
||||
>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,14 +222,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`;
|
||||
>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -53,7 +53,7 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
>`${typeof (t1 ** t2 ** t1) } world` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>`${1 + typeof (t1 ** t2 ** t1) } world` : string
|
||||
>1 + typeof (t1 ** t2 ** t1) : string
|
||||
>1 : 1
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -140,14 +140,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`;
|
||||
>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
@ -222,14 +222,14 @@ var s;
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`;
|
||||
>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof (t1 ** t2 ** t1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(t1 ** t2 ** t1) : number
|
||||
>t1 ** t2 ** t1 : number
|
||||
>t1 : number
|
||||
|
||||
@ -17,7 +17,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
`${typeof t1 ** t2 ** t1}`;
|
||||
>`${typeof t1 ** t2 ** t1}` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -140,13 +140,13 @@ var s;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
>`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -157,7 +157,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -165,7 +165,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -240,13 +240,13 @@ var s;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
>`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -257,7 +257,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -265,7 +265,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
|
||||
@ -54,7 +54,7 @@ var s;
|
||||
`hello ${typeof t1 ** t2 ** t1}`;
|
||||
>`hello ${typeof t1 ** t2 ** t1}` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -140,13 +140,13 @@ var s;
|
||||
`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
>`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -157,7 +157,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -165,7 +165,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -240,13 +240,13 @@ var s;
|
||||
`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
>`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -257,7 +257,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -265,7 +265,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
|
||||
@ -54,7 +54,7 @@ var s;
|
||||
`${typeof t1 ** t2 ** t1} world`;
|
||||
>`${typeof t1 ** t2 ** t1} world` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -65,7 +65,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -140,13 +140,13 @@ var s;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`;
|
||||
>`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -157,7 +157,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -165,7 +165,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -240,13 +240,13 @@ var s;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`;
|
||||
>`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!` : string
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
>t1 : number
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -257,7 +257,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
@ -265,7 +265,7 @@ var s;
|
||||
>1 + typeof t1 ** t2 ** t1 : number
|
||||
>1 : 1
|
||||
>typeof t1 ** t2 ** t1 : number
|
||||
>typeof t1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof t1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>t1 : number
|
||||
>t2 ** t1 : number
|
||||
>t2 : number
|
||||
|
||||
@ -70,34 +70,34 @@ delete temp++ ** 3;
|
||||
|
||||
typeof --temp ** 3;
|
||||
>typeof --temp ** 3 : number
|
||||
>typeof --temp : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof --temp : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
|
||||
typeof temp-- ** 3;
|
||||
>typeof temp-- ** 3 : number
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
|
||||
typeof 3 ** 4;
|
||||
>typeof 3 ** 4 : number
|
||||
>typeof 3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof 3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>3 : 3
|
||||
>4 : 4
|
||||
|
||||
typeof temp++ ** 4;
|
||||
>typeof temp++ ** 4 : number
|
||||
>typeof temp++ : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp++ : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
|
||||
typeof temp-- ** 4;
|
||||
>typeof temp-- ** 4 : number
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
@ -106,7 +106,7 @@ typeof temp-- ** 4;
|
||||
>1 ** typeof --temp ** 3 : number
|
||||
>1 : 1
|
||||
>typeof --temp ** 3 : number
|
||||
>typeof --temp : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof --temp : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
@ -115,7 +115,7 @@ typeof temp-- ** 4;
|
||||
>1 ** typeof temp-- ** 3 : number
|
||||
>1 : 1
|
||||
>typeof temp-- ** 3 : number
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
@ -124,7 +124,7 @@ typeof temp-- ** 4;
|
||||
>1 ** typeof 3 ** 4 : number
|
||||
>1 : 1
|
||||
>typeof 3 ** 4 : number
|
||||
>typeof 3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof 3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>3 : 3
|
||||
>4 : 4
|
||||
|
||||
@ -132,7 +132,7 @@ typeof temp-- ** 4;
|
||||
>1 ** typeof temp++ ** 4 : number
|
||||
>1 : 1
|
||||
>typeof temp++ ** 4 : number
|
||||
>typeof temp++ : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp++ : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
@ -141,7 +141,7 @@ typeof temp-- ** 4;
|
||||
>1 ** typeof temp-- ** 4 : number
|
||||
>1 : 1
|
||||
>typeof temp-- ** 4 : number
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
|
||||
@ -93,39 +93,39 @@ var temp: any;
|
||||
|
||||
(typeof --temp) ** 3;
|
||||
>(typeof --temp) ** 3 : number
|
||||
>(typeof --temp) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof --temp : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof --temp) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof --temp : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
|
||||
(typeof temp--) ** 3;
|
||||
>(typeof temp--) ** 3 : number
|
||||
>(typeof temp--) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof temp--) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
|
||||
(typeof 3) ** 4;
|
||||
>(typeof 3) ** 4 : number
|
||||
>(typeof 3) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof 3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof 3) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof 3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>3 : 3
|
||||
>4 : 4
|
||||
|
||||
(typeof temp++) ** 4;
|
||||
>(typeof temp++) ** 4 : number
|
||||
>(typeof temp++) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp++ : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof temp++) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp++ : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
|
||||
(typeof temp--) ** 4;
|
||||
>(typeof temp--) ** 4 : number
|
||||
>(typeof temp--) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof temp--) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
@ -134,8 +134,8 @@ var temp: any;
|
||||
>1 ** (typeof --temp) ** 3 : number
|
||||
>1 : 1
|
||||
>(typeof --temp) ** 3 : number
|
||||
>(typeof --temp) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof --temp : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof --temp) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof --temp : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
@ -144,8 +144,8 @@ var temp: any;
|
||||
>1 ** (typeof temp--) ** 3 : number
|
||||
>1 : 1
|
||||
>(typeof temp--) ** 3 : number
|
||||
>(typeof temp--) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof temp--) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : 3
|
||||
@ -154,8 +154,8 @@ var temp: any;
|
||||
>1 ** (typeof 3) ** 4 : number
|
||||
>1 : 1
|
||||
>(typeof 3) ** 4 : number
|
||||
>(typeof 3) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof 3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof 3) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof 3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>3 : 3
|
||||
>4 : 4
|
||||
|
||||
@ -163,8 +163,8 @@ var temp: any;
|
||||
>1 ** (typeof temp++) ** 4 : number
|
||||
>1 : 1
|
||||
>(typeof temp++) ** 4 : number
|
||||
>(typeof temp++) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp++ : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof temp++) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp++ : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
@ -173,8 +173,8 @@ var temp: any;
|
||||
>1 ** (typeof temp--) ** 4 : number
|
||||
>1 : 1
|
||||
>(typeof temp--) ** 4 : number
|
||||
>(typeof temp--) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof temp--) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof temp-- : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : 4
|
||||
|
||||
@ -4,7 +4,7 @@ var x = 10;
|
||||
>10 : 10
|
||||
|
||||
export = typeof x; // Ok
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : number
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
|
||||
@ -20,7 +20,7 @@ class C {
|
||||
|
||||
const x: "".typeof(this.foo);
|
||||
>x : ""
|
||||
>typeof(this.foo) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(this.foo) : () => void
|
||||
>this.foo : () => void
|
||||
>this : this
|
||||
@ -38,7 +38,7 @@ const nodes = document.getElementsByTagName("li");
|
||||
|
||||
type ItemType = "".typeof(nodes.item(0));
|
||||
>ItemType : ""
|
||||
>typeof(nodes.item(0)) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(nodes.item(0)) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(nodes.item(0)) : HTMLLIElement
|
||||
>nodes.item(0) : HTMLLIElement
|
||||
>nodes.item : (index: number) => HTMLLIElement
|
||||
@ -61,7 +61,7 @@ class C2 {
|
||||
|
||||
const x: 3.141592.typeof(this.foo);
|
||||
>x : 3.141592
|
||||
>typeof(this.foo) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(this.foo) : () => void
|
||||
>this.foo : () => void
|
||||
>this : this
|
||||
@ -79,7 +79,7 @@ const nodes2 = document.getElementsByTagName("li");
|
||||
|
||||
type ItemType2 = 4..typeof(nodes.item(0));
|
||||
>ItemType2 : 4
|
||||
>typeof(nodes.item(0)) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(nodes.item(0)) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(nodes.item(0)) : HTMLLIElement
|
||||
>nodes.item(0) : HTMLLIElement
|
||||
>nodes.item : (index: number) => HTMLLIElement
|
||||
@ -103,7 +103,7 @@ class C3 {
|
||||
const x: false.typeof(this.foo);
|
||||
>x : false
|
||||
>false : false
|
||||
>typeof(this.foo) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(this.foo) : () => void
|
||||
>this.foo : () => void
|
||||
>this : this
|
||||
@ -122,7 +122,7 @@ const nodes3 = document.getElementsByTagName("li");
|
||||
type ItemType3 = true.typeof(nodes.item(0));
|
||||
>ItemType3 : true
|
||||
>true : true
|
||||
>typeof(nodes.item(0)) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(nodes.item(0)) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(nodes.item(0)) : HTMLLIElement
|
||||
>nodes.item(0) : HTMLLIElement
|
||||
>nodes.item : (index: number) => HTMLLIElement
|
||||
|
||||
@ -3422,7 +3422,7 @@ define(function () {
|
||||
if (typeof window !== 'undefined' && window.screen) {
|
||||
>typeof window !== 'undefined' && window.screen : Screen
|
||||
>typeof window !== 'undefined' : boolean
|
||||
>typeof window : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof window : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>window : Window
|
||||
>'undefined' : "undefined"
|
||||
>window.screen : Screen
|
||||
@ -3488,7 +3488,7 @@ define(function () {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
>typeof module !== 'undefined' && module.exports : any
|
||||
>typeof module !== 'undefined' : boolean
|
||||
>typeof module : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof module : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>module : any
|
||||
>'undefined' : "undefined"
|
||||
>module.exports : any
|
||||
@ -3508,7 +3508,7 @@ define(function () {
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
>typeof define === 'function' && define.amd : any
|
||||
>typeof define === 'function' : boolean
|
||||
>typeof define : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof define : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>define : any
|
||||
>'function' : "function"
|
||||
>define.amd : any
|
||||
@ -3520,7 +3520,7 @@ define(function () {
|
||||
|
||||
} else if (typeof window !== 'undefined') {
|
||||
>typeof window !== 'undefined' : boolean
|
||||
>typeof window : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof window : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>window : Window
|
||||
>'undefined' : "undefined"
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ function fn(x: number | string) {
|
||||
|
||||
if (typeof x === 'number') {
|
||||
>typeof x === 'number' : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>'number' : "number"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ var x: StringTree;
|
||||
|
||||
if (typeof x !== "string") {
|
||||
>typeof x !== "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : StringTree
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
>Array : ArrayConstructor
|
||||
|
||||
/*1*/ typeof /*2*/ Array /*3*/;
|
||||
>typeof /*2*/ Array : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof /*2*/ Array : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>Array : ArrayConstructor
|
||||
|
||||
/*1*/ void /*2*/ Array /*3*/;
|
||||
|
||||
@ -16,7 +16,7 @@ function boxify<T>(obj: T): Boxified<T> {
|
||||
|
||||
if (typeof obj === "object") {
|
||||
>typeof obj === "object" : boolean
|
||||
>typeof obj : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof obj : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>obj : T
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ function foo(x: unknown) {
|
||||
|
||||
if (typeof x === "object") {
|
||||
>typeof x === "object" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : unknown
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ function testUnion(x: Basic) {
|
||||
>x : Basic
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : Basic
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -160,7 +160,7 @@ function testExtendsUnion<T extends Basic>(x: T) {
|
||||
>x : T
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : T
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -216,7 +216,7 @@ function testAny(x: any) {
|
||||
>x : any
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -280,7 +280,7 @@ function testUnionExplicitDefault(x: Basic) {
|
||||
>x : Basic
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : Basic
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -319,7 +319,7 @@ function testUnionImplicitDefault(x: Basic) {
|
||||
>x : Basic
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : Basic
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -357,7 +357,7 @@ function testExtendsExplicitDefault<T extends Basic>(x: T) {
|
||||
>x : T
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : T
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -397,7 +397,7 @@ function testExtendsImplicitDefault<T extends Basic>(x: T) {
|
||||
>x : T
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : T
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -444,7 +444,7 @@ function exhaustiveChecks(x: number | string | L | R): string {
|
||||
>x : string | number | R | L
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | R | L
|
||||
|
||||
case 'number': return x.toString(2);
|
||||
@ -478,7 +478,7 @@ function exhaustiveChecksGenerics<T extends L | R | number | string>(x: T): stri
|
||||
>x : T
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : T
|
||||
|
||||
case 'number': return x.toString(2);
|
||||
@ -516,7 +516,7 @@ function multipleGeneric<X extends L, Y extends R>(xy: X | Y): [X, string] | [Y,
|
||||
>xy : X | Y
|
||||
|
||||
switch (typeof xy) {
|
||||
>typeof xy : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof xy : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>xy : X | Y
|
||||
|
||||
case 'function': return [xy, xy(42)];
|
||||
@ -547,7 +547,7 @@ function multipleGenericFuse<X extends L | number, Y extends R | number>(xy: X |
|
||||
>xy : X | Y
|
||||
|
||||
switch (typeof xy) {
|
||||
>typeof xy : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof xy : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>xy : X | Y
|
||||
|
||||
case 'function': return [xy, 1];
|
||||
@ -574,7 +574,7 @@ function multipleGenericExhaustive<X extends L, Y extends R>(xy: X | Y): [X, str
|
||||
>xy : X | Y
|
||||
|
||||
switch (typeof xy) {
|
||||
>typeof xy : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof xy : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>xy : X | Y
|
||||
|
||||
case 'object': return [xy, xy.y];
|
||||
@ -600,7 +600,7 @@ function switchOrdering(x: string | number | boolean) {
|
||||
>x : string | number | boolean
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | boolean
|
||||
|
||||
case 'string': return assertString(x);
|
||||
@ -641,7 +641,7 @@ function switchOrderingWithDefault(x: string | number | boolean) {
|
||||
>x : string | number | boolean
|
||||
}
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | boolean
|
||||
|
||||
case 'string':
|
||||
@ -674,7 +674,7 @@ function fallThroughTest(x: string | number | boolean | object) {
|
||||
>x : string | number | boolean | object
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | boolean | object
|
||||
|
||||
case 'number':
|
||||
@ -720,7 +720,7 @@ function unknownNarrowing(x: unknown) {
|
||||
>x : unknown
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : unknown
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
@ -776,7 +776,7 @@ function keyofNarrowing<S extends { [K in keyof S]: string }>(k: keyof S) {
|
||||
>k1 : keyof S
|
||||
|
||||
switch (typeof k) {
|
||||
>typeof k : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof k : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>k : keyof S
|
||||
|
||||
case 'number': assertNumber(k); assertKeyofS(k); return;
|
||||
@ -813,7 +813,7 @@ function narrowingNarrows(x: {} | undefined) {
|
||||
>x : {} | undefined
|
||||
|
||||
switch (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : {} | undefined
|
||||
|
||||
case 'number': assertNumber(x); return;
|
||||
|
||||
@ -12,7 +12,7 @@ function isPet(pet: any): pet is Pet {
|
||||
|
||||
return typeof pet.name === "string";
|
||||
>typeof pet.name === "string" : boolean
|
||||
>typeof pet.name : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof pet.name : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>pet.name : any
|
||||
>pet : any
|
||||
>name : any
|
||||
|
||||
@ -9,7 +9,7 @@ function f1() {
|
||||
|
||||
if (typeof a !== 'boolean') {
|
||||
>typeof a !== 'boolean' : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : string | number | boolean
|
||||
>'boolean' : "boolean"
|
||||
|
||||
@ -34,7 +34,7 @@ function f1() {
|
||||
|
||||
if (typeof a === 'string') {
|
||||
>typeof a === 'string' : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : string | number
|
||||
>'string' : "string"
|
||||
|
||||
@ -66,7 +66,7 @@ function f2() {
|
||||
|
||||
if (typeof a === 'string') {
|
||||
>typeof a === 'string' : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : string | number
|
||||
>'string' : "string"
|
||||
|
||||
@ -78,7 +78,7 @@ function f2() {
|
||||
|
||||
if (typeof a === 'string') {
|
||||
>typeof a === 'string' : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : string
|
||||
>'string' : "string"
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ function f1(x: string | number) {
|
||||
|
||||
if (typeof x === "boolean") {
|
||||
>typeof x === "boolean" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -178,7 +178,7 @@ function f2(x: string | number) {
|
||||
|
||||
if (typeof x === "boolean") {
|
||||
>typeof x === "boolean" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"boolean" : "boolean"
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ if (a instanceof Narrow) {
|
||||
|
||||
if (typeof a === 'number') {
|
||||
>typeof a === 'number' : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : object
|
||||
>'number' : "number"
|
||||
|
||||
@ -44,7 +44,7 @@ var b: object | null
|
||||
|
||||
if (typeof b === 'object') {
|
||||
>typeof b === 'object' : boolean
|
||||
>typeof b : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>b : object
|
||||
>'object' : "object"
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ a = e; // ok
|
||||
|
||||
if (typeof b !== 'object') {
|
||||
>typeof b !== 'object' : boolean
|
||||
>typeof b : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>b : object | null
|
||||
>'object' : "object"
|
||||
|
||||
@ -72,7 +72,7 @@ if (typeof b !== 'object') {
|
||||
|
||||
if (typeof b === 'object') {
|
||||
>typeof b === 'object' : boolean
|
||||
>typeof b : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>b : object | null
|
||||
>'object' : "object"
|
||||
|
||||
@ -84,7 +84,7 @@ if (typeof b === 'object') {
|
||||
|
||||
if (typeof d === 'object') {
|
||||
>typeof d === 'object' : boolean
|
||||
>typeof d : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof d : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>d : object | null | undefined
|
||||
>'object' : "object"
|
||||
|
||||
@ -147,7 +147,7 @@ if (d === null) {
|
||||
|
||||
if (typeof d === 'undefined') {
|
||||
>typeof d === 'undefined' : boolean
|
||||
>typeof d : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof d : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>d : object | null | undefined
|
||||
>'undefined' : "undefined"
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ function attr(nameOrMap: any, value?: string): any {
|
||||
>nameOrMap && typeof nameOrMap === "object" : boolean
|
||||
>nameOrMap : any
|
||||
>typeof nameOrMap === "object" : boolean
|
||||
>typeof nameOrMap : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof nameOrMap : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>nameOrMap : any
|
||||
>"object" : "object"
|
||||
|
||||
@ -64,7 +64,7 @@ function attr2(nameOrMap: any, value?: string): string {
|
||||
>nameOrMap && typeof nameOrMap === "object" : boolean
|
||||
>nameOrMap : any
|
||||
>typeof nameOrMap === "object" : boolean
|
||||
>typeof nameOrMap : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof nameOrMap : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>nameOrMap : any
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ module Bugs {
|
||||
return typeof args[index] !== 'undefined'
|
||||
>typeof args[index] !== 'undefined' ? args[index] : match : any
|
||||
>typeof args[index] !== 'undefined' : boolean
|
||||
>typeof args[index] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof args[index] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>args[index] : any
|
||||
>args : any[]
|
||||
>index : any
|
||||
|
||||
@ -24,7 +24,7 @@ function attr(nameOrMap: any, value?: string): any {
|
||||
>nameOrMap && typeof nameOrMap === "object" : boolean
|
||||
>nameOrMap : any
|
||||
>typeof nameOrMap === "object" : boolean
|
||||
>typeof nameOrMap : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof nameOrMap : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>nameOrMap : any
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ var typescriptServiceFile = IO.readFile(typescriptServiceFileName);
|
||||
|
||||
if (typeof ActiveXObject === "function") {
|
||||
>typeof ActiveXObject === "function" : boolean
|
||||
>typeof ActiveXObject : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof ActiveXObject : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>ActiveXObject : any
|
||||
>"function" : "function"
|
||||
|
||||
@ -125,7 +125,7 @@ if (typeof ActiveXObject === "function") {
|
||||
|
||||
} else if (typeof require === "function") {
|
||||
>typeof require === "function" : boolean
|
||||
>typeof require : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof require : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>require : any
|
||||
>"function" : "function"
|
||||
|
||||
@ -998,7 +998,7 @@ module Harness {
|
||||
|
||||
if (typeof loggers[i][field] === 'function') {
|
||||
>typeof loggers[i][field] === 'function' : boolean
|
||||
>typeof loggers[i][field] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof loggers[i][field] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>loggers[i][field] : any
|
||||
>loggers[i] : ILogger
|
||||
>loggers : ILogger[]
|
||||
@ -1849,11 +1849,11 @@ module Harness {
|
||||
if (typeof WScript !== "undefined" && typeof global['WScript'].InitializeProjection !== "undefined") {
|
||||
>typeof WScript !== "undefined" && typeof global['WScript'].InitializeProjection !== "undefined" : boolean
|
||||
>typeof WScript !== "undefined" : boolean
|
||||
>typeof WScript : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof WScript : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>WScript : typeof WScript
|
||||
>"undefined" : "undefined"
|
||||
>typeof global['WScript'].InitializeProjection !== "undefined" : boolean
|
||||
>typeof global['WScript'].InitializeProjection : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof global['WScript'].InitializeProjection : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>global['WScript'].InitializeProjection : any
|
||||
>global['WScript'] : any
|
||||
>global : any
|
||||
@ -2703,7 +2703,7 @@ module Harness {
|
||||
>fileExists : (s: string) => boolean
|
||||
>s : string
|
||||
>typeof this.fileCollection[s] !== 'undefined' : boolean
|
||||
>typeof this.fileCollection[s] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof this.fileCollection[s] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>this.fileCollection[s] : any
|
||||
>this.fileCollection : {}
|
||||
>this : this
|
||||
@ -3679,7 +3679,7 @@ module Harness {
|
||||
|
||||
if (typeof target === "string") {
|
||||
>typeof target === "string" : boolean
|
||||
>typeof target : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof target : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>target : any
|
||||
>"string" : "string"
|
||||
|
||||
@ -3690,7 +3690,7 @@ module Harness {
|
||||
}
|
||||
else if (typeof target === "number") {
|
||||
>typeof target === "number" : boolean
|
||||
>typeof target : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof target : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>target : any
|
||||
>"number" : "number"
|
||||
|
||||
@ -3705,8 +3705,8 @@ module Harness {
|
||||
>Error : ErrorConstructor
|
||||
>"Expected string or number not " + (typeof target) : string
|
||||
>"Expected string or number not " : "Expected string or number not "
|
||||
>(typeof target) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof target : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(typeof target) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof target : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>target : any
|
||||
}
|
||||
|
||||
@ -7642,7 +7642,7 @@ module Harness {
|
||||
|
||||
if (typeof process !== "undefined") {
|
||||
>typeof process !== "undefined" : boolean
|
||||
>typeof process : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof process : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>process : typeof process
|
||||
>"undefined" : "undefined"
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ if (void x) {
|
||||
}
|
||||
|
||||
if (typeof x) {
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : false
|
||||
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ export function css<S extends { [K in keyof S]: string }>(styles: S, ...classNam
|
||||
}
|
||||
if (typeof arg == "string") {
|
||||
>typeof arg == "string" : boolean
|
||||
>typeof arg : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof arg : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>arg : ClassNameArg<S>
|
||||
>"string" : "string"
|
||||
|
||||
@ -64,7 +64,7 @@ export function css<S extends { [K in keyof S]: string }>(styles: S, ...classNam
|
||||
}
|
||||
if (typeof arg == "object") {
|
||||
>typeof arg == "object" : boolean
|
||||
>typeof arg : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof arg : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>arg : ClassNameArg<S>
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ import * as while from "foo"
|
||||
>"foo" : "foo"
|
||||
|
||||
var typeof = 10;
|
||||
>typeof : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
> : any
|
||||
>10 : 10
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ function isBoolean(value) {
|
||||
|
||||
return typeof value === "boolean";
|
||||
>typeof value === "boolean" : boolean
|
||||
>typeof value : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>value : any
|
||||
>"boolean" : "boolean"
|
||||
}
|
||||
@ -110,7 +110,7 @@ function isNumber(x) { return typeof x === "number" }
|
||||
>isNumber : (x: unknown) => x is number
|
||||
>x : unknown
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : unknown
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ function stringify1(anything: { toString(): string } | undefined): string {
|
||||
return typeof anything === "string" ? anything.toUpperCase() : "";
|
||||
>typeof anything === "string" ? anything.toUpperCase() : "" : string
|
||||
>typeof anything === "string" : boolean
|
||||
>typeof anything : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof anything : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>anything : { toString(): string; } | undefined
|
||||
>"string" : "string"
|
||||
>anything.toUpperCase() : string
|
||||
@ -24,7 +24,7 @@ function stringify2(anything: {} | undefined): string {
|
||||
return typeof anything === "string" ? anything.toUpperCase() : "";
|
||||
>typeof anything === "string" ? anything.toUpperCase() : "" : string
|
||||
>typeof anything === "string" : boolean
|
||||
>typeof anything : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof anything : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>anything : {} | undefined
|
||||
>"string" : "string"
|
||||
>anything.toUpperCase() : string
|
||||
@ -41,7 +41,7 @@ function stringify3(anything: unknown | undefined): string { // should simplify
|
||||
return typeof anything === "string" ? anything.toUpperCase() : "";
|
||||
>typeof anything === "string" ? anything.toUpperCase() : "" : string
|
||||
>typeof anything === "string" : boolean
|
||||
>typeof anything : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof anything : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>anything : unknown
|
||||
>"string" : "string"
|
||||
>anything.toUpperCase() : string
|
||||
@ -59,7 +59,7 @@ function stringify4(anything: { toString?(): string } | undefined): string {
|
||||
return typeof anything === "string" ? anything.toUpperCase() : "";
|
||||
>typeof anything === "string" ? anything.toUpperCase() : "" : string
|
||||
>typeof anything === "string" : boolean
|
||||
>typeof anything : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof anything : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>anything : {} | undefined
|
||||
>"string" : "string"
|
||||
>anything.toUpperCase() : string
|
||||
|
||||
@ -60,11 +60,11 @@ switch (x) {
|
||||
>'a' : "a"
|
||||
|
||||
case typeof x:
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
|
||||
case typeof M:
|
||||
>typeof M : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof M : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>M : typeof M
|
||||
|
||||
case M.fn(1):
|
||||
|
||||
@ -10,7 +10,7 @@ x;
|
||||
|
||||
if (typeof x === "symbol") {
|
||||
>typeof x === "symbol" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : symbol | Foo
|
||||
>"symbol" : "symbol"
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ x;
|
||||
|
||||
if (typeof x === "object") {
|
||||
>typeof x === "object" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : symbol | Foo
|
||||
>"object" : "object"
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ x;
|
||||
|
||||
if (typeof x === "number") {
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : symbol | E
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ void Symbol.toPrimitive;
|
||||
>toPrimitive : symbol
|
||||
|
||||
typeof Symbol.toStringTag;
|
||||
>typeof Symbol.toStringTag : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof Symbol.toStringTag : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>Symbol.toStringTag : symbol
|
||||
>Symbol : SymbolConstructor
|
||||
>toStringTag : symbol
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/templates/templateStringInTypeOf.ts ===
|
||||
var x = typeof `abc${ 123 }def`;
|
||||
>x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof `abc${ 123 }def` : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof `abc${ 123 }def` : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>`abc${ 123 }def` : string
|
||||
>123 : 123
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts ===
|
||||
var x = typeof `abc${ 123 }def`;
|
||||
>x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof `abc${ 123 }def` : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof `abc${ 123 }def` : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>`abc${ 123 }def` : string
|
||||
>123 : 123
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
var x = `abc${ typeof "hi" }def`;
|
||||
>x : string
|
||||
>`abc${ typeof "hi" }def` : string
|
||||
>typeof "hi" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof "hi" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>"hi" : "hi"
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
var x = `abc${ typeof "hi" }def`;
|
||||
>x : string
|
||||
>`abc${ typeof "hi" }def` : string
|
||||
>typeof "hi" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof "hi" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>"hi" : "hi"
|
||||
|
||||
|
||||
@ -13,6 +13,6 @@ const numbers = filter<number>((x): x is number => 'number' == typeof x)
|
||||
>x : any
|
||||
>'number' == typeof x : boolean
|
||||
>'number' : "number"
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ throw aModule;
|
||||
>aModule : typeof M
|
||||
|
||||
throw typeof M;
|
||||
>typeof M : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof M : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>M : typeof M
|
||||
|
||||
var aClassInModule = new M.A();
|
||||
|
||||
@ -10,7 +10,7 @@ let x: number|string|E|V;
|
||||
|
||||
if (typeof x === "number") {
|
||||
>typeof x === "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | E | V
|
||||
>"number" : "number"
|
||||
|
||||
@ -24,7 +24,7 @@ else {
|
||||
|
||||
if (typeof x !== "number") {
|
||||
>typeof x !== "number" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number | E | V
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ let x: string | number;
|
||||
|
||||
if (typeof x === "string") {
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ function hasLegs(x: Beast): x is Legged { return x && typeof x.legs === 'number'
|
||||
>x && typeof x.legs === 'number' : boolean
|
||||
>x : Beast
|
||||
>typeof x.legs === 'number' : boolean
|
||||
>typeof x.legs : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x.legs : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x.legs : number | undefined
|
||||
>x : Beast
|
||||
>legs : number | undefined
|
||||
|
||||
@ -7,13 +7,13 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool === 'boolean' && !strOrBool) : boolean
|
||||
>typeof strOrBool === 'boolean' && !strOrBool : boolean
|
||||
>typeof strOrBool === 'boolean' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : "boolean"
|
||||
>!strOrBool : boolean
|
||||
>strOrBool : boolean
|
||||
>typeof strOrBool === 'string' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | true
|
||||
>'string' : "string"
|
||||
|
||||
@ -22,7 +22,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool === 'string') ? strOrBool : "string" : string
|
||||
>(typeof strOrBool === 'string') : boolean
|
||||
>typeof strOrBool === 'string' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'string' : "string"
|
||||
>strOrBool : string
|
||||
@ -33,7 +33,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool === 'boolean') ? strOrBool : false : boolean
|
||||
>(typeof strOrBool === 'boolean') : boolean
|
||||
>typeof strOrBool === 'boolean' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : "boolean"
|
||||
>strOrBool : boolean
|
||||
@ -44,7 +44,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool !== 'boolean') ? strOrBool : "string" : string
|
||||
>(typeof strOrBool !== 'boolean') : boolean
|
||||
>typeof strOrBool !== 'boolean' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : "boolean"
|
||||
>strOrBool : string
|
||||
@ -55,7 +55,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool !== 'string') ? strOrBool : false : boolean
|
||||
>(typeof strOrBool !== 'string') : boolean
|
||||
>typeof strOrBool !== 'string' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'string' : "string"
|
||||
>strOrBool : boolean
|
||||
@ -67,13 +67,13 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool !== 'string' && !strOrBool) : boolean
|
||||
>typeof strOrBool !== 'string' && !strOrBool : boolean
|
||||
>typeof strOrBool !== 'string' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'string' : "string"
|
||||
>!strOrBool : boolean
|
||||
>strOrBool : boolean
|
||||
>typeof strOrBool !== 'boolean' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | true
|
||||
>'boolean' : "boolean"
|
||||
|
||||
@ -82,7 +82,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool === 'string') ? strOrBool : "string" : string
|
||||
>(typeof strOrBool === 'string') : boolean
|
||||
>typeof strOrBool === 'string' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'string' : "string"
|
||||
>strOrBool : string
|
||||
@ -93,7 +93,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool === 'boolean') ? strOrBool : false : boolean
|
||||
>(typeof strOrBool === 'boolean') : boolean
|
||||
>typeof strOrBool === 'boolean' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : "boolean"
|
||||
>strOrBool : boolean
|
||||
@ -104,7 +104,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool !== 'boolean') ? strOrBool : "string" : string
|
||||
>(typeof strOrBool !== 'boolean') : boolean
|
||||
>typeof strOrBool !== 'boolean' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : "boolean"
|
||||
>strOrBool : string
|
||||
@ -115,7 +115,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool !== 'string') ? strOrBool : false : boolean
|
||||
>(typeof strOrBool !== 'string') : boolean
|
||||
>typeof strOrBool !== 'string' : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>'string' : "string"
|
||||
>strOrBool : boolean
|
||||
|
||||
@ -39,11 +39,11 @@ var strOrNumOrBoolOrC: string | number | boolean | C;
|
||||
if (typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") {
|
||||
>typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool !== "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -63,15 +63,15 @@ if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "numbe
|
||||
>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBoolOrC !== "boolean" : boolean
|
||||
>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC !== "string" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : string | number | boolean | C
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBoolOrC !== "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : number | boolean | C
|
||||
>"number" : "number"
|
||||
>typeof strOrNumOrBoolOrC !== "boolean" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : boolean | C
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -91,15 +91,15 @@ if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "numbe
|
||||
>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" && typeof strOrNumOrBool === "boolean" : boolean
|
||||
>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC !== "string" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : string | number | boolean | C
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBoolOrC !== "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : number | boolean | C
|
||||
>"number" : "number"
|
||||
>typeof strOrNumOrBool === "boolean" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -126,7 +126,7 @@ else {
|
||||
if (typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool) {
|
||||
>typeof strOrNumOrBool !== "string" && numOrBool !== strOrNumOrBool : boolean
|
||||
>typeof strOrNumOrBool !== "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>numOrBool !== strOrNumOrBool : boolean
|
||||
|
||||
@ -39,11 +39,11 @@ var strOrNumOrBoolOrC: string | number | boolean | C;
|
||||
if (typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") {
|
||||
>typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number" : boolean
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBool === "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -63,15 +63,15 @@ if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "numbe
|
||||
>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBoolOrC === "boolean" : boolean
|
||||
>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC === "string" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : string | number | boolean | C
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBoolOrC === "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : number | boolean | C
|
||||
>"number" : "number"
|
||||
>typeof strOrNumOrBoolOrC === "boolean" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : boolean | C
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -91,15 +91,15 @@ if (typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "numbe
|
||||
>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" || typeof strOrNumOrBool !== "boolean" : boolean
|
||||
>typeof strOrNumOrBoolOrC === "string" || typeof strOrNumOrBoolOrC === "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC === "string" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : string | number | boolean | C
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBoolOrC === "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBoolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBoolOrC : number | boolean | C
|
||||
>"number" : "number"
|
||||
>typeof strOrNumOrBool !== "boolean" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -126,7 +126,7 @@ else {
|
||||
if (typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool) {
|
||||
>typeof strOrNumOrBool === "string" || numOrBool !== strOrNumOrBool : boolean
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>numOrBool !== strOrNumOrBool : boolean
|
||||
|
||||
@ -26,7 +26,7 @@ if (!(typeof strOrNum === "string")) {
|
||||
>!(typeof strOrNum === "string") : boolean
|
||||
>(typeof strOrNum === "string") : boolean
|
||||
>typeof strOrNum === "string" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -47,11 +47,11 @@ if (!(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number"))
|
||||
>(typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number") : boolean
|
||||
>typeof strOrNumOrBool === "string" || typeof strOrNumOrBool === "number" : boolean
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBool === "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -72,13 +72,13 @@ if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number
|
||||
>!(typeof strOrNumOrBool !== "string") : boolean
|
||||
>(typeof strOrNumOrBool !== "string") : boolean
|
||||
>typeof strOrNumOrBool !== "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>!(typeof strOrNumOrBool !== "number") : boolean
|
||||
>(typeof strOrNumOrBool !== "number") : boolean
|
||||
>typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -99,11 +99,11 @@ if (!(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number"))
|
||||
>(typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number") : boolean
|
||||
>typeof strOrNumOrBool !== "string" && typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool !== "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -124,13 +124,13 @@ if (!(typeof strOrNumOrBool === "string") && !(typeof strOrNumOrBool === "number
|
||||
>!(typeof strOrNumOrBool === "string") : boolean
|
||||
>(typeof strOrNumOrBool === "string") : boolean
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>!(typeof strOrNumOrBool === "number") : boolean
|
||||
>(typeof strOrNumOrBool === "number") : boolean
|
||||
>typeof strOrNumOrBool === "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -151,7 +151,7 @@ if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) {
|
||||
>!(typeof strOrNumOrBool === "string") : boolean
|
||||
>(typeof strOrNumOrBool === "string") : boolean
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
>numOrBool !== strOrNumOrBool : boolean
|
||||
|
||||
@ -42,7 +42,7 @@ var c: C;
|
||||
// - when false, removes the primitive type from the type of x.
|
||||
if (typeof strOrBool === "boolean") {
|
||||
>typeof strOrBool === "boolean" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -59,7 +59,7 @@ else {
|
||||
}
|
||||
if (typeof numOrBool === "boolean") {
|
||||
>typeof numOrBool === "boolean" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -76,7 +76,7 @@ else {
|
||||
}
|
||||
if (typeof strOrNumOrBool === "boolean") {
|
||||
>typeof strOrNumOrBool === "boolean" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -93,7 +93,7 @@ else {
|
||||
}
|
||||
if (typeof boolOrC === "boolean") {
|
||||
>typeof boolOrC === "boolean" : boolean
|
||||
>typeof boolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof boolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>boolOrC : boolean | C
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -111,7 +111,7 @@ else {
|
||||
|
||||
if (typeof strOrNum === "boolean") {
|
||||
>typeof strOrNum === "boolean" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -131,7 +131,7 @@ else {
|
||||
// - when false, narrows the type of x by typeof x === s when true.
|
||||
if (typeof strOrBool !== "boolean") {
|
||||
>typeof strOrBool !== "boolean" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -148,7 +148,7 @@ else {
|
||||
}
|
||||
if (typeof numOrBool !== "boolean") {
|
||||
>typeof numOrBool !== "boolean" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -165,7 +165,7 @@ else {
|
||||
}
|
||||
if (typeof strOrNumOrBool !== "boolean") {
|
||||
>typeof strOrNumOrBool !== "boolean" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -182,7 +182,7 @@ else {
|
||||
}
|
||||
if (typeof boolOrC !== "boolean") {
|
||||
>typeof boolOrC !== "boolean" : boolean
|
||||
>typeof boolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof boolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>boolOrC : boolean | C
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -200,7 +200,7 @@ else {
|
||||
|
||||
if (typeof strOrNum !== "boolean") {
|
||||
>typeof strOrNum !== "boolean" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"boolean" : "boolean"
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(13,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r1' must be of type 'string', but here has type 'number'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(20,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r2' must be of type 'boolean', but here has type 'string'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(27,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r3' must be of type 'number', but here has type 'boolean'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(30,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(30,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts(34,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'C', but here has type 'string'.
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfEqualEqualHa
|
||||
|
||||
if (typeof strOrC == "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
var r4 = strOrC; // string | C
|
||||
}
|
||||
else {
|
||||
|
||||
@ -18,7 +18,7 @@ var strOrC: string | C;
|
||||
// typeof x == s has not effect on typeguard
|
||||
if (typeof strOrNum == "string") {
|
||||
>typeof strOrNum == "string" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -34,7 +34,7 @@ else {
|
||||
|
||||
if (typeof strOrBool == "boolean") {
|
||||
>typeof strOrBool == "boolean" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -50,7 +50,7 @@ else {
|
||||
|
||||
if (typeof numOrBool == "number") {
|
||||
>typeof numOrBool == "number" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -66,7 +66,7 @@ else {
|
||||
|
||||
if (typeof strOrC == "Object") {
|
||||
>typeof strOrC == "Object" : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"Object" : "Object"
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ function f1(x: any) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : any
|
||||
>"function" : "function"
|
||||
|
||||
@ -20,7 +20,7 @@ function f2(x: unknown) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : unknown
|
||||
>"function" : "function"
|
||||
|
||||
@ -35,7 +35,7 @@ function f3(x: {}) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : {}
|
||||
>"function" : "function"
|
||||
|
||||
@ -50,7 +50,7 @@ function f4<T>(x: T) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : T
|
||||
>"function" : "function"
|
||||
|
||||
@ -66,7 +66,7 @@ function f5(x: { s: string }) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : { s: string; }
|
||||
>"function" : "function"
|
||||
|
||||
@ -81,7 +81,7 @@ function f6(x: () => string) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : () => string
|
||||
>"function" : "function"
|
||||
|
||||
@ -96,7 +96,7 @@ function f10(x: string | (() => string)) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | (() => string)
|
||||
>"function" : "function"
|
||||
|
||||
@ -116,7 +116,7 @@ function f11(x: { s: string } | (() => string)) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : { s: string; } | (() => string)
|
||||
>"function" : "function"
|
||||
|
||||
@ -137,7 +137,7 @@ function f12(x: { s: string } | { n: number }) {
|
||||
|
||||
if (typeof x === "function") {
|
||||
>typeof x === "function" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : { s: string; } | { n: number; }
|
||||
>"function" : "function"
|
||||
|
||||
@ -169,7 +169,7 @@ function f100<T, K extends keyof T>(obj: T, keys: K[]) : void {
|
||||
|
||||
if (typeof item == 'function')
|
||||
>typeof item == 'function' : boolean
|
||||
>typeof item : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof item : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>item : T[K]
|
||||
>'function' : "function"
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ var func: () => void;
|
||||
if ("string" === typeof strOrNum) {
|
||||
>"string" === typeof strOrNum : boolean
|
||||
>"string" : "string"
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
|
||||
str = strOrNum;
|
||||
@ -43,7 +43,7 @@ else {
|
||||
if ("function" === typeof strOrFunc) {
|
||||
>"function" === typeof strOrFunc : boolean
|
||||
>"function" : "function"
|
||||
>typeof strOrFunc : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrFunc : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrFunc : string | (() => void)
|
||||
|
||||
func = strOrFunc;
|
||||
@ -60,7 +60,7 @@ else {
|
||||
if ("number" === typeof numOrBool) {
|
||||
>"number" === typeof numOrBool : boolean
|
||||
>"number" : "number"
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
|
||||
num = numOrBool;
|
||||
@ -77,7 +77,7 @@ else {
|
||||
if ("boolean" === typeof strOrBool) {
|
||||
>"boolean" === typeof strOrBool : boolean
|
||||
>"boolean" : "boolean"
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
|
||||
bool = strOrBool;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(13,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r1' must be of type 'number', but here has type 'string'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(20,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r2' must be of type 'string', but here has type 'boolean'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(27,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r3' must be of type 'boolean', but here has type 'number'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(30,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(30,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts(34,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'string', but here has type 'C'.
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasN
|
||||
|
||||
if (typeof strOrC != "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
var r4 = strOrC; // string | C
|
||||
}
|
||||
else {
|
||||
|
||||
@ -18,7 +18,7 @@ var strOrC: string | C;
|
||||
// typeof x != s has not effect on typeguard
|
||||
if (typeof strOrNum != "string") {
|
||||
>typeof strOrNum != "string" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -34,7 +34,7 @@ else {
|
||||
|
||||
if (typeof strOrBool != "boolean") {
|
||||
>typeof strOrBool != "boolean" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -50,7 +50,7 @@ else {
|
||||
|
||||
if (typeof numOrBool != "number") {
|
||||
>typeof numOrBool != "number" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -66,7 +66,7 @@ else {
|
||||
|
||||
if (typeof strOrC != "Object") {
|
||||
>typeof strOrC != "Object" : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"Object" : "Object"
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ var c: C;
|
||||
// - when false, removes the primitive type from the type of x.
|
||||
if (typeof strOrNum === "number") {
|
||||
>typeof strOrNum === "number" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"number" : "number"
|
||||
|
||||
@ -59,7 +59,7 @@ else {
|
||||
}
|
||||
if (typeof numOrBool === "number") {
|
||||
>typeof numOrBool === "number" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -75,7 +75,7 @@ else {
|
||||
}
|
||||
if (typeof strOrNumOrBool === "number") {
|
||||
>typeof strOrNumOrBool === "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -92,7 +92,7 @@ else {
|
||||
}
|
||||
if (typeof numOrC === "number") {
|
||||
>typeof numOrC === "number" : boolean
|
||||
>typeof numOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrC : number | C
|
||||
>"number" : "number"
|
||||
|
||||
@ -110,7 +110,7 @@ else {
|
||||
|
||||
if (typeof strOrBool === "number") {
|
||||
>typeof strOrBool === "number" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -129,7 +129,7 @@ else {
|
||||
// - when false, narrows the type of x by typeof x === s when true.
|
||||
if (typeof strOrNum !== "number") {
|
||||
>typeof strOrNum !== "number" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"number" : "number"
|
||||
|
||||
@ -146,7 +146,7 @@ else {
|
||||
}
|
||||
if (typeof numOrBool !== "number") {
|
||||
>typeof numOrBool !== "number" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -162,7 +162,7 @@ else {
|
||||
}
|
||||
if (typeof strOrNumOrBool !== "number") {
|
||||
>typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"number" : "number"
|
||||
|
||||
@ -179,7 +179,7 @@ else {
|
||||
}
|
||||
if (typeof numOrC !== "number") {
|
||||
>typeof numOrC !== "number" : boolean
|
||||
>typeof numOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrC : number | C
|
||||
>"number" : "number"
|
||||
|
||||
@ -197,7 +197,7 @@ else {
|
||||
|
||||
if (typeof strOrBool !== "number") {
|
||||
>typeof strOrBool !== "number" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(21,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(27,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(33,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(21,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(27,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(33,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(40,5): error TS2322: Type 'string | C' is not assignable to type 'C'.
|
||||
Type 'string' is not assignable to type 'C'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(43,9): error TS2322: Type 'string | C' is not assignable to type 'string'.
|
||||
Type 'C' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(46,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(56,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(62,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(68,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(46,5): error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(56,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(62,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(68,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,5): error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts (10 errors) ====
|
||||
@ -35,7 +35,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
|
||||
if (typeof strOrC === "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
c = strOrC; // C
|
||||
}
|
||||
else {
|
||||
@ -43,7 +43,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
}
|
||||
if (typeof numOrC === "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
c = numOrC; // C
|
||||
}
|
||||
else {
|
||||
@ -51,7 +51,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
}
|
||||
if (typeof boolOrC === "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
c = boolOrC; // C
|
||||
}
|
||||
else {
|
||||
@ -72,7 +72,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
|
||||
if (typeof strOrNumOrBool === "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
let q1: {} = strOrNumOrBool; // {}
|
||||
}
|
||||
else {
|
||||
@ -84,7 +84,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
// - when false, narrows the type of x by typeof x === s when true.
|
||||
if (typeof strOrC !== "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
var r2: string = strOrC; // string
|
||||
}
|
||||
else {
|
||||
@ -92,7 +92,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
}
|
||||
if (typeof numOrC !== "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
var r3: number = numOrC; // number
|
||||
}
|
||||
else {
|
||||
@ -100,7 +100,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
}
|
||||
if (typeof boolOrC !== "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
var r4: boolean = boolOrC; // boolean
|
||||
}
|
||||
else {
|
||||
@ -109,7 +109,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfOther.ts(75,
|
||||
|
||||
if (typeof strOrNumOrBool !== "Object") {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
!!! error TS2367: This condition will always return 'true' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Object"' have no overlap.
|
||||
let q1: string | number | boolean = strOrNumOrBool; // string | number | boolean
|
||||
}
|
||||
else {
|
||||
|
||||
@ -46,7 +46,7 @@ var c: C;
|
||||
|
||||
if (typeof strOrC === "Object") {
|
||||
>typeof strOrC === "Object" : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -62,7 +62,7 @@ else {
|
||||
}
|
||||
if (typeof numOrC === "Object") {
|
||||
>typeof numOrC === "Object" : boolean
|
||||
>typeof numOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrC : number | C
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -78,7 +78,7 @@ else {
|
||||
}
|
||||
if (typeof boolOrC === "Object") {
|
||||
>typeof boolOrC === "Object" : boolean
|
||||
>typeof boolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof boolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>boolOrC : boolean | C
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -94,7 +94,7 @@ else {
|
||||
}
|
||||
if (typeof strOrC === "Object" as string) { // comparison is OK with cast
|
||||
>typeof strOrC === "Object" as string : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"Object" as string : string
|
||||
>"Object" : "Object"
|
||||
@ -112,7 +112,7 @@ else {
|
||||
|
||||
if (typeof strOrNumOrBool === "Object") {
|
||||
>typeof strOrNumOrBool === "Object" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -131,7 +131,7 @@ else {
|
||||
// - when false, narrows the type of x by typeof x === s when true.
|
||||
if (typeof strOrC !== "Object") {
|
||||
>typeof strOrC !== "Object" : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -147,7 +147,7 @@ else {
|
||||
}
|
||||
if (typeof numOrC !== "Object") {
|
||||
>typeof numOrC !== "Object" : boolean
|
||||
>typeof numOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrC : number | C
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -163,7 +163,7 @@ else {
|
||||
}
|
||||
if (typeof boolOrC !== "Object") {
|
||||
>typeof boolOrC !== "Object" : boolean
|
||||
>typeof boolOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof boolOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>boolOrC : boolean | C
|
||||
>"Object" : "Object"
|
||||
|
||||
@ -180,7 +180,7 @@ else {
|
||||
|
||||
if (typeof strOrNumOrBool !== "Object") {
|
||||
>typeof strOrNumOrBool !== "Object" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"Object" : "Object"
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ let b: {toString(): string};
|
||||
|
||||
if (typeof a === "number") {
|
||||
>typeof a === "number" : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : {}
|
||||
>"number" : "number"
|
||||
|
||||
@ -18,7 +18,7 @@ if (typeof a === "number") {
|
||||
}
|
||||
if (typeof a === "string") {
|
||||
>typeof a === "string" : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : {}
|
||||
>"string" : "string"
|
||||
|
||||
@ -28,7 +28,7 @@ if (typeof a === "string") {
|
||||
}
|
||||
if (typeof a === "boolean") {
|
||||
>typeof a === "boolean" : boolean
|
||||
>typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>a : {}
|
||||
>"boolean" : "boolean"
|
||||
|
||||
@ -39,7 +39,7 @@ if (typeof a === "boolean") {
|
||||
|
||||
if (typeof b === "number") {
|
||||
>typeof b === "number" : boolean
|
||||
>typeof b : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>b : { toString(): string; }
|
||||
>"number" : "number"
|
||||
|
||||
@ -49,7 +49,7 @@ if (typeof b === "number") {
|
||||
}
|
||||
if (typeof b === "string") {
|
||||
>typeof b === "string" : boolean
|
||||
>typeof b : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>b : { toString(): string; }
|
||||
>"string" : "string"
|
||||
|
||||
@ -59,7 +59,7 @@ if (typeof b === "string") {
|
||||
}
|
||||
if (typeof b === "boolean") {
|
||||
>typeof b === "boolean" : boolean
|
||||
>typeof b : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>b : { toString(): string; }
|
||||
>"boolean" : "boolean"
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ var c: C;
|
||||
// - when false, removes the primitive type from the type of x.
|
||||
if (typeof strOrNum === "string") {
|
||||
>typeof strOrNum === "string" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -59,7 +59,7 @@ else {
|
||||
}
|
||||
if (typeof strOrBool === "string") {
|
||||
>typeof strOrBool === "string" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -76,7 +76,7 @@ else {
|
||||
}
|
||||
if (typeof strOrNumOrBool === "string") {
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -93,7 +93,7 @@ else {
|
||||
}
|
||||
if (typeof strOrC === "string") {
|
||||
>typeof strOrC === "string" : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"string" : "string"
|
||||
|
||||
@ -111,7 +111,7 @@ else {
|
||||
|
||||
if (typeof numOrBool === "string") {
|
||||
>typeof numOrBool === "string" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -130,7 +130,7 @@ else {
|
||||
// - when false, narrows the type of x by typeof x === s when true.
|
||||
if (typeof strOrNum !== "string") {
|
||||
>typeof strOrNum !== "string" : boolean
|
||||
>typeof strOrNum : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNum : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNum : string | number
|
||||
>"string" : "string"
|
||||
|
||||
@ -147,7 +147,7 @@ else {
|
||||
}
|
||||
if (typeof strOrBool !== "string") {
|
||||
>typeof strOrBool !== "string" : boolean
|
||||
>typeof strOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrBool : string | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -164,7 +164,7 @@ else {
|
||||
}
|
||||
if (typeof strOrNumOrBool !== "string") {
|
||||
>typeof strOrNumOrBool !== "string" : boolean
|
||||
>typeof strOrNumOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrNumOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>"string" : "string"
|
||||
|
||||
@ -181,7 +181,7 @@ else {
|
||||
}
|
||||
if (typeof strOrC !== "string") {
|
||||
>typeof strOrC !== "string" : boolean
|
||||
>typeof strOrC : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof strOrC : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>strOrC : string | C
|
||||
>"string" : "string"
|
||||
|
||||
@ -199,7 +199,7 @@ else {
|
||||
|
||||
if (typeof numOrBool !== "string") {
|
||||
>typeof numOrBool !== "string" : boolean
|
||||
>typeof numOrBool : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof numOrBool : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>numOrBool : number | boolean
|
||||
>"string" : "string"
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ export namespace TypeGuards {
|
||||
|
||||
return typeof(value) === 'object'
|
||||
>typeof(value) === 'object' : boolean
|
||||
>typeof(value) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof(value) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>(value) : any
|
||||
>value : any
|
||||
>'object' : "object"
|
||||
|
||||
@ -7,11 +7,11 @@ var r1 = typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed;
|
||||
>typeof x === "string" && typeof x === "string" ? x.substr : x.toFixed : (from: number, length?: number) => string
|
||||
>typeof x === "string" && typeof x === "string" : boolean
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string
|
||||
>"string" : "string"
|
||||
>x.substr : (from: number, length?: number) => string
|
||||
@ -28,11 +28,11 @@ var r2 = !(typeof x === "string" && typeof x === "string") ? x.toFixed : x.subst
|
||||
>(typeof x === "string" && typeof x === "string") : boolean
|
||||
>typeof x === "string" && typeof x === "string" : boolean
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string
|
||||
>"string" : "string"
|
||||
>x.toFixed : (fractionDigits?: number) => string
|
||||
@ -47,11 +47,11 @@ var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed;
|
||||
>typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed : (from: number, length?: number) => string
|
||||
>typeof x === "string" || typeof x === "string" : boolean
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : number
|
||||
>"string" : "string"
|
||||
>x.substr : (from: number, length?: number) => string
|
||||
@ -68,11 +68,11 @@ var r4 = !(typeof x === "string" || typeof x === "string") ? x.toFixed : x.subst
|
||||
>(typeof x === "string" || typeof x === "string") : boolean
|
||||
>typeof x === "string" || typeof x === "string" : boolean
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : string | number
|
||||
>"string" : "string"
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>x : number
|
||||
>"string" : "string"
|
||||
>x.toFixed : (fractionDigits?: number) => string
|
||||
|
||||
@ -4,13 +4,13 @@ let stringOrNumber: string | number;
|
||||
|
||||
if (typeof stringOrNumber === "number") {
|
||||
>typeof stringOrNumber === "number" : boolean
|
||||
>typeof stringOrNumber : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof stringOrNumber : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>stringOrNumber : string | number
|
||||
>"number" : "number"
|
||||
|
||||
if (typeof stringOrNumber !== "number") {
|
||||
>typeof stringOrNumber !== "number" : boolean
|
||||
>typeof stringOrNumber : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof stringOrNumber : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>stringOrNumber : number
|
||||
>"number" : "number"
|
||||
|
||||
@ -22,11 +22,11 @@ if (typeof stringOrNumber === "number") {
|
||||
if (typeof stringOrNumber === "number" && typeof stringOrNumber !== "number") {
|
||||
>typeof stringOrNumber === "number" && typeof stringOrNumber !== "number" : boolean
|
||||
>typeof stringOrNumber === "number" : boolean
|
||||
>typeof stringOrNumber : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof stringOrNumber : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>stringOrNumber : string | number
|
||||
>"number" : "number"
|
||||
>typeof stringOrNumber !== "number" : boolean
|
||||
>typeof stringOrNumber : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>typeof stringOrNumber : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
|
||||
>stringOrNumber : number
|
||||
>"number" : "number"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user