diff --git a/tests/baselines/reference/TypeGuardWithEnumUnion.types b/tests/baselines/reference/TypeGuardWithEnumUnion.types index 9f51791f209..a568034f8b8 100644 --- a/tests/baselines/reference/TypeGuardWithEnumUnion.types +++ b/tests/baselines/reference/TypeGuardWithEnumUnion.types @@ -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" diff --git a/tests/baselines/reference/ambientExportDefaultErrors.types b/tests/baselines/reference/ambientExportDefaultErrors.types index 4da013dcf58..21e18cc978a 100644 --- a/tests/baselines/reference/ambientExportDefaultErrors.types +++ b/tests/baselines/reference/ambientExportDefaultErrors.types @@ -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 } diff --git a/tests/baselines/reference/anonymousClassExpression1.types b/tests/baselines/reference/anonymousClassExpression1.types index 3bc01960492..2e761d10afd 100644 --- a/tests/baselines/reference/anonymousClassExpression1.types +++ b/tests/baselines/reference/anonymousClassExpression1.types @@ -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" } diff --git a/tests/baselines/reference/arrayFind.types b/tests/baselines/reference/arrayFind.types index 8bc1b36f7f6..c5237183700 100644 --- a/tests/baselines/reference/arrayFind.types +++ b/tests/baselines/reference/arrayFind.types @@ -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" } diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types index a7ccc2cd4e0..d07126c148e 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types @@ -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 diff --git a/tests/baselines/reference/castExpressionParentheses.types b/tests/baselines/reference/castExpressionParentheses.types index 5f6e5b2122b..db38aad5a47 100644 --- a/tests/baselines/reference/castExpressionParentheses.types +++ b/tests/baselines/reference/castExpressionParentheses.types @@ -182,7 +182,7 @@ declare var A; >(typeof A).x : any >(typeof A) : 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 diff --git a/tests/baselines/reference/castOfAwait.types b/tests/baselines/reference/castOfAwait.types index afe075b67d9..34934b89128 100644 --- a/tests/baselines/reference/castOfAwait.types +++ b/tests/baselines/reference/castOfAwait.types @@ -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 typeof void await 0 : undefined >void typeof void await 0 : undefined > typeof void await 0 : string ->typeof void await 0 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof void await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" > void await 0 : number >void await 0 : undefined >await 0 : 0 diff --git a/tests/baselines/reference/checkJsdocTypeTag5.types b/tests/baselines/reference/checkJsdocTypeTag5.types index b16904c700d..816f86a80a6 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.types +++ b/tests/baselines/reference/checkJsdocTypeTag5.types @@ -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 diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.types b/tests/baselines/reference/classDoesNotDependOnBaseTypes.types index e8badbbe815..c50aef1cf14 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.types +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.types @@ -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" diff --git a/tests/baselines/reference/commaOperatorLeftSideUnused.types b/tests/baselines/reference/commaOperatorLeftSideUnused.types index ccfac66e734..585ac1ca7e0 100644 --- a/tests/baselines/reference/commaOperatorLeftSideUnused.types +++ b/tests/baselines/reference/commaOperatorLeftSideUnused.types @@ -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" diff --git a/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types b/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types index 17b5e6b5bff..20e3e132472 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types +++ b/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.types @@ -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 diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types index cf20b244e93..62df9cba085 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types +++ b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.types @@ -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 diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types index a8d388ecbed..00d1965eea4 100644 --- a/tests/baselines/reference/conditionalTypes1.types +++ b/tests/baselines/reference/conditionalTypes1.types @@ -413,13 +413,13 @@ function zeroOf(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" >"" : "" diff --git a/tests/baselines/reference/conditionalTypes2.types b/tests/baselines/reference/conditionalTypes2.types index b1fbfc1f483..58ce7e5d5b4 100644 --- a/tests/baselines/reference/conditionalTypes2.types +++ b/tests/baselines/reference/conditionalTypes2.types @@ -69,7 +69,7 @@ function isFunction(value: T): value is Extract { 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" } diff --git a/tests/baselines/reference/constLocalsInFunctionExpressions.types b/tests/baselines/reference/constLocalsInFunctionExpressions.types index 07d3392045c..33799cba36c 100644 --- a/tests/baselines/reference/constLocalsInFunctionExpressions.types +++ b/tests/baselines/reference/constLocalsInFunctionExpressions.types @@ -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" diff --git a/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types b/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types index 8765476270c..e9192d8323c 100644 --- a/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types +++ b/tests/baselines/reference/controlFlowAnalysisOnBareThisKeyword.types @@ -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" diff --git a/tests/baselines/reference/controlFlowCommaOperator.types b/tests/baselines/reference/controlFlowCommaOperator.types index d4e073295d7..6cc578c7531 100644 --- a/tests/baselines/reference/controlFlowCommaOperator.types +++ b/tests/baselines/reference/controlFlowCommaOperator.types @@ -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" diff --git a/tests/baselines/reference/controlFlowDoWhileStatement.types b/tests/baselines/reference/controlFlowDoWhileStatement.types index 1e70e4b82f1..94431485fe5 100644 --- a/tests/baselines/reference/controlFlowDoWhileStatement.types +++ b/tests/baselines/reference/controlFlowDoWhileStatement.types @@ -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" diff --git a/tests/baselines/reference/controlFlowForStatement.types b/tests/baselines/reference/controlFlowForStatement.types index 28c5ff36e66..01b1a007590 100644 --- a/tests/baselines/reference/controlFlowForStatement.types +++ b/tests/baselines/reference/controlFlowForStatement.types @@ -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" diff --git a/tests/baselines/reference/controlFlowIIFE.types b/tests/baselines/reference/controlFlowIIFE.types index 7aaaad159fc..2116cfaa2ae 100644 --- a/tests/baselines/reference/controlFlowIIFE.types +++ b/tests/baselines/reference/controlFlowIIFE.types @@ -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" diff --git a/tests/baselines/reference/controlFlowIfStatement.types b/tests/baselines/reference/controlFlowIfStatement.types index 03141e26185..3f54468a24e 100644 --- a/tests/baselines/reference/controlFlowIfStatement.types +++ b/tests/baselines/reference/controlFlowIfStatement.types @@ -95,7 +95,7 @@ function c(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(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" diff --git a/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types index 2531f6ae891..7b69b0dc1d9 100644 --- a/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types +++ b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types @@ -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" diff --git a/tests/baselines/reference/controlFlowWhileStatement.types b/tests/baselines/reference/controlFlowWhileStatement.types index ae127a6bdca..713d7bd8d81 100644 --- a/tests/baselines/reference/controlFlowWhileStatement.types +++ b/tests/baselines/reference/controlFlowWhileStatement.types @@ -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" diff --git a/tests/baselines/reference/controlFlowWithIncompleteTypes.types b/tests/baselines/reference/controlFlowWithIncompleteTypes.types index f5e8f2bcf24..571ad8116c3 100644 --- a/tests/baselines/reference/controlFlowWithIncompleteTypes.types +++ b/tests/baselines/reference/controlFlowWithIncompleteTypes.types @@ -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" diff --git a/tests/baselines/reference/controlFlowWithTemplateLiterals.types b/tests/baselines/reference/controlFlowWithTemplateLiterals.types index 7775d26fe38..0a2c47b970c 100644 --- a/tests/baselines/reference/controlFlowWithTemplateLiterals.types +++ b/tests/baselines/reference/controlFlowWithTemplateLiterals.types @@ -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" diff --git a/tests/baselines/reference/declarationEmitIdentifierPredicates01.types b/tests/baselines/reference/declarationEmitIdentifierPredicates01.types index 934bb35f5e9..08c762c9685 100644 --- a/tests/baselines/reference/declarationEmitIdentifierPredicates01.types +++ b/tests/baselines/reference/declarationEmitIdentifierPredicates01.types @@ -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" } diff --git a/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types b/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types index 2fca6b7518b..294fd2fa380 100644 --- a/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types +++ b/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.types @@ -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 diff --git a/tests/baselines/reference/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types b/tests/baselines/reference/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types index 9c43312be86..33fa4f8aac7 100644 --- a/tests/baselines/reference/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types +++ b/tests/baselines/reference/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types @@ -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 diff --git a/tests/baselines/reference/definiteAssignmentAssertions.types b/tests/baselines/reference/definiteAssignmentAssertions.types index 92646bab86e..95eaf7853b3 100644 --- a/tests/baselines/reference/definiteAssignmentAssertions.types +++ b/tests/baselines/reference/definiteAssignmentAssertions.types @@ -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" diff --git a/tests/baselines/reference/discriminantsAndPrimitives.types b/tests/baselines/reference/discriminantsAndPrimitives.types index 455c1595dc8..6498df3926e 100644 --- a/tests/baselines/reference/discriminantsAndPrimitives.types +++ b/tests/baselines/reference/discriminantsAndPrimitives.types @@ -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" diff --git a/tests/baselines/reference/duplicateLocalVariable1.types b/tests/baselines/reference/duplicateLocalVariable1.types index d19007d90aa..4a7dcb41919 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.types +++ b/tests/baselines/reference/duplicateLocalVariable1.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types index 08bb88d6965..912a26f746f 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types index 0918c28892a..08d0d591dfb 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types index 326c947735b..0a40fc6f766 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types index 2aa89e26587..9d712e6e366 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types index c7e861e8a39..9b583b03d28 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types index 31c845f91b8..c1c6394c63e 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types index 6e0dea6b9dc..431d688f3b4 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types @@ -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 diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types index 0ea9f7db87c..ccbacd4c719 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types @@ -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 diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types index b5323a24b98..8c7e7d27aa8 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.types @@ -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 diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types index 7f99664658e..9cacc633c62 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.types @@ -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 diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types index 12303bf7c23..36d594f3821 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.types @@ -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 diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.types b/tests/baselines/reference/exponentiationOperatorSyntaxError2.types index 194aeb04939..5fa497b879f 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.types +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.types @@ -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 diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.types b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.types index 035fbc02625..eca7d9ecc83 100644 --- a/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.types +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.types @@ -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 diff --git a/tests/baselines/reference/exportAssignNonIdentifier.types b/tests/baselines/reference/exportAssignNonIdentifier.types index e4426cdb12d..e457fd8a209 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.types +++ b/tests/baselines/reference/exportAssignNonIdentifier.types @@ -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 === diff --git a/tests/baselines/reference/expressionTypeNodeShouldError.types b/tests/baselines/reference/expressionTypeNodeShouldError.types index 45c12d7c8ff..58bb3943e73 100644 --- a/tests/baselines/reference/expressionTypeNodeShouldError.types +++ b/tests/baselines/reference/expressionTypeNodeShouldError.types @@ -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 diff --git a/tests/baselines/reference/fixSignatureCaching.types b/tests/baselines/reference/fixSignatureCaching.types index 8365196acd7..c278034e2cb 100644 --- a/tests/baselines/reference/fixSignatureCaching.types +++ b/tests/baselines/reference/fixSignatureCaching.types @@ -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" diff --git a/tests/baselines/reference/implicitConstParameters.types b/tests/baselines/reference/implicitConstParameters.types index 0aaf7b3c49b..e9a97ebc022 100644 --- a/tests/baselines/reference/implicitConstParameters.types +++ b/tests/baselines/reference/implicitConstParameters.types @@ -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" diff --git a/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types b/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types index e948f8ac9ef..6883034052e 100644 --- a/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types +++ b/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.types @@ -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" diff --git a/tests/baselines/reference/keywordExpressionInternalComments.types b/tests/baselines/reference/keywordExpressionInternalComments.types index b987c1132fe..269fcb67c6e 100644 --- a/tests/baselines/reference/keywordExpressionInternalComments.types +++ b/tests/baselines/reference/keywordExpressionInternalComments.types @@ -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*/; diff --git a/tests/baselines/reference/mappedTypes4.types b/tests/baselines/reference/mappedTypes4.types index fac8d982e92..d59d500d089 100644 --- a/tests/baselines/reference/mappedTypes4.types +++ b/tests/baselines/reference/mappedTypes4.types @@ -16,7 +16,7 @@ function boxify(obj: T): Boxified { 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" diff --git a/tests/baselines/reference/narrowUnknownByTypeofObject.types b/tests/baselines/reference/narrowUnknownByTypeofObject.types index 98225861d1e..a4e1e034433 100644 --- a/tests/baselines/reference/narrowUnknownByTypeofObject.types +++ b/tests/baselines/reference/narrowUnknownByTypeofObject.types @@ -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" diff --git a/tests/baselines/reference/narrowingByTypeofInSwitch.types b/tests/baselines/reference/narrowingByTypeofInSwitch.types index a0d1c272d02..f823c57770c 100644 --- a/tests/baselines/reference/narrowingByTypeofInSwitch.types +++ b/tests/baselines/reference/narrowingByTypeofInSwitch.types @@ -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(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(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(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(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(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(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(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(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; diff --git a/tests/baselines/reference/narrowingConstrainedTypeParameter.types b/tests/baselines/reference/narrowingConstrainedTypeParameter.types index 0d14846fc2a..1fadbfdb1c4 100644 --- a/tests/baselines/reference/narrowingConstrainedTypeParameter.types +++ b/tests/baselines/reference/narrowingConstrainedTypeParameter.types @@ -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 diff --git a/tests/baselines/reference/nestedLoopTypeGuards.types b/tests/baselines/reference/nestedLoopTypeGuards.types index e0279325012..116dd97e094 100644 --- a/tests/baselines/reference/nestedLoopTypeGuards.types +++ b/tests/baselines/reference/nestedLoopTypeGuards.types @@ -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" diff --git a/tests/baselines/reference/neverType.types b/tests/baselines/reference/neverType.types index 482f208eddb..7ae38d11f76 100644 --- a/tests/baselines/reference/neverType.types +++ b/tests/baselines/reference/neverType.types @@ -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" diff --git a/tests/baselines/reference/nonPrimitiveNarrow.types b/tests/baselines/reference/nonPrimitiveNarrow.types index d9abc6b252d..92b3ef0ea2e 100644 --- a/tests/baselines/reference/nonPrimitiveNarrow.types +++ b/tests/baselines/reference/nonPrimitiveNarrow.types @@ -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" diff --git a/tests/baselines/reference/nonPrimitiveStrictNull.types b/tests/baselines/reference/nonPrimitiveStrictNull.types index 0dd0ace9f49..d313ed10d39 100644 --- a/tests/baselines/reference/nonPrimitiveStrictNull.types +++ b/tests/baselines/reference/nonPrimitiveStrictNull.types @@ -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" diff --git a/tests/baselines/reference/overloadAssignmentCompat.types b/tests/baselines/reference/overloadAssignmentCompat.types index 3e24975e5ce..e91aab8cb5b 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.types +++ b/tests/baselines/reference/overloadAssignmentCompat.types @@ -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" diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types index ce2171f1e9a..c1e89780eaf 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types @@ -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 diff --git a/tests/baselines/reference/overloadReturnTypes.types b/tests/baselines/reference/overloadReturnTypes.types index 2fa1b8ef3ec..f455d652a02 100644 --- a/tests/baselines/reference/overloadReturnTypes.types +++ b/tests/baselines/reference/overloadReturnTypes.types @@ -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" diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index 222ac9ab945..1d29ff94305 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -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" diff --git a/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.types b/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.types index 42763ee46bd..e96dad97bd4 100644 --- a/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.types +++ b/tests/baselines/reference/prefixUnaryOperatorsOnExportedVariables.types @@ -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 } diff --git a/tests/baselines/reference/recursiveTypeRelations.types b/tests/baselines/reference/recursiveTypeRelations.types index 3ca21ccd8e5..cb0baef7919 100644 --- a/tests/baselines/reference/recursiveTypeRelations.types +++ b/tests/baselines/reference/recursiveTypeRelations.types @@ -53,7 +53,7 @@ export function css(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 >"string" : "string" @@ -64,7 +64,7 @@ export function css(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 >"object" : "object" diff --git a/tests/baselines/reference/reservedWords2.types b/tests/baselines/reference/reservedWords2.types index ecbd896de63..2ec19e01618 100644 --- a/tests/baselines/reference/reservedWords2.types +++ b/tests/baselines/reference/reservedWords2.types @@ -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 diff --git a/tests/baselines/reference/returnTagTypeGuard.types b/tests/baselines/reference/returnTagTypeGuard.types index 5608cc38088..214099b8eb3 100644 --- a/tests/baselines/reference/returnTagTypeGuard.types +++ b/tests/baselines/reference/returnTagTypeGuard.types @@ -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" diff --git a/tests/baselines/reference/strictTypeofUnionNarrowing.types b/tests/baselines/reference/strictTypeofUnionNarrowing.types index 1ec44e14ff0..bfaabcb3946 100644 --- a/tests/baselines/reference/strictTypeofUnionNarrowing.types +++ b/tests/baselines/reference/strictTypeofUnionNarrowing.types @@ -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 diff --git a/tests/baselines/reference/switchStatements.types b/tests/baselines/reference/switchStatements.types index 306483739e8..19c35398b0b 100644 --- a/tests/baselines/reference/switchStatements.types +++ b/tests/baselines/reference/switchStatements.types @@ -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): diff --git a/tests/baselines/reference/symbolType17.types b/tests/baselines/reference/symbolType17.types index e9f808f453f..c093051ff59 100644 --- a/tests/baselines/reference/symbolType17.types +++ b/tests/baselines/reference/symbolType17.types @@ -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" diff --git a/tests/baselines/reference/symbolType18.types b/tests/baselines/reference/symbolType18.types index 1329a827dce..d6ed93ef7f0 100644 --- a/tests/baselines/reference/symbolType18.types +++ b/tests/baselines/reference/symbolType18.types @@ -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" diff --git a/tests/baselines/reference/symbolType19.types b/tests/baselines/reference/symbolType19.types index 086cccfec06..99b157fe166 100644 --- a/tests/baselines/reference/symbolType19.types +++ b/tests/baselines/reference/symbolType19.types @@ -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" diff --git a/tests/baselines/reference/symbolType3.types b/tests/baselines/reference/symbolType3.types index 6f31861fd93..074a65d5130 100644 --- a/tests/baselines/reference/symbolType3.types +++ b/tests/baselines/reference/symbolType3.types @@ -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 diff --git a/tests/baselines/reference/templateStringInTypeOf.types b/tests/baselines/reference/templateStringInTypeOf.types index 5de62164a70..195150c6aa8 100644 --- a/tests/baselines/reference/templateStringInTypeOf.types +++ b/tests/baselines/reference/templateStringInTypeOf.types @@ -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 diff --git a/tests/baselines/reference/templateStringInTypeOfES6.types b/tests/baselines/reference/templateStringInTypeOfES6.types index cc035a25501..27aab9cc9d9 100644 --- a/tests/baselines/reference/templateStringInTypeOfES6.types +++ b/tests/baselines/reference/templateStringInTypeOfES6.types @@ -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 diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types index a7811bd03bd..3069fbb80f3 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperator.types @@ -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" diff --git a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types index 27e593bf4b3..35608d6f604 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types +++ b/tests/baselines/reference/templateStringWithEmbeddedTypeOfOperatorES6.types @@ -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" diff --git a/tests/baselines/reference/thisTypeInTypePredicate.types b/tests/baselines/reference/thisTypeInTypePredicate.types index e13f8e3fc9c..c31ab771e79 100644 --- a/tests/baselines/reference/thisTypeInTypePredicate.types +++ b/tests/baselines/reference/thisTypeInTypePredicate.types @@ -13,6 +13,6 @@ const numbers = filter((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 diff --git a/tests/baselines/reference/throwStatements.types b/tests/baselines/reference/throwStatements.types index b07a32e92c0..4efe80360a1 100644 --- a/tests/baselines/reference/throwStatements.types +++ b/tests/baselines/reference/throwStatements.types @@ -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(); diff --git a/tests/baselines/reference/typeGuardEnums.types b/tests/baselines/reference/typeGuardEnums.types index 4c3ae152475..8fda9ebe1a9 100644 --- a/tests/baselines/reference/typeGuardEnums.types +++ b/tests/baselines/reference/typeGuardEnums.types @@ -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" diff --git a/tests/baselines/reference/typeGuardInClass.types b/tests/baselines/reference/typeGuardInClass.types index dc7d1daa992..60e2b214784 100644 --- a/tests/baselines/reference/typeGuardInClass.types +++ b/tests/baselines/reference/typeGuardInClass.types @@ -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" diff --git a/tests/baselines/reference/typeGuardIntersectionTypes.types b/tests/baselines/reference/typeGuardIntersectionTypes.types index 1458d21301d..a9f43b49179 100644 --- a/tests/baselines/reference/typeGuardIntersectionTypes.types +++ b/tests/baselines/reference/typeGuardIntersectionTypes.types @@ -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 diff --git a/tests/baselines/reference/typeGuardNesting.types b/tests/baselines/reference/typeGuardNesting.types index c1396130c05..37f54d94681 100644 --- a/tests/baselines/reference/typeGuardNesting.types +++ b/tests/baselines/reference/typeGuardNesting.types @@ -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 diff --git a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types index ca546d0c7c6..47d231444c6 100644 --- a/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types +++ b/tests/baselines/reference/typeGuardOfFormExpr1AndExpr2.types @@ -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 diff --git a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types index 50e0c2d158e..840f2e7a0bd 100644 --- a/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types +++ b/tests/baselines/reference/typeGuardOfFormExpr1OrExpr2.types @@ -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 diff --git a/tests/baselines/reference/typeGuardOfFormNotExpr.types b/tests/baselines/reference/typeGuardOfFormNotExpr.types index 624bd7c71fc..6d89d3d8802 100644 --- a/tests/baselines/reference/typeGuardOfFormNotExpr.types +++ b/tests/baselines/reference/typeGuardOfFormNotExpr.types @@ -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 diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types index 72697554f6a..c6d057bef0f 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt index 20cb4233dcf..e10cf2d1a78 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt @@ -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 { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types index d33d556cf98..9773c2b2225 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types b/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types index 69ca4ced215..9729de4bdf5 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfFunction.types @@ -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(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(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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfIsOrderIndependent.types b/tests/baselines/reference/typeGuardOfFormTypeOfIsOrderIndependent.types index be594983779..ec2a862f1b6 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfIsOrderIndependent.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfIsOrderIndependent.types @@ -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; diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt index fcacac5ba25..a0e9cd0f7bf 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt @@ -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 { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types index 0a0f835070f..0d452125ee8 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types index db95bff3e83..54d60e53bd7 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfNumber.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt index 0672bb4841c..d310abe9cd2 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.errors.txt @@ -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 { diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types index 889810f3447..268dd151293 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfOther.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfOther.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types index 4787c07d758..6367eb1776b 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfPrimitiveSubtype.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfString.types b/tests/baselines/reference/typeGuardOfFormTypeOfString.types index f211ae80cf2..3c1fd253e3a 100644 --- a/tests/baselines/reference/typeGuardOfFormTypeOfString.types +++ b/tests/baselines/reference/typeGuardOfFormTypeOfString.types @@ -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" diff --git a/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types b/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types index 43c286336a7..3448feb0ce6 100644 --- a/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types +++ b/tests/baselines/reference/typeGuardOnContainerTypeNoHang.types @@ -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" diff --git a/tests/baselines/reference/typeGuardRedundancy.types b/tests/baselines/reference/typeGuardRedundancy.types index 2023defbb43..10bec968ed2 100644 --- a/tests/baselines/reference/typeGuardRedundancy.types +++ b/tests/baselines/reference/typeGuardRedundancy.types @@ -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 diff --git a/tests/baselines/reference/typeGuardTautologicalConsistiency.types b/tests/baselines/reference/typeGuardTautologicalConsistiency.types index 136b09674d8..02e3945c8e0 100644 --- a/tests/baselines/reference/typeGuardTautologicalConsistiency.types +++ b/tests/baselines/reference/typeGuardTautologicalConsistiency.types @@ -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" diff --git a/tests/baselines/reference/typeGuardTypeOfUndefined.types b/tests/baselines/reference/typeGuardTypeOfUndefined.types index 00777ac0eae..750d44bb45c 100644 --- a/tests/baselines/reference/typeGuardTypeOfUndefined.types +++ b/tests/baselines/reference/typeGuardTypeOfUndefined.types @@ -6,13 +6,13 @@ function test1(a: any) { if (typeof a !== "undefined") { >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : any >"undefined" : "undefined" 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 : any >"boolean" : "boolean" @@ -36,13 +36,13 @@ function test2(a: any) { if (typeof a === "undefined") { >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : any >"undefined" : "undefined" 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 : undefined >"boolean" : "boolean" @@ -67,11 +67,11 @@ function test3(a: any) { if (typeof a === "undefined" || typeof a === "boolean") { >typeof a === "undefined" || typeof a === "boolean" : boolean >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : any >"undefined" : "undefined" >typeof a === "boolean" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : any >"boolean" : "boolean" @@ -91,11 +91,11 @@ function test4(a: any) { if (typeof a !== "undefined" && typeof a === "boolean") { >typeof a !== "undefined" && typeof a === "boolean" : boolean >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : any >"undefined" : "undefined" >typeof a === "boolean" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : any >"boolean" : "boolean" @@ -114,13 +114,13 @@ function test5(a: boolean | void) { if (typeof a !== "undefined") { >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : boolean | void >"undefined" : "undefined" 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" : "boolean" @@ -144,13 +144,13 @@ function test6(a: boolean | void) { if (typeof a === "undefined") { >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : boolean | void >"undefined" : "undefined" 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 : undefined >"boolean" : "boolean" @@ -175,11 +175,11 @@ function test7(a: boolean | void) { if (typeof a === "undefined" || typeof a === "boolean") { >typeof a === "undefined" || typeof a === "boolean" : boolean >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : boolean | void >"undefined" : "undefined" >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" : "boolean" @@ -199,11 +199,11 @@ function test8(a: boolean | void) { if (typeof a !== "undefined" && typeof a === "boolean") { >typeof a !== "undefined" && typeof a === "boolean" : boolean >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : boolean | void >"undefined" : "undefined" >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" : "boolean" @@ -222,13 +222,13 @@ function test9(a: boolean | number) { if (typeof a !== "undefined") { >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"undefined" : "undefined" 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 : number | boolean >"boolean" : "boolean" @@ -252,13 +252,13 @@ function test10(a: boolean | number) { if (typeof a === "undefined") { >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"undefined" : "undefined" 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 : undefined >"boolean" : "boolean" @@ -283,11 +283,11 @@ function test11(a: boolean | number) { if (typeof a === "undefined" || typeof a === "boolean") { >typeof a === "undefined" || typeof a === "boolean" : boolean >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"undefined" : "undefined" >typeof a === "boolean" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"boolean" : "boolean" @@ -307,11 +307,11 @@ function test12(a: boolean | number) { if (typeof a !== "undefined" && typeof a === "boolean") { >typeof a !== "undefined" && typeof a === "boolean" : boolean >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"undefined" : "undefined" >typeof a === "boolean" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"boolean" : "boolean" @@ -330,13 +330,13 @@ function test13(a: boolean | number | void) { if (typeof a !== "undefined") { >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean | void >"undefined" : "undefined" 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 : number | boolean >"boolean" : "boolean" @@ -360,13 +360,13 @@ function test14(a: boolean | number | void) { if (typeof a === "undefined") { >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean | void >"undefined" : "undefined" 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 : undefined >"boolean" : "boolean" @@ -391,11 +391,11 @@ function test15(a: boolean | number | void) { if (typeof a === "undefined" || typeof a === "boolean") { >typeof a === "undefined" || typeof a === "boolean" : boolean >typeof a === "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean | void >"undefined" : "undefined" >typeof a === "boolean" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"boolean" : "boolean" @@ -415,11 +415,11 @@ function test16(a: boolean | number | void) { if (typeof a !== "undefined" && typeof a === "boolean") { >typeof a !== "undefined" && typeof a === "boolean" : boolean >typeof a !== "undefined" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean | void >"undefined" : "undefined" >typeof a === "boolean" : boolean ->typeof a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >a : number | boolean >"boolean" : "boolean" diff --git a/tests/baselines/reference/typeGuardsAsAssertions.types b/tests/baselines/reference/typeGuardsAsAssertions.types index 792ac950aae..4139c84f77d 100644 --- a/tests/baselines/reference/typeGuardsAsAssertions.types +++ b/tests/baselines/reference/typeGuardsAsAssertions.types @@ -96,7 +96,7 @@ function foo1() { >x : string | number | boolean >typeof x === "string" ? x.slice() : "abc" : 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" >x.slice() : string @@ -130,7 +130,7 @@ function foo2() { 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" @@ -189,7 +189,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 : undefined >"string" : "string" @@ -232,7 +232,7 @@ function f4() { 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 : undefined >"boolean" : "boolean" @@ -250,11 +250,11 @@ function f5(x: string | number) { if (typeof x === "string" && typeof x === "number") { >typeof x === "string" && typeof x === "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" >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" diff --git a/tests/baselines/reference/typeGuardsDefeat.types b/tests/baselines/reference/typeGuardsDefeat.types index eb46a998edb..90eb6c6db2d 100644 --- a/tests/baselines/reference/typeGuardsDefeat.types +++ b/tests/baselines/reference/typeGuardsDefeat.types @@ -15,7 +15,7 @@ function foo(x: number | 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 | number >"string" : "string" @@ -40,7 +40,7 @@ function foo2(x: number | 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 | number >"string" : "string" @@ -76,7 +76,7 @@ function foo3(x: number | 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 | number >"string" : "string" diff --git a/tests/baselines/reference/typeGuardsInClassAccessors.types b/tests/baselines/reference/typeGuardsInClassAccessors.types index cd1b94d9ea9..3cc6901133c 100644 --- a/tests/baselines/reference/typeGuardsInClassAccessors.types +++ b/tests/baselines/reference/typeGuardsInClassAccessors.types @@ -25,7 +25,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -41,7 +41,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -62,7 +62,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -75,7 +75,7 @@ class ClassWithAccessors { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -91,7 +91,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -108,7 +108,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -124,7 +124,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -145,7 +145,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -158,7 +158,7 @@ class ClassWithAccessors { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -174,7 +174,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -191,7 +191,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -207,7 +207,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -228,7 +228,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -241,7 +241,7 @@ class ClassWithAccessors { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -257,7 +257,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -274,7 +274,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -290,7 +290,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -311,7 +311,7 @@ class ClassWithAccessors { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -324,7 +324,7 @@ class ClassWithAccessors { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -340,7 +340,7 @@ class ClassWithAccessors { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number diff --git a/tests/baselines/reference/typeGuardsInClassMethods.types b/tests/baselines/reference/typeGuardsInClassMethods.types index 3a45abcf155..2c659bc3f08 100644 --- a/tests/baselines/reference/typeGuardsInClassMethods.types +++ b/tests/baselines/reference/typeGuardsInClassMethods.types @@ -21,7 +21,7 @@ class C1 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -37,7 +37,7 @@ class C1 { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -50,7 +50,7 @@ class C1 { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -68,7 +68,7 @@ class C1 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -84,7 +84,7 @@ class C1 { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -97,7 +97,7 @@ class C1 { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -115,7 +115,7 @@ class C1 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -131,7 +131,7 @@ class C1 { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -144,7 +144,7 @@ class C1 { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -162,7 +162,7 @@ class C1 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -178,7 +178,7 @@ class C1 { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -191,7 +191,7 @@ class C1 { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -209,7 +209,7 @@ class C1 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -225,7 +225,7 @@ class C1 { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -238,7 +238,7 @@ class C1 { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.types b/tests/baselines/reference/typeGuardsInConditionalExpression.types index 85d5380675d..19e11e2e888 100644 --- a/tests/baselines/reference/typeGuardsInConditionalExpression.types +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.types @@ -13,7 +13,7 @@ function foo(x: number | string) { return typeof x === "string" >typeof x === "string" ? x.length // string : x++ : number >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" @@ -33,7 +33,7 @@ function foo2(x: number | string) { return typeof x === "string" >typeof x === "string" ? ((x = "hello") && x) // string : x : string | number >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" @@ -56,7 +56,7 @@ function foo3(x: number | string) { return typeof x === "string" >typeof x === "string" ? ((x = 10) && x) // number : x : number >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" @@ -79,7 +79,7 @@ function foo4(x: number | string) { return typeof x === "string" >typeof x === "string" ? x // string : ((x = 10) && x) : string | number >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" @@ -102,7 +102,7 @@ function foo5(x: number | string) { return typeof x === "string" >typeof x === "string" ? x // string : ((x = "hello") && 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" @@ -126,7 +126,7 @@ function foo6(x: number | string) { return typeof x === "string" >typeof x === "string" ? ((x = 10) && x) // number : ((x = "hello") && x) : string | number >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" @@ -155,7 +155,7 @@ function foo7(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x === "hello" // boolean : typeof x === "boolean" ? x // boolean : x == 10 : 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" @@ -167,7 +167,7 @@ function foo7(x: number | string | boolean) { : typeof x === "boolean" >typeof x === "boolean" ? x // boolean : x == 10 : 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 : number | boolean >"boolean" : "boolean" @@ -189,7 +189,7 @@ function foo8(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x === "hello" : ((b = x) && // number | boolean (typeof x === "boolean" ? x // boolean : x == 10)) : 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" @@ -210,7 +210,7 @@ function foo8(x: number | string | boolean) { >(typeof x === "boolean" ? x // boolean : x == 10) : boolean >typeof x === "boolean" ? x // boolean : x == 10 : 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 : number | boolean >"boolean" : "boolean" @@ -234,7 +234,7 @@ function foo9(x: number | string) { return typeof x === "string" >typeof x === "string" ? ((y = x.length) && x === "hello") // boolean : x === 10 : 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" @@ -267,7 +267,7 @@ function foo10(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x // string : ((b = x) // x is number | boolean && typeof x === "number" && x.toString()) : 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" @@ -285,7 +285,7 @@ function foo10(x: number | string | boolean) { && 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 : number | boolean >"number" : "number" @@ -306,7 +306,7 @@ function foo11(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x // string : ((b = x) // x is number | boolean && typeof x === "number" && (x = 10) // assignment to x && x) : string | number >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" @@ -325,7 +325,7 @@ function foo11(x: number | string | boolean) { && 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 : number | boolean >"number" : "number" @@ -349,7 +349,7 @@ function foo12(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? ((x = 10) && x.toString().length) // number : ((b = x) // x is number | boolean && typeof x === "number" && x) : number >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" @@ -378,7 +378,7 @@ function foo12(x: number | string | boolean) { && 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 : number | boolean >"number" : "number" diff --git a/tests/baselines/reference/typeGuardsInDoStatement.types b/tests/baselines/reference/typeGuardsInDoStatement.types index c663ebbea54..d10a1e1901f 100644 --- a/tests/baselines/reference/typeGuardsInDoStatement.types +++ b/tests/baselines/reference/typeGuardsInDoStatement.types @@ -22,7 +22,7 @@ function a(x: string | number | boolean) { } while (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" @@ -52,7 +52,7 @@ function b(x: string | number | boolean) { } while (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" @@ -82,7 +82,7 @@ function c(x: string | number) { } while (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" diff --git a/tests/baselines/reference/typeGuardsInExternalModule.types b/tests/baselines/reference/typeGuardsInExternalModule.types index 86b47f9b5c6..fb5265a72e1 100644 --- a/tests/baselines/reference/typeGuardsInExternalModule.types +++ b/tests/baselines/reference/typeGuardsInExternalModule.types @@ -11,7 +11,7 @@ var var1: string | number; if (typeof var1 === "string") { >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" @@ -38,7 +38,7 @@ export var var2: string | number; if (typeof var2 === "string") { >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" diff --git a/tests/baselines/reference/typeGuardsInForStatement.types b/tests/baselines/reference/typeGuardsInForStatement.types index 4ad1a283d40..3736ffd04da 100644 --- a/tests/baselines/reference/typeGuardsInForStatement.types +++ b/tests/baselines/reference/typeGuardsInForStatement.types @@ -11,7 +11,7 @@ function a(x: string | number) { >x : string | number >undefined : undefined >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" >x = undefined : undefined @@ -33,7 +33,7 @@ function b(x: string | number) { >x : string | number >undefined : undefined >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" >x = undefined : undefined @@ -58,7 +58,7 @@ function c(x: string | number) { >x : string | number >undefined : undefined >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" >x = undefined : undefined diff --git a/tests/baselines/reference/typeGuardsInFunction.types b/tests/baselines/reference/typeGuardsInFunction.types index a7dca0f709b..1d816e74115 100644 --- a/tests/baselines/reference/typeGuardsInFunction.types +++ b/tests/baselines/reference/typeGuardsInFunction.types @@ -20,7 +20,7 @@ function f(param: string | number) { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -36,7 +36,7 @@ function f(param: string | number) { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -49,7 +49,7 @@ function f(param: string | number) { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -74,7 +74,7 @@ function f1(param: string | number) { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -87,7 +87,7 @@ function f1(param: string | number) { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -100,7 +100,7 @@ function f1(param: string | number) { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -116,7 +116,7 @@ function f1(param: string | number) { >num : number >typeof var3 === "string" && var3.length : number >typeof var3 === "string" : boolean ->typeof var3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var3 : string | number >"string" : "string" >var3.length : number @@ -128,7 +128,7 @@ function f1(param: string | number) { >num : number >typeof param1 === "string" && param1.length : number >typeof param1 === "string" : boolean ->typeof param1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param1 : string | number >"string" : "string" >param1.length : number @@ -158,7 +158,7 @@ function f2(param: string | number) { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -171,7 +171,7 @@ function f2(param: string | number) { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -184,7 +184,7 @@ function f2(param: string | number) { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -200,7 +200,7 @@ function f2(param: string | number) { >num : number >typeof var3 === "string" && var3.length : number >typeof var3 === "string" : boolean ->typeof var3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var3 : string | number >"string" : "string" >var3.length : number @@ -212,7 +212,7 @@ function f2(param: string | number) { >num : number >typeof param1 === "string" && param1.length : number >typeof param1 === "string" : boolean ->typeof param1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param1 : string | number >"string" : "string" >param1.length : number @@ -245,7 +245,7 @@ function f3(param: string | number) { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -258,7 +258,7 @@ function f3(param: string | number) { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -271,7 +271,7 @@ function f3(param: string | number) { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -287,7 +287,7 @@ function f3(param: string | number) { >num : number >typeof var3 === "string" && var3.length : number >typeof var3 === "string" : boolean ->typeof var3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var3 : string | number >"string" : "string" >var3.length : number @@ -299,7 +299,7 @@ function f3(param: string | number) { >num : number >typeof param1 === "string" && param1.length : number >typeof param1 === "string" : boolean ->typeof param1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param1 : string | number >"string" : "string" >param1.length : number @@ -329,7 +329,7 @@ strOrNum = typeof f4() === "string" && f4(); // string | number >strOrNum : string | number >typeof f4() === "string" && f4() : string | number >typeof f4() === "string" : boolean ->typeof f4() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof f4() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >f4() : string | number >f4 : () => string | number >"string" : "string" diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types index a425e4d632e..bf02447300f 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.types @@ -8,7 +8,7 @@ function foo(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x : function f() { var b = x; // number | boolean return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number } () : 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" @@ -27,7 +27,7 @@ function foo(x: number | string | boolean) { return typeof x === "boolean" >typeof x === "boolean" ? x.toString() // boolean : x.toString() : string >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number | boolean >"boolean" : "boolean" @@ -52,7 +52,7 @@ function foo2(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x : function f(a: number | boolean) { var b = x; // new scope - number | boolean return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number } (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" @@ -72,7 +72,7 @@ function foo2(x: number | string | boolean) { return typeof x === "boolean" >typeof x === "boolean" ? x.toString() // boolean : x.toString() : string >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number | boolean >"boolean" : "boolean" @@ -98,7 +98,7 @@ function foo3(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x : (() => { var b = x; // new scope - number | boolean return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number })() : 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" @@ -117,7 +117,7 @@ function foo3(x: number | string | boolean) { return typeof x === "boolean" >typeof x === "boolean" ? x.toString() // boolean : x.toString() : string >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number | boolean >"boolean" : "boolean" @@ -142,7 +142,7 @@ function foo4(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" ? x : ((a: number | boolean) => { var b = x; // new scope - number | boolean return typeof x === "boolean" ? x.toString() // boolean : x.toString(); // number })(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" @@ -162,7 +162,7 @@ function foo4(x: number | string | boolean) { return typeof x === "boolean" >typeof x === "boolean" ? x.toString() // boolean : x.toString() : string >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number | boolean >"boolean" : "boolean" @@ -188,7 +188,7 @@ function foo5(x: number | string | boolean) { 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 | boolean >"string" : "string" @@ -223,7 +223,7 @@ module m { 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 | boolean >"string" : "string" @@ -238,7 +238,7 @@ module m { >y : string >typeof x === "boolean" ? x.toString() // boolean : x.toString() : string >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number | boolean >"boolean" : "boolean" @@ -275,7 +275,7 @@ module m1 { 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 | boolean >"string" : "string" @@ -290,7 +290,7 @@ module m1 { >y : string >typeof x === "boolean" ? x.toString() // boolean : x.toString() : string >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number | boolean >"boolean" : "boolean" diff --git a/tests/baselines/reference/typeGuardsInGlobal.types b/tests/baselines/reference/typeGuardsInGlobal.types index 7ccc2defe27..27a2f3d09a2 100644 --- a/tests/baselines/reference/typeGuardsInGlobal.types +++ b/tests/baselines/reference/typeGuardsInGlobal.types @@ -11,7 +11,7 @@ var var1: string | number; if (typeof var1 === "string") { >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" diff --git a/tests/baselines/reference/typeGuardsInIfStatement.types b/tests/baselines/reference/typeGuardsInIfStatement.types index 76ae48432f8..e2e0d19290c 100644 --- a/tests/baselines/reference/typeGuardsInIfStatement.types +++ b/tests/baselines/reference/typeGuardsInIfStatement.types @@ -9,7 +9,7 @@ function foo(x: number | 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 | number >"string" : "string" @@ -30,7 +30,7 @@ function foo2(x: number | 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 | number >"string" : "string" @@ -53,7 +53,7 @@ function foo3(x: number | 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 | number >"string" : "string" @@ -76,7 +76,7 @@ function foo4(x: number | 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 | number >"string" : "string" @@ -99,7 +99,7 @@ function foo5(x: number | 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 | number >"string" : "string" @@ -122,7 +122,7 @@ function foo6(x: number | 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 | number >"string" : "string" @@ -150,7 +150,7 @@ function foo7(x: number | string | boolean) { 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 | boolean >"string" : "string" @@ -161,7 +161,7 @@ function foo7(x: number | string | boolean) { } else 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 : number | boolean >"boolean" : "boolean" @@ -181,7 +181,7 @@ function foo8(x: number | string | boolean) { 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 | boolean >"string" : "string" @@ -197,7 +197,7 @@ function foo8(x: number | string | boolean) { 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 : number | boolean >"boolean" : "boolean" @@ -222,7 +222,7 @@ function foo9(x: number | 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 | number >"string" : "string" @@ -253,7 +253,7 @@ function foo10(x: number | string | boolean) { // Mixing typeguard narrowing in if statement with conditional expression typeguard 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 | boolean >"string" : "string" @@ -273,7 +273,7 @@ function foo10(x: number | string | boolean) { return typeof x === "number" >typeof x === "number" ? x === 10 // number : x : boolean >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" @@ -294,7 +294,7 @@ function foo11(x: number | string | boolean) { // Assigning value to x deep inside another guard stops narrowing of type too 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 | boolean >"string" : "string" @@ -312,7 +312,7 @@ function foo11(x: number | string | boolean) { return typeof x === "number" >typeof x === "number" ? ( // change value of x x = 10 && x.toString() // number | boolean | string ) : ( // do not change value y = x && x.toString() // number | boolean | string ) : string >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" @@ -356,7 +356,7 @@ function foo12(x: number | string | boolean) { // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression 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 | boolean >"string" : "string" @@ -379,7 +379,7 @@ function foo12(x: number | string | boolean) { return typeof x === "number" >typeof x === "number" ? x.toString() // number : x.toString() : any >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 >"number" : "number" diff --git a/tests/baselines/reference/typeGuardsInModule.types b/tests/baselines/reference/typeGuardsInModule.types index a14c47e3cca..0e3e164c0ef 100644 --- a/tests/baselines/reference/typeGuardsInModule.types +++ b/tests/baselines/reference/typeGuardsInModule.types @@ -22,7 +22,7 @@ module m1 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -35,7 +35,7 @@ module m1 { if (typeof var2 === "string") { >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" @@ -59,7 +59,7 @@ module m1 { if (typeof var3 === "string") { >typeof var3 === "string" : boolean ->typeof var3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var3 : string | number >"string" : "string" @@ -94,7 +94,7 @@ module m2 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -107,7 +107,7 @@ module m2 { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -120,7 +120,7 @@ module m2 { >strOrNum : string | number >typeof var3 === "string" && var3 : string >typeof var3 === "string" : boolean ->typeof var3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var3 : string | number >"string" : "string" >var3 : string @@ -131,7 +131,7 @@ module m2 { if (typeof var4 === "string") { >typeof var4 === "string" : boolean ->typeof var4 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var4 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var4 : string | number >"string" : "string" @@ -155,7 +155,7 @@ module m2 { if (typeof var5 === "string") { >typeof var5 === "string" : boolean ->typeof var5 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var5 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var5 : string | number >"string" : "string" @@ -183,7 +183,7 @@ module m3.m4 { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -196,7 +196,7 @@ module m3.m4 { if (typeof var2 === "string") { >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" @@ -220,7 +220,7 @@ module m3.m4 { if (typeof var3 === "string") { >typeof var3 === "string" : boolean ->typeof var3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var3 : string | number >"string" : "string" diff --git a/tests/baselines/reference/typeGuardsInProperties.types b/tests/baselines/reference/typeGuardsInProperties.types index e1a7bd82464..1bf3ee62a41 100644 --- a/tests/baselines/reference/typeGuardsInProperties.types +++ b/tests/baselines/reference/typeGuardsInProperties.types @@ -32,7 +32,7 @@ class C1 { >strOrNum : string | number >typeof this.pp1 === "string" && this.pp1 : string >typeof this.pp1 === "string" : boolean ->typeof this.pp1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof this.pp1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.pp1 : string | number >this : this >pp1 : string | number @@ -46,7 +46,7 @@ class C1 { >strOrNum : string | number >typeof this.pp2 === "string" && this.pp2 : string >typeof this.pp2 === "string" : boolean ->typeof this.pp2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof this.pp2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.pp2 : string | number >this : this >pp2 : string | number @@ -60,7 +60,7 @@ class C1 { >strOrNum : string | number >typeof this.pp3 === "string" && this.pp3 : string >typeof this.pp3 === "string" : boolean ->typeof this.pp3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof this.pp3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.pp3 : string | number >this : this >pp3 : string | number @@ -78,7 +78,7 @@ strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number >strOrNum : string | number >typeof c1.pp2 === "string" && c1.pp2 : string >typeof c1.pp2 === "string" : boolean ->typeof c1.pp2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof c1.pp2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >c1.pp2 : string | number >c1 : C1 >pp2 : string | number @@ -92,7 +92,7 @@ strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number >strOrNum : string | number >typeof c1.pp3 === "string" && c1.pp3 : string >typeof c1.pp3 === "string" : boolean ->typeof c1.pp3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof c1.pp3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >c1.pp3 : string | number >c1 : C1 >pp3 : string | number @@ -113,7 +113,7 @@ strOrNum = typeof obj1.x === "string" && obj1.x; // string | number >strOrNum : string | number >typeof obj1.x === "string" && obj1.x : string >typeof obj1.x === "string" : boolean ->typeof obj1.x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1.x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1.x : string | number >obj1 : { x: string | number; } >x : string | number diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types index 7235a1d80c2..166dd9ac0e1 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types +++ b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.types @@ -8,7 +8,7 @@ function foo(x: number | string) { return typeof x === "string" && x.length === 10; // string >typeof x === "string" && x.length === 10 : 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.length === 10 : boolean @@ -25,7 +25,7 @@ function foo2(x: number | string) { return typeof x === "string" && ((x = 10) && x); // string | number >typeof x === "string" && ((x = 10) && x) : number >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 = 10) && x) : number @@ -44,7 +44,7 @@ function foo3(x: number | string) { return typeof x === "string" && ((x = "hello") && x); // string | number >typeof x === "string" && ((x = "hello") && 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" >((x = "hello") && x) : string @@ -63,13 +63,13 @@ function foo4(x: number | string | boolean) { >typeof x !== "string" // string | number | boolean && typeof x !== "number" // number | boolean && x : boolean >typeof x !== "string" // string | number | boolean && typeof x !== "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" && typeof x !== "number" // number | boolean >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" @@ -87,7 +87,7 @@ function foo5(x: number | string | boolean) { return typeof x !== "string" // string | number | boolean >typeof x !== "string" // string | number | boolean && ((b = x) && (typeof x !== "number" // number | boolean && x)) : 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" @@ -101,7 +101,7 @@ function foo5(x: number | string | boolean) { >(typeof x !== "number" // number | boolean && x) : boolean >typeof x !== "number" // number | boolean && x : boolean >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" @@ -116,7 +116,7 @@ function foo6(x: number | string | boolean) { return typeof x !== "string" // string | number | boolean >typeof x !== "string" // string | number | boolean && (typeof x !== "number" // number | boolean ? x // boolean : x === 10) : 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" @@ -124,7 +124,7 @@ function foo6(x: number | string | boolean) { >(typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean >typeof x !== "number" // number | boolean ? x // boolean : x === 10 : boolean >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" @@ -150,7 +150,7 @@ function foo7(x: number | string | boolean) { return typeof x !== "string" >typeof x !== "string" && ((z = x) // number | boolean && (typeof x === "number" // change value of x ? ((x = 10) && x.toString()) // x is number // do not change value : ((y = x) && x.toString()))) : 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" @@ -166,7 +166,7 @@ function foo7(x: number | string | boolean) { >(typeof x === "number" // change value of x ? ((x = 10) && x.toString()) // x is number // do not change value : ((y = x) && x.toString())) : string >typeof x === "number" // change value of x ? ((x = 10) && x.toString()) // x is number // do not change value : ((y = x) && x.toString()) : string >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" diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types index d8d807bad70..d3335cd75be 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types +++ b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.types @@ -9,7 +9,7 @@ function foo(x: number | string) { return typeof x !== "string" || x.length === 10; // string >typeof x !== "string" || x.length === 10 : 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.length === 10 : boolean @@ -26,7 +26,7 @@ function foo2(x: number | string) { return typeof x !== "string" || ((x = 10) || x); // string | number >typeof x !== "string" || ((x = 10) || x) : number | true >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 = 10) || x) : number @@ -45,7 +45,7 @@ function foo3(x: number | string) { return typeof x !== "string" || ((x = "hello") || x); // string | number >typeof x !== "string" || ((x = "hello") || x) : string | true >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 = "hello") || x) : string @@ -64,13 +64,13 @@ function foo4(x: number | string | boolean) { >typeof x === "string" // string | number | boolean || typeof x === "number" // number | boolean || x : boolean >typeof x === "string" // string | number | boolean || typeof x === "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" || typeof x === "number" // number | boolean >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" @@ -88,7 +88,7 @@ function foo5(x: number | string | boolean) { return typeof x === "string" // string | number | boolean >typeof x === "string" // string | number | boolean || ((b = x) || (typeof x === "number" // number | boolean || x)) : 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" @@ -102,7 +102,7 @@ function foo5(x: number | string | boolean) { >(typeof x === "number" // number | boolean || x) : boolean >typeof x === "number" // number | boolean || x : boolean >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" @@ -117,7 +117,7 @@ function foo6(x: number | string | boolean) { return typeof x === "string" // string | number | boolean >typeof x === "string" // string | number | boolean || (typeof x !== "number" // number | boolean ? x // boolean : x === 10) : 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" @@ -125,7 +125,7 @@ function foo6(x: number | string | boolean) { >(typeof x !== "number" // number | boolean ? x // boolean : x === 10) : boolean >typeof x !== "number" // number | boolean ? x // boolean : x === 10 : boolean >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" @@ -151,7 +151,7 @@ function foo7(x: number | string | boolean) { return typeof x === "string" >typeof x === "string" || ((z = x) // number | boolean || (typeof x === "number" // change value of x ? ((x = 10) && x.toString()) // number | boolean | string // do not change value : ((y = x) && x.toString()))) : string | number | true >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" @@ -167,7 +167,7 @@ function foo7(x: number | string | boolean) { >(typeof x === "number" // change value of x ? ((x = 10) && x.toString()) // number | boolean | string // do not change value : ((y = x) && x.toString())) : string >typeof x === "number" // change value of x ? ((x = 10) && x.toString()) // number | boolean | string // do not change value : ((y = x) && x.toString()) : string >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" diff --git a/tests/baselines/reference/typeGuardsInWhileStatement.types b/tests/baselines/reference/typeGuardsInWhileStatement.types index cdcff209c08..6f2e68d9747 100644 --- a/tests/baselines/reference/typeGuardsInWhileStatement.types +++ b/tests/baselines/reference/typeGuardsInWhileStatement.types @@ -8,7 +8,7 @@ function a(x: string | number) { while (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" @@ -29,7 +29,7 @@ function b(x: string | number) { while (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" @@ -53,7 +53,7 @@ function c(x: string | number) { while (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" diff --git a/tests/baselines/reference/typeGuardsNestedAssignments.types b/tests/baselines/reference/typeGuardsNestedAssignments.types index b3d89b2f9e6..31b832e1b31 100644 --- a/tests/baselines/reference/typeGuardsNestedAssignments.types +++ b/tests/baselines/reference/typeGuardsNestedAssignments.types @@ -97,7 +97,7 @@ function f4() { if (typeof (x = getStringOrNumberOrNull()) === "number") { >typeof (x = getStringOrNumberOrNull()) === "number" : boolean ->typeof (x = getStringOrNumberOrNull()) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (x = getStringOrNumberOrNull()) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(x = getStringOrNumberOrNull()) : string | number | null >x = getStringOrNumberOrNull() : string | number | null >x : string | number | null diff --git a/tests/baselines/reference/typeGuardsObjectMethods.types b/tests/baselines/reference/typeGuardsObjectMethods.types index 37121822b28..14e002d6ebd 100644 --- a/tests/baselines/reference/typeGuardsObjectMethods.types +++ b/tests/baselines/reference/typeGuardsObjectMethods.types @@ -27,7 +27,7 @@ var obj1 = { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -43,7 +43,7 @@ var obj1 = { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -56,7 +56,7 @@ var obj1 = { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -76,7 +76,7 @@ var obj1 = { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -92,7 +92,7 @@ var obj1 = { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -113,7 +113,7 @@ var obj1 = { >num : number >typeof var1 === "string" && var1.length : number >typeof var1 === "string" : boolean ->typeof var1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var1 : string | number >"string" : "string" >var1.length : number @@ -129,7 +129,7 @@ var obj1 = { >num : number >typeof var2 === "string" && var2.length : number >typeof var2 === "string" : boolean ->typeof var2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof var2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >var2 : string | number >"string" : "string" >var2.length : number @@ -142,7 +142,7 @@ var obj1 = { >num : number >typeof param === "string" && param.length : number >typeof param === "string" : boolean ->typeof param : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof param : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >param : string | number >"string" : "string" >param.length : number @@ -156,7 +156,7 @@ strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum); >strOrNum : string | number >typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum) : string | number >typeof obj1.method(strOrNum) === "string" : boolean ->typeof obj1.method(strOrNum) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1.method(strOrNum) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1.method(strOrNum) : string | number >obj1.method : (param: string | number) => string | number >obj1 : { method(param: string | number): string | number; prop: string | number; } @@ -175,7 +175,7 @@ strOrNum = typeof obj1.prop === "string" && obj1.prop; >strOrNum : string | number >typeof obj1.prop === "string" && obj1.prop : string >typeof obj1.prop === "string" : boolean ->typeof obj1.prop : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1.prop : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1.prop : string | number >obj1 : { method(param: string | number): string | number; prop: string | number; } >prop : string | number diff --git a/tests/baselines/reference/typeGuardsOnClassProperty.types b/tests/baselines/reference/typeGuardsOnClassProperty.types index 510fac963d0..6a79412237a 100644 --- a/tests/baselines/reference/typeGuardsOnClassProperty.types +++ b/tests/baselines/reference/typeGuardsOnClassProperty.types @@ -22,7 +22,7 @@ class D { return typeof data === "string" ? data : data.join(" "); >typeof data === "string" ? data : data.join(" ") : 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 | string[] >"string" : "string" >data : string @@ -39,7 +39,7 @@ class D { return typeof this.data === "string" ? this.data : this.data.join(" "); >typeof this.data === "string" ? this.data : this.data.join(" ") : string >typeof this.data === "string" : boolean ->typeof this.data : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof this.data : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >this.data : string | string[] >this : this >data : string | string[] @@ -81,7 +81,7 @@ var o: { if (typeof o.prop1 === "string" && o.prop1.toLowerCase()) {} >typeof o.prop1 === "string" && o.prop1.toLowerCase() : string >typeof o.prop1 === "string" : boolean ->typeof o.prop1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof o.prop1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >o.prop1 : string | number >o : { prop1: string | number; prop2: string | boolean; } >prop1 : string | number @@ -102,7 +102,7 @@ var prop1 = o.prop1; if (typeof prop1 === "string" && prop1.toLocaleLowerCase()) { } >typeof prop1 === "string" && prop1.toLocaleLowerCase() : string >typeof prop1 === "string" : boolean ->typeof prop1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof prop1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >prop1 : string | number >"string" : "string" >prop1.toLocaleLowerCase() : string diff --git a/tests/baselines/reference/typeGuardsTypeParameters.types b/tests/baselines/reference/typeGuardsTypeParameters.types index 71dbb4881aa..e6db4e578e8 100644 --- a/tests/baselines/reference/typeGuardsTypeParameters.types +++ b/tests/baselines/reference/typeGuardsTypeParameters.types @@ -38,7 +38,7 @@ function f2(x: T) { 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 : T >"string" : "string" @@ -79,7 +79,7 @@ function fun(item: { [P in keyof T]: T[P] }) { if (typeof value === "string") { >typeof value === "string" : boolean ->typeof value : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >value : { [P in keyof T]: T[P]; }[Extract] >"string" : "string" diff --git a/tests/baselines/reference/typeGuardsWithAny.types b/tests/baselines/reference/typeGuardsWithAny.types index b34257d3843..a483ca6ce74 100644 --- a/tests/baselines/reference/typeGuardsWithAny.types +++ b/tests/baselines/reference/typeGuardsWithAny.types @@ -24,7 +24,7 @@ else { 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 : any >"string" : "string" @@ -42,7 +42,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 : any >"number" : "number" @@ -60,7 +60,7 @@ else { 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 : any >"boolean" : "boolean" @@ -78,7 +78,7 @@ else { 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 : any >"object" : "object" diff --git a/tests/baselines/reference/typeOfOperator1.errors.txt b/tests/baselines/reference/typeOfOperator1.errors.txt index 75fc25d243c..137b58c0365 100644 --- a/tests/baselines/reference/typeOfOperator1.errors.txt +++ b/tests/baselines/reference/typeOfOperator1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeOfOperator1.ts(3,5): error TS2322: Type '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' is not assignable to type 'number'. +tests/cases/compiler/typeOfOperator1.ts(3,5): error TS2322: Type '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' is not assignable to type 'number'. Type '"string"' is not assignable to type 'number'. @@ -7,5 +7,5 @@ tests/cases/compiler/typeOfOperator1.ts(3,5): error TS2322: Type '"string" | "nu var y: string = typeof x; var z: number = typeof x; ~ -!!! error TS2322: Type '"string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"' is not assignable to type 'number'. +!!! error TS2322: Type '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' is not assignable to type 'number'. !!! error TS2322: Type '"string"' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeOfOperator1.types b/tests/baselines/reference/typeOfOperator1.types index 0fc7b68c7e8..2c1d43a2ee4 100644 --- a/tests/baselines/reference/typeOfOperator1.types +++ b/tests/baselines/reference/typeOfOperator1.types @@ -5,11 +5,11 @@ var x = 1; var y: string = typeof x; >y : string ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number var z: number = typeof x; >z : number ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : number diff --git a/tests/baselines/reference/typeofOperatorInvalidOperations.types b/tests/baselines/reference/typeofOperatorInvalidOperations.types index 7b88d823f4a..06aae70699d 100644 --- a/tests/baselines/reference/typeofOperatorInvalidOperations.types +++ b/tests/baselines/reference/typeofOperatorInvalidOperations.types @@ -5,12 +5,12 @@ var ANY = ANY typeof ; //expect error >ANY : any >ANY : any ->typeof : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" > : any // miss an operand var ANY1 = typeof ; ->ANY1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ANY1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" > : any diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.types b/tests/baselines/reference/typeofOperatorWithAnyOtherType.types index e3b9ae1eea9..37695941e11 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.types @@ -62,121 +62,121 @@ var objA = new A(); // any type var var ResultIsString1 = typeof ANY1; ->ResultIsString1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ANY1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY1 : any var ResultIsString2 = typeof ANY2; ->ResultIsString2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ANY2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY2 : any[] var ResultIsString3 = typeof A; ->ResultIsString3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof A : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A : typeof A var ResultIsString4 = typeof M; ->ResultIsString4 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof M : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString4 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M : typeof M var ResultIsString5 = typeof obj; ->ResultIsString5 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof obj : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString5 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj : () => {} var ResultIsString6 = typeof obj1; ->ResultIsString6 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof obj1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString6 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1 : { x: string; y: () => void; } // any type literal var ResultIsString7 = typeof undefined; ->ResultIsString7 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof undefined : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString7 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof undefined : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >undefined : undefined var ResultIsString8 = typeof null; ->ResultIsString8 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof null : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString8 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof null : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >null : null var ResultIsString9 = typeof {}; ->ResultIsString9 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof {} : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString9 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof {} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >{} : {} // any type expressions var ResultIsString10 = typeof ANY2[0]; ->ResultIsString10 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ANY2[0] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString10 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY2[0] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY2[0] : any >ANY2 : any[] >0 : 0 var ResultIsString11 = typeof objA.a; ->ResultIsString11 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString11 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : any >objA : A >a : any var ResultIsString12 = typeof obj1.x; ->ResultIsString12 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof obj1.x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString12 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1.x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1.x : string >obj1 : { x: string; y: () => void; } >x : string var ResultIsString13 = typeof M.n; ->ResultIsString13 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString13 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : any >M : typeof M >n : any var ResultIsString14 = typeof foo(); ->ResultIsString14 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString14 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : any >foo : () => any var ResultIsString15 = typeof A.foo(); ->ResultIsString15 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof A.foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString15 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo() : any >A.foo : () => any >A : typeof A >foo : () => any var ResultIsString16 = typeof (ANY + ANY1); ->ResultIsString16 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (ANY + ANY1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString16 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (ANY + ANY1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(ANY + ANY1) : any >ANY + ANY1 : any >ANY : any >ANY1 : any var ResultIsString17 = typeof (null + undefined); ->ResultIsString17 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (null + undefined) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString17 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (null + undefined) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(null + undefined) : any >null + undefined : any >null : null >undefined : undefined var ResultIsString18 = typeof (null + null); ->ResultIsString18 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (null + null) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString18 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (null + null) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(null + null) : any >null + null : any >null : null >null : null var ResultIsString19 = typeof (undefined + undefined); ->ResultIsString19 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (undefined + undefined) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString19 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (undefined + undefined) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(undefined + undefined) : any >undefined + undefined : any >undefined : undefined @@ -184,16 +184,16 @@ var ResultIsString19 = typeof (undefined + undefined); // multiple typeof operators var ResultIsString20 = typeof typeof ANY; ->ResultIsString20 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof ANY : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ANY : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString20 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof ANY : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY : any var ResultIsString21 = typeof typeof typeof (ANY + ANY1); ->ResultIsString21 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof typeof (ANY + ANY1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof (ANY + ANY1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (ANY + ANY1) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString21 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof typeof (ANY + ANY1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof (ANY + ANY1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (ANY + ANY1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(ANY + ANY1) : any >ANY + ANY1 : any >ANY : any @@ -201,43 +201,43 @@ var ResultIsString21 = typeof typeof typeof (ANY + ANY1); // miss assignment operators typeof ANY; ->typeof ANY : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY : any typeof ANY1; ->typeof ANY1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY1 : any typeof ANY2[0]; ->typeof ANY2[0] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY2[0] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY2[0] : any >ANY2 : any[] >0 : 0 typeof ANY, ANY1; >typeof ANY, ANY1 : any ->typeof ANY : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY : any >ANY1 : any typeof obj1; ->typeof obj1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1 : { x: string; y: () => void; } typeof obj1.x; ->typeof obj1.x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1.x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1.x : string >obj1 : { x: string; y: () => void; } >x : string typeof objA.a; ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : any >objA : A >a : any typeof M.n; ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : any >M : typeof M >n : any @@ -254,43 +254,43 @@ var r: () => any; z: typeof ANY; >z : any ->typeof ANY : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY : any x: typeof ANY2; >x : any ->typeof ANY2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ANY2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ANY2 : any[] r: typeof foo; >r : any ->typeof foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo : () => any z: typeof objA.a; >z : any ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : any >objA : A >a : any z: typeof A.foo; >z : any ->typeof A.foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo : () => any >A : typeof A >foo : () => any z: typeof M.n; >z : any ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : any >M : typeof M >n : any z: typeof obj1.x; >z : any ->typeof obj1.x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof obj1.x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >obj1.x : string >obj1 : { x: string; y: () => void; } >x : string diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.types b/tests/baselines/reference/typeofOperatorWithBooleanType.types index e709a017d1e..c0c6cbf0976 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.types +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.types @@ -31,19 +31,19 @@ var objA = new A(); // boolean type var var ResultIsString1 = typeof BOOLEAN; ->ResultIsString1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof BOOLEAN : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof BOOLEAN : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >BOOLEAN : boolean // boolean type literal var ResultIsString2 = typeof true; ->ResultIsString2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof true : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof true : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >true : true var ResultIsString3 = typeof { x: true, y: false }; ->ResultIsString3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof { x: true, y: false } : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof { x: true, y: false } : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >{ x: true, y: false } : { x: boolean; y: boolean; } >x : boolean >true : true @@ -52,28 +52,28 @@ var ResultIsString3 = typeof { x: true, y: false }; // boolean type expressions var ResultIsString4 = typeof objA.a; ->ResultIsString4 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString4 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : boolean >objA : A >a : boolean var ResultIsString5 = typeof M.n; ->ResultIsString5 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString5 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : boolean >M : typeof M >n : boolean var ResultIsString6 = typeof foo(); ->ResultIsString6 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString6 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : boolean >foo : () => boolean var ResultIsString7 = typeof A.foo(); ->ResultIsString7 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof A.foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString7 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo() : boolean >A.foo : () => boolean >A : typeof A @@ -81,39 +81,39 @@ var ResultIsString7 = typeof A.foo(); // multiple typeof operator var ResultIsString8 = typeof typeof BOOLEAN; ->ResultIsString8 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof BOOLEAN : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof BOOLEAN : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString8 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof BOOLEAN : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof BOOLEAN : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >BOOLEAN : boolean // miss assignment operators typeof true; ->typeof true : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof true : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >true : true typeof BOOLEAN; ->typeof BOOLEAN : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof BOOLEAN : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >BOOLEAN : boolean typeof foo(); ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : boolean >foo : () => boolean typeof true, false; >typeof true, false : false ->typeof true : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof true : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >true : true >false : false typeof objA.a; ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : boolean >objA : A >a : boolean typeof M.n; ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : boolean >M : typeof M >n : boolean @@ -130,12 +130,12 @@ var r: () => boolean; z: typeof BOOLEAN; >z : any ->typeof BOOLEAN : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof BOOLEAN : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >BOOLEAN : boolean r: typeof foo; >r : any ->typeof foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo : () => boolean var y = { a: true, b: false}; @@ -148,28 +148,28 @@ var y = { a: true, b: false}; z: typeof y.a; >z : any ->typeof y.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof y.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >y.a : boolean >y : { a: boolean; b: boolean; } >a : boolean z: typeof objA.a; >z : any ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : boolean >objA : A >a : boolean z: typeof A.foo; >z : any ->typeof A.foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo : () => boolean >A : typeof A >foo : () => boolean z: typeof M.n; >z : any ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : boolean >M : typeof M >n : boolean diff --git a/tests/baselines/reference/typeofOperatorWithEnumType.types b/tests/baselines/reference/typeofOperatorWithEnumType.types index ccbb7bef2c5..ffe8b70ea80 100644 --- a/tests/baselines/reference/typeofOperatorWithEnumType.types +++ b/tests/baselines/reference/typeofOperatorWithEnumType.types @@ -12,26 +12,26 @@ enum ENUM1 { A, B, "" }; // enum type var var ResultIsString1 = typeof ENUM; ->ResultIsString1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ENUM : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM : typeof ENUM var ResultIsString2 = typeof ENUM1; ->ResultIsString2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ENUM1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM1 : typeof ENUM1 // enum type expressions var ResultIsString3 = typeof ENUM1["A"]; ->ResultIsString3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ENUM1["A"] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM1["A"] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM1["A"] : ENUM1.A >ENUM1 : typeof ENUM1 >"A" : "A" var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); ->ResultIsString4 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (ENUM[0] + ENUM1["B"]) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString4 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (ENUM[0] + ENUM1["B"]) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(ENUM[0] + ENUM1["B"]) : string >ENUM[0] + ENUM1["B"] : string >ENUM[0] : string @@ -43,16 +43,16 @@ var ResultIsString4 = typeof (ENUM[0] + ENUM1["B"]); // multiple typeof operators var ResultIsString5 = typeof typeof ENUM; ->ResultIsString5 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof ENUM : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof ENUM : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString5 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof ENUM : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM : typeof ENUM var ResultIsString6 = typeof typeof typeof (ENUM[0] + ENUM1.B); ->ResultIsString6 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof typeof (ENUM[0] + ENUM1.B) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof (ENUM[0] + ENUM1.B) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (ENUM[0] + ENUM1.B) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString6 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof typeof (ENUM[0] + ENUM1.B) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof (ENUM[0] + ENUM1.B) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (ENUM[0] + ENUM1.B) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(ENUM[0] + ENUM1.B) : string >ENUM[0] + ENUM1.B : string >ENUM[0] : string @@ -64,22 +64,22 @@ var ResultIsString6 = typeof typeof typeof (ENUM[0] + ENUM1.B); // miss assignment operators typeof ENUM; ->typeof ENUM : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM : typeof ENUM typeof ENUM1; ->typeof ENUM1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM1 : typeof ENUM1 typeof ENUM1["B"]; ->typeof ENUM1["B"] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM1["B"] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM1["B"] : ENUM1.B >ENUM1 : typeof ENUM1 >"B" : "B" typeof ENUM, ENUM1; >typeof ENUM, ENUM1 : typeof ENUM1 ->typeof ENUM : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM : typeof ENUM >ENUM1 : typeof ENUM1 @@ -89,11 +89,11 @@ enum z { }; z: typeof ENUM; >z : any ->typeof ENUM : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM : typeof ENUM z: typeof ENUM1; >z : any ->typeof ENUM1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof ENUM1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >ENUM1 : typeof ENUM1 diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.types b/tests/baselines/reference/typeofOperatorWithNumberType.types index 918fe2dcc3d..e035c206e7f 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.types +++ b/tests/baselines/reference/typeofOperatorWithNumberType.types @@ -37,24 +37,24 @@ var objA = new A(); // number type var var ResultIsString1 = typeof NUMBER; ->ResultIsString1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof NUMBER : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER : number var ResultIsString2 = typeof NUMBER1; ->ResultIsString2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof NUMBER1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER1 : number[] // number type literal var ResultIsString3 = typeof 1; ->ResultIsString3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof 1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof 1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >1 : 1 var ResultIsString4 = typeof { x: 1, y: 2}; ->ResultIsString4 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof { x: 1, y: 2} : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString4 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof { x: 1, y: 2} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >{ x: 1, y: 2} : { x: number; y: number; } >x : number >1 : 1 @@ -62,8 +62,8 @@ var ResultIsString4 = typeof { x: 1, y: 2}; >2 : 2 var ResultIsString5 = typeof { x: 1, y: (n: number) => { return n; } }; ->ResultIsString5 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof { x: 1, y: (n: number) => { return n; } } : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString5 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof { x: 1, y: (n: number) => { return n; } } : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >{ x: 1, y: (n: number) => { return n; } } : { x: number; y: (n: number) => number; } >x : number >1 : 1 @@ -74,43 +74,43 @@ var ResultIsString5 = typeof { x: 1, y: (n: number) => { return n; } }; // number type expressions var ResultIsString6 = typeof objA.a; ->ResultIsString6 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString6 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : number >objA : A >a : number var ResultIsString7 = typeof M.n; ->ResultIsString7 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString7 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : number >M : typeof M >n : number var ResultIsString8 = typeof NUMBER1[0]; ->ResultIsString8 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof NUMBER1[0] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString8 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER1[0] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER1[0] : number >NUMBER1 : number[] >0 : 0 var ResultIsString9 = typeof foo(); ->ResultIsString9 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString9 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : number >foo : () => number var ResultIsString10 = typeof A.foo(); ->ResultIsString10 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof A.foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString10 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo() : number >A.foo : () => number >A : typeof A >foo : () => number var ResultIsString11 = typeof (NUMBER + NUMBER); ->ResultIsString11 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (NUMBER + NUMBER) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString11 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (NUMBER + NUMBER) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(NUMBER + NUMBER) : number >NUMBER + NUMBER : number >NUMBER : number @@ -118,16 +118,16 @@ var ResultIsString11 = typeof (NUMBER + NUMBER); // multiple typeof operators var ResultIsString12 = typeof typeof NUMBER; ->ResultIsString12 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof NUMBER : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof NUMBER : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString12 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof NUMBER : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER : number var ResultIsString13 = typeof typeof typeof (NUMBER + NUMBER); ->ResultIsString13 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof typeof (NUMBER + NUMBER) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof (NUMBER + NUMBER) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (NUMBER + NUMBER) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString13 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof typeof (NUMBER + NUMBER) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof (NUMBER + NUMBER) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (NUMBER + NUMBER) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(NUMBER + NUMBER) : number >NUMBER + NUMBER : number >NUMBER : number @@ -135,37 +135,37 @@ var ResultIsString13 = typeof typeof typeof (NUMBER + NUMBER); // miss assignment operators typeof 1; ->typeof 1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof 1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >1 : 1 typeof NUMBER; ->typeof NUMBER : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER : number typeof NUMBER1; ->typeof NUMBER1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER1 : number[] typeof foo(); ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : number >foo : () => number typeof objA.a; ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : number >objA : A >a : number typeof M.n; ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : number >M : typeof M >n : number typeof objA.a, M.n; >typeof objA.a, M.n : number ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : number >objA : A >a : number @@ -182,17 +182,17 @@ var x: number[]; z: typeof NUMBER; >z : any ->typeof NUMBER : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER : number x: typeof NUMBER1; >x : any ->typeof NUMBER1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof NUMBER1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >NUMBER1 : number[] r: typeof foo; >r : any ->typeof foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo : () => number var y = { a: 1, b: 2 }; @@ -205,28 +205,28 @@ var y = { a: 1, b: 2 }; z: typeof y.a; >z : any ->typeof y.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof y.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >y.a : number >y : { a: number; b: number; } >a : number z: typeof objA.a; >z : any ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : number >objA : A >a : number z: typeof A.foo; >z : any ->typeof A.foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo : () => number >A : typeof A >foo : () => number z: typeof M.n; >z : any ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : number >M : typeof M >n : number diff --git a/tests/baselines/reference/typeofOperatorWithStringType.types b/tests/baselines/reference/typeofOperatorWithStringType.types index ca4f445c9e6..c1ae2959c9b 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.types +++ b/tests/baselines/reference/typeofOperatorWithStringType.types @@ -37,24 +37,24 @@ var objA = new A(); // string type var var ResultIsString1 = typeof STRING; ->ResultIsString1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof STRING : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING : string var ResultIsString2 = typeof STRING1; ->ResultIsString2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof STRING1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING1 : string[] // string type literal var ResultIsString3 = typeof ""; ->ResultIsString3 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof "" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString3 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof "" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >"" : "" var ResultIsString4 = typeof { x: "", y: "" }; ->ResultIsString4 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof { x: "", y: "" } : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString4 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof { x: "", y: "" } : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >{ x: "", y: "" } : { x: string; y: string; } >x : string >"" : "" @@ -62,8 +62,8 @@ var ResultIsString4 = typeof { x: "", y: "" }; >"" : "" var ResultIsString5 = typeof { x: "", y: (s: string) => { return s; } }; ->ResultIsString5 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof { x: "", y: (s: string) => { return s; } } : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString5 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof { x: "", y: (s: string) => { return s; } } : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >{ x: "", y: (s: string) => { return s; } } : { x: string; y: (s: string) => string; } >x : string >"" : "" @@ -74,51 +74,51 @@ var ResultIsString5 = typeof { x: "", y: (s: string) => { return s; } }; // string type expressions var ResultIsString6 = typeof objA.a; ->ResultIsString6 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString6 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : string >objA : A >a : string var ResultIsString7 = typeof M.n; ->ResultIsString7 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString7 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : string >M : typeof M >n : string var ResultIsString8 = typeof STRING1[0]; ->ResultIsString8 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof STRING1[0] : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString8 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING1[0] : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING1[0] : string >STRING1 : string[] >0 : 0 var ResultIsString9 = typeof foo(); ->ResultIsString9 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString9 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : string >foo : () => string var ResultIsString10 = typeof A.foo(); ->ResultIsString10 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof A.foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString10 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo() : string >A.foo : () => string >A : typeof A >foo : () => string var ResultIsString11 = typeof (STRING + STRING); ->ResultIsString11 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (STRING + STRING) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString11 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (STRING + STRING) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(STRING + STRING) : string >STRING + STRING : string >STRING : string >STRING : string var ResultIsString12 = typeof STRING.charAt(0); ->ResultIsString12 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof STRING.charAt(0) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString12 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING.charAt(0) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING.charAt(0) : string >STRING.charAt : (pos: number) => string >STRING : string @@ -127,16 +127,16 @@ var ResultIsString12 = typeof STRING.charAt(0); // multiple typeof operators var ResultIsString13 = typeof typeof STRING; ->ResultIsString13 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof STRING : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof STRING : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString13 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof STRING : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING : string var ResultIsString14 = typeof typeof typeof (STRING + STRING); ->ResultIsString14 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof typeof (STRING + STRING) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof typeof (STRING + STRING) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof (STRING + STRING) : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>ResultIsString14 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof typeof (STRING + STRING) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof typeof (STRING + STRING) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof (STRING + STRING) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >(STRING + STRING) : string >STRING + STRING : string >STRING : string @@ -144,25 +144,25 @@ var ResultIsString14 = typeof typeof typeof (STRING + STRING); // miss assignment operators typeof ""; ->typeof "" : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof "" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >"" : "" typeof STRING; ->typeof STRING : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING : string typeof STRING1; ->typeof STRING1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING1 : string[] typeof foo(); ->typeof foo() : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo() : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo() : string >foo : () => string typeof objA.a, M.n; >typeof objA.a, M.n : string ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : string >objA : A >a : string @@ -182,17 +182,17 @@ var r: () => string; z: typeof STRING; >z : any ->typeof STRING : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING : string x: typeof STRING1; >x : any ->typeof STRING1 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof STRING1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >STRING1 : string[] r: typeof foo; >r : any ->typeof foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >foo : () => string var y = { a: "", b: "" }; @@ -205,28 +205,28 @@ var y = { a: "", b: "" }; z: typeof y.a; >z : any ->typeof y.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof y.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >y.a : string >y : { a: string; b: string; } >a : string z: typeof objA.a; >z : any ->typeof objA.a : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof objA.a : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >objA.a : string >objA : A >a : string z: typeof A.foo; >z : any ->typeof A.foo : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof A.foo : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >A.foo : () => string >A : typeof A >foo : () => string z: typeof M.n; >z : any ->typeof M.n : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof M.n : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >M.n : string >M : typeof M >n : string diff --git a/tests/baselines/reference/typeofUnknownSymbol.types b/tests/baselines/reference/typeofUnknownSymbol.types index 7e9d5bdc174..62ee810d6df 100644 --- a/tests/baselines/reference/typeofUnknownSymbol.types +++ b/tests/baselines/reference/typeofUnknownSymbol.types @@ -1,7 +1,7 @@ === tests/cases/compiler/typeofUnknownSymbol.ts === // previously gave no error here var x = typeof whatsthis ->x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" ->typeof whatsthis : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof whatsthis : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >whatsthis : any diff --git a/tests/baselines/reference/unionTypeInference.types b/tests/baselines/reference/unionTypeInference.types index 50bbdbc3170..e712916c2ff 100644 --- a/tests/baselines/reference/unionTypeInference.types +++ b/tests/baselines/reference/unionTypeInference.types @@ -82,11 +82,11 @@ function h(x: string|boolean|T): T { >typeof x === "string" || typeof x === "boolean" ? undefined : x : T >typeof x === "string" || typeof x === "boolean" : 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 | boolean | T >"string" : "string" >typeof x === "boolean" : boolean ->typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" >x : boolean | T >"boolean" : "boolean" >undefined : undefined diff --git a/tests/baselines/reference/unknownType1.types b/tests/baselines/reference/unknownType1.types index 1da9979912b..aaaf73bb709 100644 --- a/tests/baselines/reference/unknownType1.types +++ b/tests/baselines/reference/unknownType1.types @@ -199,11 +199,11 @@ function f20(x: unknown) { if (typeof x === "string" || typeof x === "number") { >typeof x === "string" || typeof x === "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 : unknown >"string" : "string" >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"