Update tests

This commit is contained in:
Jake Bailey
2025-03-24 21:12:32 -07:00
parent 29d1a90c70
commit 72814ac742
644 changed files with 3866 additions and 3939 deletions
@@ -13,13 +13,13 @@ class Message {
function saySize(message: Message | Message[]) {
>saySize : (message: Message | Message[]) => number
> : ^ ^^ ^^^^^^^^^^^
>message : Message | Message[]
>message : Message[] | Message
> : ^^^^^^^^^^^^^^^^^^^
if (message instanceof Array) {
>message instanceof Array : boolean
> : ^^^^^^^
>message : Message | Message[]
>message : Message[] | Message
> : ^^^^^^^^^^^^^^^^^^^
>Array : ArrayConstructor
> : ^^^^^^^^^^^^^^^^
@@ -20,7 +20,7 @@ function f1(x: Color | string) {
if (typeof x === "number") {
>typeof x === "number" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | Color
> : ^^^^^^^^^^^^^^
@@ -53,15 +53,15 @@ function f1(x: Color | string) {
function f2(x: Color | string | string[]) {
>f2 : (x: Color | string | string[]) => void
> : ^ ^^ ^^^^^^^^^
>x : string | Color | string[]
>x : string | string[] | Color
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
if (typeof x === "object") {
>typeof x === "object" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | Color | string[]
>x : string | string[] | Color
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>"object" : "object"
> : ^^^^^^^^
@@ -79,9 +79,9 @@ function f2(x: Color | string | string[]) {
if (typeof x === "number") {
>typeof x === "number" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | Color | string[]
>x : string | string[] | Color
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>"number" : "number"
> : ^^^^^^^^
@@ -110,9 +110,9 @@ function f2(x: Color | string | string[]) {
if (typeof x === "string") {
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | Color | string[]
>x : string | string[] | Color
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>"string" : "string"
> : ^^^^^^^^
@@ -129,13 +129,13 @@ function f2(x: Color | string | string[]) {
}
else {
var b = x;
>b : Color | string[]
>b : string[] | Color
> : ^^^^^^^^^^^^^^^^
>x : Color | string[]
>x : string[] | Color
> : ^^^^^^^^^^^^^^^^
var b: Color | string[];
>b : Color | string[]
>b : string[] | Color
> : ^^^^^^^^^^^^^^^^
}
}
@@ -41,7 +41,7 @@ declare module "indirect" {
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
export default typeof Foo.default;
>typeof Foo.default : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof Foo.default : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Foo.default : number
> : ^^^^^^
@@ -58,7 +58,7 @@ declare module "indirect2" {
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
export = typeof Foo2;
>typeof Foo2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof Foo2 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Foo2 : number
> : ^^^^^^
@@ -8,7 +8,7 @@ function f() {
return typeof class {} === "function";
>typeof class {} === "function" : boolean
> : ^^^^^^^
>typeof class {} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof class {} : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>class {} : typeof (Anonymous class)
> : ^^^^^^^^^^^^^^^^^^^^^^^^
+28 -28
View File
@@ -6576,21 +6576,21 @@ declare namespace ts {
enum TypeFlags {
Any = 1,
Unknown = 2,
String = 4,
Number = 8,
Boolean = 16,
Enum = 32,
BigInt = 64,
StringLiteral = 128,
NumberLiteral = 256,
BooleanLiteral = 512,
EnumLiteral = 1024,
BigIntLiteral = 2048,
ESSymbol = 4096,
UniqueESSymbol = 8192,
Void = 16384,
Undefined = 32768,
Null = 65536,
Undefined = 4,
Null = 8,
Void = 16,
String = 32,
Number = 64,
BigInt = 128,
Boolean = 256,
ESSymbol = 512,
StringLiteral = 1024,
NumberLiteral = 2048,
BooleanLiteral = 4096,
BigIntLiteral = 8192,
UniqueESSymbol = 16384,
EnumLiteral = 32768,
Enum = 65536,
Never = 131072,
TypeParameter = 262144,
Object = 524288,
@@ -6603,18 +6603,18 @@ declare namespace ts {
NonPrimitive = 67108864,
TemplateLiteral = 134217728,
StringMapping = 268435456,
Literal = 2944,
Unit = 109472,
Freshable = 2976,
StringOrNumberLiteral = 384,
PossiblyFalsy = 117724,
StringLike = 402653316,
NumberLike = 296,
BigIntLike = 2112,
BooleanLike = 528,
EnumLike = 1056,
ESSymbolLike = 12288,
VoidLike = 49152,
Literal = 15360,
Unit = 97292,
Freshable = 80896,
StringOrNumberLiteral = 3072,
PossiblyFalsy = 15868,
StringLike = 402654240,
NumberLike = 67648,
BigIntLike = 8320,
BooleanLike = 4352,
EnumLike = 98304,
ESSymbolLike = 16896,
VoidLike = 20,
UnionOrIntersection = 3145728,
StructuredType = 3670016,
TypeVariable = 8650752,
@@ -6622,7 +6622,7 @@ declare namespace ts {
InstantiablePrimitive = 406847488,
Instantiable = 465829888,
StructuredOrInstantiable = 469499904,
Narrowable = 536624127,
Narrowable = 536707043,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type {
@@ -620,10 +620,10 @@ module EmptyTypes {
> : ^^^^^^^^^^^^
var b1 = [baseObj, base2Obj, ifaceObj];
>b1 : iface[]
> : ^^^^^^^
>[baseObj, base2Obj, ifaceObj] : iface[]
> : ^^^^^^^
>b1 : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>[baseObj, base2Obj, ifaceObj] : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>baseObj : base
> : ^^^^
>base2Obj : base2
@@ -632,10 +632,10 @@ module EmptyTypes {
> : ^^^^^
var b2 = [base2Obj, baseObj, ifaceObj];
>b2 : iface[]
> : ^^^^^^^
>[base2Obj, baseObj, ifaceObj] : iface[]
> : ^^^^^^^
>b2 : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>[base2Obj, baseObj, ifaceObj] : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>base2Obj : base2
> : ^^^^^
>baseObj : base
@@ -644,10 +644,10 @@ module EmptyTypes {
> : ^^^^^
var b3 = [baseObj, ifaceObj, base2Obj];
>b3 : iface[]
> : ^^^^^^^
>[baseObj, ifaceObj, base2Obj] : iface[]
> : ^^^^^^^
>b3 : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>[baseObj, ifaceObj, base2Obj] : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>baseObj : base
> : ^^^^
>ifaceObj : iface
@@ -656,10 +656,10 @@ module EmptyTypes {
> : ^^^^^
var b4 = [ifaceObj, baseObj, base2Obj];
>b4 : iface[]
> : ^^^^^^^
>[ifaceObj, baseObj, base2Obj] : iface[]
> : ^^^^^^^
>b4 : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>[ifaceObj, baseObj, base2Obj] : (base | base2)[]
> : ^^^^^^^^^^^^^^^^
>ifaceObj : iface
> : ^^^^^
>baseObj : base
+2 -2
View File
@@ -19,11 +19,11 @@ function doStuff<T extends object, T1 extends T>(a: Array<Fn<T>>, b: Array<Fn<T1
b.concat(a);
>b.concat(a) : Fn<T1>[]
> : ^^^^^^^^
>b.concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (Fn<T1> | ConcatArray<Fn<T1>>)[]): Fn<T1>[]; }
>b.concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (ConcatArray<Fn<T1>> | Fn<T1>)[]): Fn<T1>[]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>b : Fn<T1>[]
> : ^^^^^^^^
>concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (Fn<T1> | ConcatArray<Fn<T1>>)[]): Fn<T1>[]; }
>concat : { (...items: ConcatArray<Fn<T1>>[]): Fn<T1>[]; (...items: (ConcatArray<Fn<T1>> | Fn<T1>)[]): Fn<T1>[]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>a : Fn<T>[]
> : ^^^^^^^
@@ -97,7 +97,7 @@ export function evaluate(expression: Expression): boolean {
return expression === 'true';
>expression === 'true' : boolean
> : ^^^^^^^
>expression : "true" | "false"
>expression : "false" | "true"
> : ^^^^^^^^^^^^^^^^
>'true' : "true"
> : ^^^^^^
+1 -1
View File
@@ -18,7 +18,7 @@ const isString = (x: unknown): x is string => typeof x === 'string';
> : ^^^^^^^
>typeof x === 'string' : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
+1 -1
View File
@@ -10,7 +10,7 @@ function isNumber(x: any): x is number {
return typeof x === "number";
>typeof x === "number" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : any
>"number" : "number"
@@ -2,7 +2,7 @@
=== arrayFlatNoCrashInference.ts ===
function foo<T>(arr: T[], depth: number) {
>foo : <T>(arr: T[], depth: number) => FlatArray<T, 0 | 1 | -1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
>foo : <T>(arr: T[], depth: number) => FlatArray<T, -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
> : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>arr : T[]
> : ^^^
@@ -10,7 +10,7 @@ function foo<T>(arr: T[], depth: number) {
> : ^^^^^^
return arr.flat(depth);
>arr.flat(depth) : FlatArray<T, 0 | 1 | -1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
>arr.flat(depth) : FlatArray<T, -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>arr.flat : <A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[]
> : ^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,4 +13,4 @@ function foo(arr, depth) {
//// [arrayFlatNoCrashInferenceDeclarations.d.ts]
declare function foo<T>(arr: T[], depth: number): FlatArray<T, 0 | 1 | -1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[];
declare function foo<T>(arr: T[], depth: number): FlatArray<T, -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[];
@@ -2,7 +2,7 @@
=== arrayFlatNoCrashInferenceDeclarations.ts ===
function foo<T>(arr: T[], depth: number) {
>foo : <T>(arr: T[], depth: number) => FlatArray<T, 0 | 1 | -1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
>foo : <T>(arr: T[], depth: number) => FlatArray<T, -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
> : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>arr : T[]
> : ^^^
@@ -10,7 +10,7 @@ function foo<T>(arr: T[], depth: number) {
> : ^^^^^^
return arr.flat(depth);
>arr.flat(depth) : FlatArray<T, 0 | 1 | -1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
>arr.flat(depth) : FlatArray<T, -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20>[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>arr.flat : <A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[]
> : ^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -2,9 +2,9 @@
=== arrayLiteralComments.ts ===
var testArrayWithFunc = [
>testArrayWithFunc : (string | number | (() => void) | number[] | { a: number; })[]
>testArrayWithFunc : (string | number | number[] | (() => void) | { a: number; })[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | (() => void) | number[] | { a: number; })[]
>[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | number[] | (() => void) | { a: number; })[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Function comment
@@ -60,7 +60,7 @@ foo([
> : ^^^^
>foo : (animals: IAnimal[]) => void
> : ^ ^^ ^^^^^^^^^
>[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
>[ new Giraffe(), new Elephant()] : (Elephant | Giraffe)[]
> : ^^^^^^^^^^^^^^^^^^^^^^
new Giraffe(),
@@ -81,7 +81,7 @@ bar([
> : ^^^^
>bar : (animals: { [n: number]: IAnimal; }) => void
> : ^ ^^ ^^^^^^^^^
>[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
>[ new Giraffe(), new Elephant()] : (Elephant | Giraffe)[]
> : ^^^^^^^^^^^^^^^^^^^^^^
new Giraffe(),
@@ -99,9 +99,9 @@ bar([
]); // Legal because of the contextual type IAnimal provided by the parameter
var arr = [new Giraffe(), new Elephant()];
>arr : (Giraffe | Elephant)[]
>arr : (Elephant | Giraffe)[]
> : ^^^^^^^^^^^^^^^^^^^^^^
>[new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
>[new Giraffe(), new Elephant()] : (Elephant | Giraffe)[]
> : ^^^^^^^^^^^^^^^^^^^^^^
>new Giraffe() : Giraffe
> : ^^^^^^^
@@ -117,7 +117,7 @@ foo(arr); // ok because arr is Array<Giraffe|Elephant> not {}[]
> : ^^^^
>foo : (animals: IAnimal[]) => void
> : ^ ^^ ^^^^^^^^^
>arr : (Giraffe | Elephant)[]
>arr : (Elephant | Giraffe)[]
> : ^^^^^^^^^^^^^^^^^^^^^^
bar(arr); // ok because arr is Array<Giraffe|Elephant> not {}[]
@@ -125,6 +125,6 @@ bar(arr); // ok because arr is Array<Giraffe|Elephant> not {}[]
> : ^^^^
>bar : (animals: { [n: number]: IAnimal; }) => void
> : ^ ^^ ^^^^^^^^^
>arr : (Giraffe | Elephant)[]
>arr : (Elephant | Giraffe)[]
> : ^^^^^^^^^^^^^^^^^^^^^^
@@ -94,7 +94,7 @@ const appTypeStylesWithError: Map<AppType, Array<AppStyle>> = new Map([
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Map : MapConstructor
> : ^^^^^^^^^^^^^^
>[ [AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]], [AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]], [AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]] : ([AppType.Standard, (AppStyle.Standard | AppStyle.MiniApp)[]] | [AppType.Relationship, (AppStyle.Tree | AppStyle.TreeEntity | AppStyle.Standard)[]] | [AppType.AdvancedList, (AppStyle.Standard | AppStyle.MiniApp)[]])[]
>[ [AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]], [AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]], [AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]] : ([AppType.AdvancedList, (AppStyle.Standard | AppStyle.MiniApp)[]] | [AppType.Standard, (AppStyle.Standard | AppStyle.MiniApp)[]] | [AppType.Relationship, (AppStyle.Tree | AppStyle.TreeEntity | AppStyle.Standard)[]])[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]],
@@ -210,7 +210,7 @@ let b1: { x: boolean }[] = foo({ x: true }, { x: false });
let b2: boolean[][] = foo([true], [false]);
>b2 : boolean[][]
> : ^^^^^^^^^^^
>foo([true], [false]) : (true[] | false[])[]
>foo([true], [false]) : (false[] | true[])[]
> : ^^^^^^^^^^^^^^^^^^^^
>foo : <T>(...args: T[]) => T[]
> : ^ ^^^^^ ^^ ^^^^^
@@ -4,9 +4,9 @@
// Empty array literal with no contextual type has type Undefined[]
var arr1= [[], [1], ['']];
>arr1 : (number[] | string[])[]
>arr1 : (string[] | number[])[]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>[[], [1], ['']] : (number[] | string[])[]
>[[], [1], ['']] : (string[] | number[])[]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>[] : undefined[]
> : ^^^^^^^^^^^
@@ -20,9 +20,9 @@ var arr1= [[], [1], ['']];
> : ^^
var arr2 = [[null], [1], ['']];
>arr2 : (number[] | string[])[]
>arr2 : (string[] | number[])[]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>[[null], [1], ['']] : (number[] | string[])[]
>[[null], [1], ['']] : (string[] | number[])[]
> : ^^^^^^^^^^^^^^^^^^^^^^^
>[null] : null[]
> : ^^^^^^
@@ -97,11 +97,11 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]];
interface tup {
0: number[]|string[];
>0 : number[] | string[]
>0 : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
1: number[]|string[];
>1 : number[] | string[]
>1 : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
}
interface myArray extends Array<Number> { }
@@ -111,7 +111,7 @@ var c0: tup = [...temp2]; // Error
> : ^^^
>[...temp2] : [number[], string[]]
> : ^^^^^^^^^^^^^^^^^^^^
>...temp2 : number[] | string[]
>...temp2 : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>temp2 : [number[], string[]]
> : ^^^^^^^^^^^^^^^^^^^^
@@ -63,9 +63,9 @@ var xs = [list, myList]; // {}[]
> : ^^^^^^^^^^^^^^
var ys = [list, list2]; // {}[]
>ys : (List<number> | List<string>)[]
>ys : (List<string> | List<number>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>[list, list2] : (List<number> | List<string>)[]
>[list, list2] : (List<string> | List<number>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>list : List<number>
> : ^^^^^^^^^^^^
+1 -1
View File
@@ -66,7 +66,7 @@ class parser {
> : ^^^^^^^^^^
>sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[]
> : ^ ^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => 1 | -1 | 0
>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => -1 | 0 | 1
> : ^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
>a : IOptions
> : ^^^^^^^^
@@ -10,13 +10,13 @@ declare var a: any;
>a : any
const test = () => ({
>test : () => { prop: boolean; run: () => "special" | "default"; }
>test : () => { prop: boolean; run: () => "default" | "special"; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "special" | "default"; }
>() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "default" | "special"; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "special" | "default"; }
>({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "default" | "special"; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "special" | "default"; }
>{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "default" | "special"; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space.
@@ -29,9 +29,9 @@ const test = () => ({
> : ^^^^^^^
run: () => { //replace arrow function with regular function to see that errors will be gone
>run : () => "special" | "default"
>run : () => "default" | "special"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>() => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; } : () => "special" | "default"
>() => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; } : () => "default" | "special"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// comment next line or remove "()" to see that errors will be gone
@@ -62,7 +62,7 @@ function f01(x: unknown) {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -122,7 +122,7 @@ function f01(x: unknown) {
> : ^^^^^^^
>typeof x === "boolean" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -130,7 +130,7 @@ function f01(x: unknown) {
> : ^^^^^^^^^
>typeof x === "number" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -138,12 +138,12 @@ function f01(x: unknown) {
> : ^^^^^^^^
x.toLocaleString;
>x.toLocaleString : ((locales?: string | string[], options?: Intl.NumberFormatOptions) => string) | (() => string)
> : ^^ ^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^ ^
>x.toLocaleString : (() => string) | ((locales?: string | string[], options?: Intl.NumberFormatOptions) => string)
> : ^^^^^^^ ^^^^^^ ^^^ ^^ ^^^ ^^^^^ ^
>x : number | boolean
> : ^^^^^^^^^^^^^^^^
>toLocaleString : ((locales?: string | string[], options?: Intl.NumberFormatOptions) => string) | (() => string)
> : ^^ ^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^ ^
>toLocaleString : (() => string) | ((locales?: string | string[], options?: Intl.NumberFormatOptions) => string)
> : ^^^^^^^ ^^^^^^ ^^^ ^^ ^^^ ^^^^^ ^
}
if (!!true) {
>!!true : true
@@ -248,7 +248,7 @@ function f01(x: unknown) {
> : ^^^^^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : {} | null
> : ^^^^^^^^^
@@ -672,7 +672,7 @@ class Test {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -783,7 +783,7 @@ class Derived extends Test {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -938,7 +938,7 @@ function f20(x: unknown) {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -964,7 +964,7 @@ function f20(x: unknown) {
> : ^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -990,7 +990,7 @@ function f20(x: unknown) {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -1016,7 +1016,7 @@ function f20(x: unknown) {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -37,7 +37,7 @@ function assertIsString(x) {
> : ^^^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : unknown
> : ^^^^^^^
@@ -108,7 +108,7 @@ function f1(x) {
> : ^^^^^^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : any
> : ^^^
@@ -138,7 +138,7 @@ function f1(x) {
> : ^ ^^ ^^^^^
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : any
> : ^^^
@@ -201,7 +201,7 @@ function f1(x) {
* @param {boolean} b
*/
function f2(b) {
>f2 : (b: boolean) => 1 | 0
>f2 : (b: boolean) => 0 | 1
> : ^ ^^ ^^^^^^^^^^
>b : boolean
> : ^^^^^^^
@@ -1,11 +1,11 @@
assignmentCompatWithDiscriminatedUnion.ts(44,5): error TS2322: Type 'S' is not assignable to type 'T'.
Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; }'.
Type 'S' is not assignable to type '{ a: 0; b: 1 | 4; }'.
Types of property 'a' are incompatible.
Type '0 | 2' is not assignable to type '0'.
Type '2' is not assignable to type '0'.
assignmentCompatWithDiscriminatedUnion.ts(58,5): error TS2322: Type 'S' is not assignable to type 'T'.
Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 2; b: 4 | 3; c: string; }'.
Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 4 | 3; c: string; }'.
Type 'S' is not assignable to type '{ a: 0; b: 1 | 4; } | { a: 2; b: 3 | 4; c: string; }'.
Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 3 | 4; c: string; }'.
assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not assignable to type 'T'.
Type 'S' is not assignable to type '{ a: N; b: N; c: 2; }'.
Types of property 'c' are incompatible.
@@ -60,7 +60,7 @@ assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not a
t = s;
~
!!! error TS2322: Type 'S' is not assignable to type 'T'.
!!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; }'.
!!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 1 | 4; }'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type '0 | 2' is not assignable to type '0'.
!!! error TS2322: Type '2' is not assignable to type '0'.
@@ -80,8 +80,8 @@ assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not a
t = s;
~
!!! error TS2322: Type 'S' is not assignable to type 'T'.
!!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 2; b: 4 | 3; c: string; }'.
!!! error TS2322: Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 4 | 3; c: string; }'.
!!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 1 | 4; } | { a: 2; b: 3 | 4; c: string; }'.
!!! error TS2322: Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 3 | 4; c: string; }'.
!!! related TS2728 assignmentCompatWithDiscriminatedUnion.ts:52:36: 'c' is declared here.
}
@@ -383,9 +383,9 @@ namespace GH12052 {
>undefined : Symbol(undefined)
good.type = getAxisType();
>good.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 123, 27), Decl(assignmentCompatWithDiscriminatedUnion.ts, 125, 32))
>good.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 125, 32), Decl(assignmentCompatWithDiscriminatedUnion.ts, 123, 27))
>good : Symbol(good, Decl(assignmentCompatWithDiscriminatedUnion.ts, 139, 9))
>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 123, 27), Decl(assignmentCompatWithDiscriminatedUnion.ts, 125, 32))
>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 125, 32), Decl(assignmentCompatWithDiscriminatedUnion.ts, 123, 27))
>getAxisType : Symbol(getAxisType, Decl(assignmentCompatWithDiscriminatedUnion.ts, 128, 46))
}
@@ -73,7 +73,7 @@ namespace Example2 {
> : ^
>a : 0
> : ^
>b : 4 | 1
>b : 1 | 4
> : ^^^^^
| { a: 1, b: 2 } // T1
@@ -85,7 +85,7 @@ namespace Example2 {
| { a: 2, b: 3 | 4 }; // T2
>a : 2
> : ^
>b : 4 | 3
>b : 3 | 4
> : ^^^^^
declare let s: S;
@@ -125,7 +125,7 @@ namespace Example3 {
> : ^
>a : 0
> : ^
>b : 4 | 1
>b : 1 | 4
> : ^^^^^
| { a: 1, b: 2 | 4 } // T1
@@ -178,7 +178,7 @@ namespace Example4 {
> : ^
>a : 0
> : ^
>b : 4 | 1
>b : 1 | 4
> : ^^^^^
| { a: 1, b: 2 } // T1
@@ -190,7 +190,7 @@ namespace Example4 {
| { a: 2, b: 3 | 4, c: string }; // T2
>a : 2
> : ^
>b : 4 | 3
>b : 3 | 4
> : ^^^^^
>c : string
> : ^^^^^^
@@ -523,11 +523,11 @@ namespace GH12052 {
good.type = getAxisType();
>good.type = getAxisType() : IAxisType
> : ^^^^^^^^^
>good.type : "linear" | "categorical"
>good.type : "categorical" | "linear"
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>good : IAxis
> : ^^^^^
>type : "linear" | "categorical"
>type : "categorical" | "linear"
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>getAxisType() : IAxisType
> : ^^^^^^^^^
@@ -693,7 +693,7 @@ namespace GH39357 {
const a: A = b === "a" || b === "b" ? [b, 1] : ["c", ""];
>a : A
> : ^
>b === "a" || b === "b" ? [b, 1] : ["c", ""] : ["a" | "b", number] | ["c", string]
>b === "a" || b === "b" ? [b, 1] : ["c", ""] : ["c", string] | ["a" | "b", number]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>b === "a" || b === "b" : boolean
> : ^^^^^^^
@@ -70,7 +70,7 @@ function bar<T extends string[], K extends number>() {
> : ^^^
type T02 = string[][K | "0"];
>T02 : string[][K | "0"]
>T02 : string[]["0" | K]
> : ^^^^^^^^^^^^^^^^^
type T10 = T["0"];
@@ -82,7 +82,7 @@ function bar<T extends string[], K extends number>() {
> : ^^^^^^^^
type T12 = T[K | "0"];
>T12 : T[K | "0"]
>T12 : T["0" | K]
> : ^^^^^^^^^^
}
@@ -14,11 +14,11 @@ f(v => v ? [0] : Promise.reject());
> : ^^^^
>f : (cb: (v: boolean) => [0] | PromiseLike<[0]>) => void
> : ^ ^^ ^^^^^
>v => v ? [0] : Promise.reject() : (v: boolean) => [0] | Promise<[0]>
>v => v ? [0] : Promise.reject() : (v: boolean) => Promise<[0]> | [0]
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>v : boolean
> : ^^^^^^^
>v ? [0] : Promise.reject() : [0] | Promise<[0]>
>v ? [0] : Promise.reject() : Promise<[0]> | [0]
> : ^^^^^^^^^^^^^^^^^^
>v : boolean
> : ^^^^^^^
@@ -44,7 +44,7 @@ f(async v => v ? [0] : Promise.reject());
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
>v : boolean
> : ^^^^^^^
>v ? [0] : Promise.reject() : [0] | Promise<[0]>
>v ? [0] : Promise.reject() : Promise<[0]> | [0]
> : ^^^^^^^^^^^^^^^^^^
>v : boolean
> : ^^^^^^^
@@ -136,12 +136,12 @@ h(v => v ? (abc) => { } : Promise.reject());
> : ^^^^
>h : (cb: (v: boolean) => MyCallback | PromiseLike<MyCallback>) => void
> : ^ ^^ ^^^^^
>v => v ? (abc) => { } : Promise.reject() : (v: boolean) => ((abc: string) => void) | Promise<MyCallback>
> : ^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>v => v ? (abc) => { } : Promise.reject() : (v: boolean) => Promise<MyCallback> | ((abc: string) => void)
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
>v : boolean
> : ^^^^^^^
>v ? (abc) => { } : Promise.reject() : ((abc: string) => void) | Promise<MyCallback>
> : ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>v ? (abc) => { } : Promise.reject() : Promise<MyCallback> | ((abc: string) => void)
> : ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
>v : boolean
> : ^^^^^^^
>(abc) => { } : (abc: string) => void
@@ -54,13 +54,13 @@ async function main() {
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>await x.next2() : number | AsyncEnumeratorDone
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x.next2() : Promise<AsyncEnumeratorDone> | Promise<number>
>x.next2() : Promise<number> | Promise<AsyncEnumeratorDone>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x.next2 : () => Promise<AsyncEnumeratorDone> | Promise<number>
>x.next2 : () => Promise<number> | Promise<AsyncEnumeratorDone>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : IAsyncEnumerator<number>
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>next2 : () => Promise<AsyncEnumeratorDone> | Promise<number>
>next2 : () => Promise<number> | Promise<AsyncEnumeratorDone>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let c = await x.next3();
@@ -6,7 +6,7 @@ declare let a: number | string;
> : ^^^^^^^^^^^^^^^
declare let b: PromiseLike<number> | PromiseLike<string>;
>b : PromiseLike<number> | PromiseLike<string>
>b : PromiseLike<string> | PromiseLike<number>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
declare let c: PromiseLike<number | string>;
@@ -38,7 +38,7 @@ async function f() {
> : ^^^^^^^^^^^^^^^
>await b : string | number
> : ^^^^^^^^^^^^^^^
>b : PromiseLike<number> | PromiseLike<string>
>b : PromiseLike<string> | PromiseLike<number>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let await_c = await c;
@@ -6,7 +6,7 @@ declare let a: number | string;
> : ^^^^^^^^^^^^^^^
declare let b: PromiseLike<number> | PromiseLike<string>;
>b : PromiseLike<number> | PromiseLike<string>
>b : PromiseLike<string> | PromiseLike<number>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
declare let c: PromiseLike<number | string>;
@@ -38,7 +38,7 @@ async function f() {
> : ^^^^^^^^^^^^^^^
>await b : string | number
> : ^^^^^^^^^^^^^^^
>b : PromiseLike<number> | PromiseLike<string>
>b : PromiseLike<string> | PromiseLike<number>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let await_c = await c;
@@ -8,9 +8,9 @@ error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
awaitedTypeNoLib.ts(3,15): error TS2304: Cannot find name 'PromiseLike'.
awaitedTypeNoLib.ts(18,27): error TS2345: Argument of type 'NotPromise<TResult> | Thenable<NotPromise<TResult>>' is not assignable to parameter of type 'Thenable<TResult>'.
awaitedTypeNoLib.ts(18,27): error TS2345: Argument of type 'Thenable<NotPromise<TResult>> | NotPromise<TResult>' is not assignable to parameter of type 'Thenable<TResult>'.
Type 'NotPromise<TResult>' is not assignable to type 'Thenable<TResult>'.
Type 'TResult | (TResult extends PromiseLike<unknown> ? never : TResult)' is not assignable to type 'Thenable<TResult>'.
Type '(TResult extends PromiseLike<unknown> ? never : TResult) | TResult' is not assignable to type 'Thenable<TResult>'.
Type 'Thenable<unknown> & TResult' is not assignable to type 'Thenable<TResult>'.
Type 'unknown' is not assignable to type 'TResult'.
'TResult' could be instantiated with an arbitrary type which could be unrelated to 'unknown'.
@@ -47,9 +47,9 @@ awaitedTypeNoLib.ts(18,27): error TS2345: Argument of type 'NotPromise<TResult>
// #58547 This previously was a Debug Failure. False expression: type provided should not be a non-generic 'promise'-like.
this.resolvePromise(result, resolve);
~~~~~~
!!! error TS2345: Argument of type 'NotPromise<TResult> | Thenable<NotPromise<TResult>>' is not assignable to parameter of type 'Thenable<TResult>'.
!!! error TS2345: Argument of type 'Thenable<NotPromise<TResult>> | NotPromise<TResult>' is not assignable to parameter of type 'Thenable<TResult>'.
!!! error TS2345: Type 'NotPromise<TResult>' is not assignable to type 'Thenable<TResult>'.
!!! error TS2345: Type 'TResult | (TResult extends PromiseLike<unknown> ? never : TResult)' is not assignable to type 'Thenable<TResult>'.
!!! error TS2345: Type '(TResult extends PromiseLike<unknown> ? never : TResult) | TResult' is not assignable to type 'Thenable<TResult>'.
!!! error TS2345: Type 'Thenable<unknown> & TResult' is not assignable to type 'Thenable<TResult>'.
!!! error TS2345: Type 'unknown' is not assignable to type 'TResult'.
!!! error TS2345: 'TResult' could be instantiated with an arbitrary type which could be unrelated to 'unknown'.
@@ -31,7 +31,7 @@ class Thenable<T> {
> : ^ ^^ ^^ ^^ ^^ ^^^^^^^^^
result: NotPromise<TResult> | Thenable<NotPromise<TResult>>,
>result : NotPromise<TResult> | Thenable<NotPromise<TResult>>
>result : Thenable<NotPromise<TResult>> | NotPromise<TResult>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
resolve: Receiver<TResult>,
@@ -42,7 +42,7 @@ class Thenable<T> {
if (result instanceof Thenable) {
>result instanceof Thenable : boolean
> : ^^^^^^^
>result : NotPromise<TResult> | Thenable<NotPromise<TResult>>
>result : Thenable<NotPromise<TResult>> | NotPromise<TResult>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Thenable : typeof Thenable
> : ^^^^^^^^^^^^^^^
@@ -57,7 +57,7 @@ class Thenable<T> {
> : ^^^^
>resolvePromise : <TResult_1>(result: Thenable<TResult_1>, resolve: Receiver<TResult_1>) => void
> : ^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^
>result : NotPromise<TResult> | Thenable<NotPromise<TResult>>
>result : Thenable<NotPromise<TResult>> | NotPromise<TResult>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>resolve : Receiver<TResult>
> : ^^^^^^^^^^^^^^^^^
@@ -107,9 +107,9 @@ function f2() {
> : ^^^^^^
let y = x ? x : [];
>y : RegExpMatchArray | never[]
>y : never[] | RegExpMatchArray
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
>x ? x : [] : RegExpMatchArray | never[]
>x ? x : [] : never[] | RegExpMatchArray
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : RegExpMatchArray | null
> : ^^^^^^^^^^^^^^^^^^^^^^^
@@ -125,7 +125,7 @@ function f2() {
> : ^^^^^
>y.map : (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[])
> : ^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^
>y : RegExpMatchArray | never[]
>y : never[] | RegExpMatchArray
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
>map : (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[])
> : ^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^
@@ -14,11 +14,11 @@ interface Array<T> {
}
declare const a: (string | number)[] | null[] | undefined[] | {}[];
>a : (string | number)[] | null[] | undefined[] | {}[]
>a : undefined[] | null[] | {}[] | (string | number)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
declare const b: (string | number)[] | null[] | undefined[] | {}[];
>b : (string | number)[] | null[] | undefined[] | {}[]
>b : undefined[] | null[] | {}[] | (string | number)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let x = a.equalsShallow(b);
@@ -28,10 +28,10 @@ let x = a.equalsShallow(b);
> : ^^^^^^^
>a.equalsShallow : (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean)
> : ^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^
>a : (string | number)[] | null[] | undefined[] | {}[]
>a : undefined[] | null[] | {}[] | (string | number)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>equalsShallow : (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean) | (<T>(this: readonly T[], other: readonly T[]) => boolean)
> : ^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^
>b : (string | number)[] | null[] | undefined[] | {}[]
>b : undefined[] | null[] | {}[] | (string | number)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -264,7 +264,7 @@ function assertNever(x: never): never {
}
function f10(x: true | false) {
>f10 : (x: true | false) => "true" | "false"
>f10 : (x: true | false) => "false" | "true"
> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^
>x : boolean
> : ^^^^^^^
@@ -292,7 +292,7 @@ function f10(x: true | false) {
}
function f11(x: true | false) {
>f11 : (x: true | false) => "true" | "false"
>f11 : (x: true | false) => "false" | "true"
> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^
>x : boolean
> : ^^^^^^^
@@ -264,7 +264,7 @@ function assertNever(x: never): never {
}
function f10(x: true | false) {
>f10 : (x: true | false) => "true" | "false"
>f10 : (x: true | false) => "false" | "true"
> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^
>x : boolean
> : ^^^^^^^
@@ -292,7 +292,7 @@ function f10(x: true | false) {
}
function f11(x: true | false) {
>f11 : (x: true | false) => "true" | "false"
>f11 : (x: true | false) => "false" | "true"
> : ^ ^^ ^^^^^^^^^^^^^^^^^^^^^
>x : boolean
> : ^^^^^^^
@@ -20,7 +20,7 @@ builtinIterator.ts(60,3): error TS2416: Property 'next' in type 'BadIterator3' i
Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorYieldResult<number>'.
Types of property 'done' are incompatible.
Type 'boolean' is not assignable to type 'false'.
builtinIterator.ts(70,29): error TS2345: Argument of type 'Generator<string, number, boolean>' is not assignable to parameter of type 'Iterator<string, unknown, undefined> | Iterable<string, unknown, undefined>'.
builtinIterator.ts(70,29): error TS2345: Argument of type 'Generator<string, number, boolean>' is not assignable to parameter of type 'Iterable<string, unknown, undefined> | Iterator<string, unknown, undefined>'.
Type 'Generator<string, number, boolean>' is not assignable to type 'Iterator<string, unknown, undefined>'.
Types of property 'next' are incompatible.
Type '(...[value]: [] | [boolean]) => IteratorResult<string, number>' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult<string, unknown>'.
@@ -29,7 +29,7 @@ builtinIterator.ts(70,29): error TS2345: Argument of type 'Generator<string, num
Type '[undefined]' is not assignable to type '[] | [boolean]'.
Type '[undefined]' is not assignable to type '[boolean]'.
Type 'undefined' is not assignable to type 'boolean'.
builtinIterator.ts(73,35): error TS2322: Type 'Generator<string, number, boolean>' is not assignable to type 'Iterator<string, unknown, undefined> | Iterable<string, unknown, undefined>'.
builtinIterator.ts(73,35): error TS2322: Type 'Generator<string, number, boolean>' is not assignable to type 'Iterable<string, unknown, undefined> | Iterator<string, unknown, undefined>'.
Type 'Generator<string, number, boolean>' is not assignable to type 'Iterator<string, unknown, undefined>'.
Types of property 'next' are incompatible.
Type '(...[value]: [] | [boolean]) => IteratorResult<string, number>' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult<string, unknown>'.
@@ -139,7 +139,7 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator<string, number, boolean
declare const g1: Generator<string, number, boolean>;
const iter1 = Iterator.from(g1);
~~
!!! error TS2345: Argument of type 'Generator<string, number, boolean>' is not assignable to parameter of type 'Iterator<string, unknown, undefined> | Iterable<string, unknown, undefined>'.
!!! error TS2345: Argument of type 'Generator<string, number, boolean>' is not assignable to parameter of type 'Iterable<string, unknown, undefined> | Iterator<string, unknown, undefined>'.
!!! error TS2345: Type 'Generator<string, number, boolean>' is not assignable to type 'Iterator<string, unknown, undefined>'.
!!! error TS2345: Types of property 'next' are incompatible.
!!! error TS2345: Type '(...[value]: [] | [boolean]) => IteratorResult<string, number>' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult<string, unknown>'.
@@ -152,7 +152,7 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator<string, number, boolean
declare const iter2: IteratorObject<string>;
const iter3 = iter2.flatMap(() => g1);
~~
!!! error TS2322: Type 'Generator<string, number, boolean>' is not assignable to type 'Iterator<string, unknown, undefined> | Iterable<string, unknown, undefined>'.
!!! error TS2322: Type 'Generator<string, number, boolean>' is not assignable to type 'Iterable<string, unknown, undefined> | Iterator<string, unknown, undefined>'.
!!! error TS2322: Type 'Generator<string, number, boolean>' is not assignable to type 'Iterator<string, unknown, undefined>'.
!!! error TS2322: Types of property 'next' are incompatible.
!!! error TS2322: Type '(...[value]: [] | [boolean]) => IteratorResult<string, number>' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult<string, unknown>'.
+10 -10
View File
@@ -146,9 +146,9 @@ function* gen() {
}
const mappedGen = gen().map(x => x === 0 ? "zero" : "other");
>mappedGen : IteratorObject<"zero" | "other", undefined, unknown>
>mappedGen : IteratorObject<"other" | "zero", undefined, unknown>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>gen().map(x => x === 0 ? "zero" : "other") : IteratorObject<"zero" | "other", undefined, unknown>
>gen().map(x => x === 0 ? "zero" : "other") : IteratorObject<"other" | "zero", undefined, unknown>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>gen().map : <U>(callbackfn: (value: number, index: number) => U) => IteratorObject<U, undefined, unknown>
> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -158,11 +158,11 @@ const mappedGen = gen().map(x => x === 0 ? "zero" : "other");
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>map : <U>(callbackfn: (value: number, index: number) => U) => IteratorObject<U, undefined, unknown>
> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x => x === 0 ? "zero" : "other" : (x: number) => "zero" | "other"
>x => x === 0 ? "zero" : "other" : (x: number) => "other" | "zero"
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : number
> : ^^^^^^
>x === 0 ? "zero" : "other" : "zero" | "other"
>x === 0 ? "zero" : "other" : "other" | "zero"
> : ^^^^^^^^^^^^^^^^
>x === 0 : boolean
> : ^^^^^^^
@@ -176,9 +176,9 @@ const mappedGen = gen().map(x => x === 0 ? "zero" : "other");
> : ^^^^^^^
const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other");
>mappedValues : IteratorObject<"zero" | "other", undefined, unknown>
>mappedValues : IteratorObject<"other" | "zero", undefined, unknown>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>[0, 1, 2].values().map(x => x === 0 ? "zero" : "other") : IteratorObject<"zero" | "other", undefined, unknown>
>[0, 1, 2].values().map(x => x === 0 ? "zero" : "other") : IteratorObject<"other" | "zero", undefined, unknown>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>[0, 1, 2].values().map : <U>(callbackfn: (value: number, index: number) => U) => IteratorObject<U, undefined, unknown>
> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -198,11 +198,11 @@ const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other");
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>map : <U>(callbackfn: (value: number, index: number) => U) => IteratorObject<U, undefined, unknown>
> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x => x === 0 ? "zero" : "other" : (x: number) => "zero" | "other"
>x => x === 0 ? "zero" : "other" : (x: number) => "other" | "zero"
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : number
> : ^^^^^^
>x === 0 ? "zero" : "other" : "zero" | "other"
>x === 0 ? "zero" : "other" : "other" | "zero"
> : ^^^^^^^^^^^^^^^^
>x === 0 : boolean
> : ^^^^^^^
@@ -415,11 +415,11 @@ const iter3 = iter2.flatMap(() => g1);
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>iter2.flatMap(() => g1) : IteratorObject<string, undefined, unknown>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>iter2.flatMap : <U>(callback: (value: string, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>) => IteratorObject<U, undefined, unknown>
>iter2.flatMap : <U>(callback: (value: string, index: number) => Iterable<U, unknown, undefined> | Iterator<U, unknown, undefined>) => IteratorObject<U, undefined, unknown>
> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>iter2 : IteratorObject<string, unknown, unknown>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>flatMap : <U>(callback: (value: string, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>) => IteratorObject<U, undefined, unknown>
>flatMap : <U>(callback: (value: string, index: number) => Iterable<U, unknown, undefined> | Iterator<U, unknown, undefined>) => IteratorObject<U, undefined, unknown>
> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>() => g1 : () => Generator<string, number, boolean>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -143,21 +143,21 @@ var r6 = foo6(1);
> : ^
function foo7(x) {
>foo7 : (x: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>foo7 : (x: any) => "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : any
return typeof x;
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : any
}
var r7 = foo7(1);
>r7 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>r7 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo7(1) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>foo7(1) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo7 : (x: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>foo7 : (x: any) => "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>1 : 1
> : ^
@@ -37,29 +37,29 @@ x.f() // no error because f expects void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
declare const xUnion: X<void | number>;
>xUnion : X<number | void>
>xUnion : X<void | number>
> : ^^^^^^^^^^^^^^^^
xUnion.f(42) // no error because f accepts number
>xUnion.f(42) : { a: number | void; }
>xUnion.f(42) : { a: void | number; }
> : ^^^^^^^^^^^^^^^^^^^^^
>xUnion.f : (t: number | void) => { a: number | void; }
>xUnion.f : (t: void | number) => { a: void | number; }
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>xUnion : X<number | void>
>xUnion : X<void | number>
> : ^^^^^^^^^^^^^^^^
>f : (t: number | void) => { a: number | void; }
>f : (t: void | number) => { a: void | number; }
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>42 : 42
> : ^^
xUnion.f() // no error because f accepts void
>xUnion.f() : { a: number | void; }
>xUnion.f() : { a: void | number; }
> : ^^^^^^^^^^^^^^^^^^^^^
>xUnion.f : (t: number | void) => { a: number | void; }
>xUnion.f : (t: void | number) => { a: void | number; }
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>xUnion : X<number | void>
>xUnion : X<void | number>
> : ^^^^^^^^^^^^^^^^
>f : (t: number | void) => { a: number | void; }
>f : (t: void | number) => { a: void | number; }
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
declare const xAny: X<any>;
@@ -137,17 +137,17 @@ new MyPromise<void>(resolve => resolve()); // no error
> : ^ ^^^^^^^^^^^
new MyPromise<void | number>(resolve => resolve()); // no error
>new MyPromise<void | number>(resolve => resolve()) : MyPromise<number | void>
>new MyPromise<void | number>(resolve => resolve()) : MyPromise<void | number>
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>MyPromise : typeof MyPromise
> : ^^^^^^^^^^^^^^^^
>resolve => resolve() : (resolve: (value: number | void) => void) => void
>resolve => resolve() : (resolve: (value: void | number) => void) => void
> : ^ ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
>resolve : (value: number | void) => void
>resolve : (value: void | number) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^
>resolve() : void
> : ^^^^
>resolve : (value: number | void) => void
>resolve : (value: void | number) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^
new MyPromise<any>(resolve => resolve()); // error, `any` arguments cannot be omitted
@@ -304,11 +304,11 @@ b(4); // not ok
function c(x: number | void, y: void, z: void | string | number): void {
>c : (x: number | void, y: void, z: void | string | number) => void
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>x : number | void
>x : void | number
> : ^^^^^^^^^^^^^
>y : void
> : ^^^^
>z : string | number | void
>z : void | string | number
> : ^^^^^^^^^^^^^^^^^^^^^^
}
@@ -469,9 +469,9 @@ call((x: number | void, y: number | void) => 42) // ok
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^
>(x: number | void, y: number | void) => 42 : (x: number | void, y: number | void) => number
> : ^ ^^ ^^ ^^ ^^^^^^^^^^^
>x : number | void
>x : void | number
> : ^^^^^^^^^^^^^
>y : number | void
>y : void | number
> : ^^^^^^^^^^^^^
>42 : 42
> : ^^
@@ -483,9 +483,9 @@ call((x: number | void, y: number | void) => 42, 4) // ok
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^
>(x: number | void, y: number | void) => 42 : (x: number | void, y: number | void) => number
> : ^ ^^ ^^ ^^ ^^^^^^^^^^^
>x : number | void
>x : void | number
> : ^^^^^^^^^^^^^
>y : number | void
>y : void | number
> : ^^^^^^^^^^^^^
>42 : 42
> : ^^
@@ -499,9 +499,9 @@ call((x: number | void, y: number | void) => 42, 4, 2) // ok
> : ^ ^^^^^^^^^ ^^ ^^ ^^^^^ ^^ ^^^^^
>(x: number | void, y: number | void) => 42 : (x: number | void, y: number | void) => number
> : ^ ^^ ^^ ^^ ^^^^^^^^^^^
>x : number | void
>x : void | number
> : ^^^^^^^^^^^^^
>y : number | void
>y : void | number
> : ^^^^^^^^^^^^^
>42 : 42
> : ^^
@@ -38,15 +38,15 @@ declare const pli: {
> : ^
(streams: ReadonlyArray<R | W | RW>): Promise<void>;
>streams : readonly (R | W | RW)[]
>streams : readonly (R | RW | W)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^
(s1: R, s2: RW | W, ...streams: Array<RW | W>): Promise<void>;
>s1 : R
> : ^
>s2 : W | RW
>s2 : RW | W
> : ^^^^^^
>streams : (W | RW)[]
>streams : (RW | W)[]
> : ^^^^^^^^^^
}
@@ -18,7 +18,7 @@ function test1() {
> : ^^^^^^^^^^
type stringType1 = "foo" | "bar";
>stringType1 : "foo" | "bar"
>stringType1 : "bar" | "foo"
> : ^^^^^^^^^^^^^
type stringType2 = "baz" | "bar";
@@ -27,9 +27,9 @@ function test1() {
interface Temp1 {
getValue(name: stringType1): number;
>getValue : (name: "foo" | "bar") => number
>getValue : (name: "bar" | "foo") => number
> : ^ ^^^^^^^^^^^^^^^^^^^^
>name : "foo" | "bar"
>name : "bar" | "foo"
> : ^^^^^^^^^^^^^
}
@@ -52,11 +52,11 @@ function test1() {
> : ^^^^^^^^^^^^^^^
>t.getValue("bar") : string | number
> : ^^^^^^^^^^^^^^^
>t.getValue : ((name: "foo" | "bar") => number) | ((name: "bar" | "baz") => string)
>t.getValue : ((name: "bar" | "foo") => number) | ((name: "bar" | "baz") => string)
> : ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^
>t : Temp1 | Temp2
> : ^^^^^^^^^^^^^
>getValue : ((name: "foo" | "bar") => number) | ((name: "bar" | "baz") => string)
>getValue : ((name: "bar" | "foo") => number) | ((name: "bar" | "baz") => string)
> : ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^
>"bar" : "bar"
> : ^^^^^
@@ -122,7 +122,7 @@ function test2() {
> : ^ ^^ ^^^^^^^^^^^
>(type: "foo" | "bar") => messages[type]({ a: "A", b: 0 }) : (type: "foo" | "bar") => string
> : ^ ^^ ^^^^^^^^^^^
>type : "foo" | "bar"
>type : "bar" | "foo"
> : ^^^^^^^^^^^^^
messages[type]({ a: "A", b: 0 });
@@ -132,7 +132,7 @@ function test2() {
> : ^^ ^^ ^^^^^ ^^^^^^ ^^ ^^^^^ ^
>messages : Messages
> : ^^^^^^^^
>type : "foo" | "bar"
>type : "bar" | "foo"
> : ^^^^^^^^^^^^^
>{ a: "A", b: 0 } : { a: string; b: number; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -230,7 +230,7 @@ declare var A;
>(<any>typeof A) : any
> : ^^^
><any>typeof A : any
>typeof A : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof A : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>A : any
>x : any
+2 -2
View File
@@ -14,7 +14,7 @@ async function f() {
> : ^
typeof await 0;
>typeof await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof await 0 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>await 0 : 0
> : ^
@@ -36,7 +36,7 @@ async function f() {
> : ^^^^^^^^^
><string> typeof <number> void await 0 : string
> : ^^^^^^
>typeof <number> void await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof <number> void await 0 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
><number> void await 0 : number
> : ^^^^^^
@@ -22,7 +22,7 @@ function f1() {
> : ^^^^^^
return 5 || true;
>5 || true : true | 5
>5 || true : 5 | true
> : ^^^^^^^^
>5 : 5
> : ^
@@ -70,7 +70,7 @@ var k = function (x) { return x }
function blargle(s) {
>blargle : (x: "hi" | "bye") => 0 | 1 | 2
> : ^ ^^ ^^^^^
>s : "hi" | "bye"
>s : "bye" | "hi"
> : ^^^^^^^^^^^^
return 0;
@@ -103,7 +103,7 @@ function monaLisa(sb) {
> : ^^^^^
>typeof sb === 'string' : boolean
> : ^^^^^^^
>typeof sb : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof sb : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>sb : any
> : ^^^
@@ -15,7 +15,7 @@ interface Prop {
> : ^^^^^^
children: JSX.Element | JSX.Element[];
>children : JSX.Element | JSX.Element[]
>children : JSX.Element[] | JSX.Element
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>JSX : any
> : ^^^
@@ -15,7 +15,7 @@ interface Prop {
> : ^^^^^^
children: JSX.Element | JSX.Element[];
>children : JSX.Element | JSX.Element[]
>children : JSX.Element[] | JSX.Element
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>JSX : any
> : ^^^
@@ -1,6 +1,6 @@
file.tsx(24,40): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
file.tsx(26,22): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
file.tsx(27,30): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
file.tsx(24,40): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element[] | Element'.
file.tsx(26,22): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element[] | Element'.
file.tsx(27,30): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element[] | Element'.
==== file.tsx (3 errors) ====
@@ -29,12 +29,12 @@ file.tsx(27,30): error TS2747: 'Comp' components don't accept text as child elem
// Error: whitespaces matters
let k1 = <Comp a={10} b="hi"><Button /> <AnotherButton /></Comp>;
~~
!!! error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
!!! error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element[] | Element'.
let k2 = <Comp a={10} b="hi"><Button />
<AnotherButton /> </Comp>;
~~
!!! error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
!!! error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element[] | Element'.
let k3 = <Comp a={10} b="hi"> <Button />
~~~~
!!! error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
!!! error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element[] | Element'.
<AnotherButton /></Comp>;
@@ -15,7 +15,7 @@ interface Prop {
> : ^^^^^^
children: JSX.Element | JSX.Element[];
>children : JSX.Element | JSX.Element[]
>children : JSX.Element[] | JSX.Element
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>JSX : any
> : ^^^
@@ -15,7 +15,7 @@ interface Prop {
> : ^^^^^^
children: string | JSX.Element | (string | JSX.Element)[];
>children : string | JSX.Element | (string | JSX.Element)[]
>children : string | (string | JSX.Element)[] | JSX.Element
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>JSX : any
> : ^^^
@@ -52,7 +52,7 @@ interface PM {
export function ComponentWithUnion(props: PM | PS) {
>ComponentWithUnion : (props: PM | PS) => JSX.Element
> : ^ ^^ ^^^^^^^^^^^^^^^^
>props : PS | PM
>props : PM | PS
> : ^^^^^^^
return <h1></h1>;
@@ -229,11 +229,11 @@ class C1 extends A {
> : ^^^^
let e1 = { w: !!true ? super() : 0 };
>e1 : { w: number | void; }
>e1 : { w: void | number; }
> : ^^^^^^^^^^^^^^^^^^^^^
>{ w: !!true ? super() : 0 } : { w: number | void; }
>{ w: !!true ? super() : 0 } : { w: void | number; }
> : ^^^^^^^^^^^^^^^^^^^^^
>w : number | void
>w : void | number
> : ^^^^^^^^^^^^^
>!!true ? super() : 0 : void | 0
> : ^^^^^^^^
@@ -6,10 +6,8 @@ circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[keyof TInjectedProps & string] | TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
==== circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts (1 errors) ====
@@ -85,8 +83,6 @@ circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[keyof TInjectedProps & string] | TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
@@ -27,7 +27,7 @@ var x: StringTree;
if (typeof x !== "string") {
>typeof x !== "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : StringTree
> : ^^^^^^^^^^
@@ -81,9 +81,9 @@ class Bar {
}
let u = "FOO" as "FOO" | "BAR";
>u : "FOO" | "BAR"
>u : "BAR" | "FOO"
> : ^^^^^^^^^^^^^
>"FOO" as "FOO" | "BAR" : "FOO" | "BAR"
>"FOO" as "FOO" | "BAR" : "BAR" | "FOO"
> : ^^^^^^^^^^^^^
>"FOO" : "FOO"
> : ^^^^^
@@ -96,7 +96,7 @@ class CFA {
u = "BAR";
>u = "BAR" : "BAR"
> : ^^^^^
>u : "FOO" | "BAR"
>u : "BAR" | "FOO"
> : ^^^^^^^^^^^^^
>"BAR" : "BAR"
> : ^^^^^
@@ -305,7 +305,7 @@ declare function tryCast<TOut extends TIn, TIn = any>(value: TIn | undefined, te
function bar(node: Identifier | FunctionDeclaration) {
>bar : (node: Identifier | FunctionDeclaration) => void
> : ^ ^^ ^^^^^^^^^
>node : Identifier | FunctionDeclaration
>node : FunctionDeclaration | Identifier
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
const a = tryCast(node, isExpression); // tryCast<Expression, Node>
@@ -315,7 +315,7 @@ function bar(node: Identifier | FunctionDeclaration) {
> : ^^^^^^^^^^
>tryCast : <TOut extends TIn, TIn = any>(value: TIn | undefined, test: (value: TIn) => value is TOut) => TOut
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^ ^^ ^^ ^^ ^^^^^
>node : Identifier | FunctionDeclaration
>node : FunctionDeclaration | Identifier
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>isExpression : (node: Node) => node is Expression
> : ^ ^^ ^^^^^
@@ -398,13 +398,13 @@ buildOverload("updateImportDeclaration")
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : undefined
> : ^^^^^^^^^
>modifiers : readonly Modifier[] | readonly Decorator[] | undefined
>modifiers : readonly Decorator[] | readonly Modifier[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>importClause : ImportClause | readonly Modifier[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>moduleSpecifier : Expression | ImportClause | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>assertClause : Expression | AssertClause | undefined
>assertClause : AssertClause | Expression | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>other : AssertClause | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -434,7 +434,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>modifiers === undefined : boolean
> : ^^^^^^^
>modifiers : readonly Modifier[] | readonly Decorator[] | undefined
>modifiers : readonly Decorator[] | readonly Modifier[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>undefined : undefined
> : ^^^^^^^^^
@@ -442,7 +442,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>every : { <T, U extends T>(array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; <T, U extends T>(array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; <T>(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; }
> : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^^ ^^^
>modifiers : readonly Modifier[] | readonly Decorator[]
>modifiers : readonly Decorator[] | readonly Modifier[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>isModifier : (node: Node) => node is Modifier
> : ^ ^^ ^^^^^
@@ -492,7 +492,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>assertClause === undefined : boolean
> : ^^^^^^^
>assertClause : Expression | AssertClause | undefined
>assertClause : AssertClause | Expression | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>undefined : undefined
> : ^^^^^^^^^
@@ -500,7 +500,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>isAssertClause : (node: Node) => node is AssertClause
> : ^ ^^ ^^^^^
>assertClause : Expression | AssertClause
>assertClause : AssertClause | Expression
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
1: ([, decorators, modifiers, importClause, moduleSpecifier, assertClause]) =>
@@ -510,13 +510,13 @@ buildOverload("updateImportDeclaration")
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : undefined
> : ^^^^^^^^^
>decorators : readonly Modifier[] | readonly Decorator[] | undefined
>decorators : readonly Decorator[] | readonly Modifier[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>modifiers : ImportClause | readonly Modifier[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>importClause : Expression | ImportClause | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>moduleSpecifier : Expression | AssertClause | undefined
>moduleSpecifier : AssertClause | Expression | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>assertClause : AssertClause | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -536,7 +536,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>decorators === undefined : boolean
> : ^^^^^^^
>decorators : readonly Modifier[] | readonly Decorator[] | undefined
>decorators : readonly Decorator[] | readonly Modifier[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>undefined : undefined
> : ^^^^^^^^^
@@ -544,7 +544,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>every : { <T, U extends T>(array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; <T, U extends T>(array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; <T>(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; }
> : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^^ ^^^
>decorators : readonly Modifier[] | readonly Decorator[]
>decorators : readonly Decorator[] | readonly Modifier[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>isDecorator : (node: Node) => node is Decorator
> : ^ ^^ ^^^^^
@@ -592,7 +592,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>moduleSpecifier !== undefined : boolean
> : ^^^^^^^
>moduleSpecifier : Expression | AssertClause | undefined
>moduleSpecifier : AssertClause | Expression | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>undefined : undefined
> : ^^^^^^^^^
@@ -600,7 +600,7 @@ buildOverload("updateImportDeclaration")
> : ^^^^^^^
>isExpression : (node: Node) => node is Expression
> : ^ ^^ ^^^^^
>moduleSpecifier : Expression | AssertClause
>moduleSpecifier : AssertClause | Expression
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
(assertClause === undefined || isAssertClause(assertClause)),
@@ -641,7 +641,7 @@ buildOverload("updateImportDeclaration")
declare const modifiers: readonly Modifier[] | readonly Decorator[];
>modifiers : readonly Modifier[] | readonly Decorator[]
>modifiers : readonly Decorator[] | readonly Modifier[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
function foo() {
@@ -653,7 +653,7 @@ function foo() {
> : ^^^^^^^
>every : { <T, U extends T>(array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; <T, U extends T>(array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; <T>(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; }
> : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^^ ^^^
>modifiers : readonly Modifier[] | readonly Decorator[]
>modifiers : readonly Decorator[] | readonly Modifier[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>isModifier : (node: Node) => node is Modifier
> : ^ ^^ ^^^^^
@@ -663,7 +663,7 @@ function foo() {
> : ^^^^^^^
>every : { <T, U extends T>(array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; <T, U extends T>(array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; <T>(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; }
> : ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^^ ^^^
>modifiers : readonly Modifier[] | readonly Decorator[]
>modifiers : readonly Decorator[] | readonly Modifier[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>isDecorator : (node: Node) => node is Decorator
> : ^ ^^ ^^^^^
@@ -0,0 +1,34 @@
coAndContraVariantInferences5.ts(9,9): error TS2322: Type '(status: Thing | null) => void' is not assignable to type '(key: string) => void'.
Types of parameters 'status' and 'key' are incompatible.
Type 'string' is not assignable to type 'Thing | null'.
==== coAndContraVariantInferences5.ts (1 errors) ====
type Thing = 'a' | 'b';
function f(
options: SelectOptions<Thing>,
onChange: (status: Thing | null) => void,
): void {
select({
options,
onChange,
~~~~~~~~
!!! error TS2322: Type '(status: Thing | null) => void' is not assignable to type '(key: string) => void'.
!!! error TS2322: Types of parameters 'status' and 'key' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'Thing | null'.
!!! related TS6500 coAndContraVariantInferences5.ts:17:5: The expected type comes from property 'onChange' which is declared here on type 'SelectProps<string>'
});
}
declare function select<KeyT extends string>(props: SelectProps<KeyT>): void;
type SelectProps<KeyT extends string> = {
options?: SelectOptions<KeyT>;
onChange: (key: KeyT) => void;
};
type SelectOptions<KeyT extends string> =
| Array<{key: KeyT}>
| Array<KeyT>;
@@ -54,7 +54,7 @@ declare function createElementIsolated<P extends {}>(
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^^ ^^^^^
type: FunctionComponent<P> | ComponentClass<P> | string,
>type : string | FunctionComponent<P> | ComponentClass<P>
>type : string | ComponentClass<P> | FunctionComponent<P>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
props?: P | null,
@@ -10,7 +10,7 @@ var yy: any;
> : ^^^
function fn() {
>fn : () => "zero or one" | "more than one"
>fn : () => "more than one" | "zero or one"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let arr: any[] = [];
@@ -267,7 +267,7 @@ xx = (typeof xx, 'unused');
> : ^^^^^^^^
>typeof xx, 'unused' : "unused"
> : ^^^^^^^^
>typeof xx : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof xx : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>xx : any
> : ^^^
@@ -52,7 +52,7 @@
"kind": "method",
"kindModifiers": "",
"sortText": "11",
"insertText": "pipe(): Observable<any>;\npipe<A>(): Observable<A>;\npipe<A, B>(): Observable<B>;\npipe<A, B, C>(): Observable<C>;\npipe<A, B, C, D>(): Observable<D>;\npipe<A, B, C, D, E>(): Observable<E>;\npipe<A, B, C, D, E, F>(): Observable<F>;\npipe<A, B, C, D, E, F, G>(): Observable<G>;\npipe<A, B, C, D, E, F, G, H>(): Observable<H>;\npipe<A, B, C, D, E, F, G, H, I>(): Observable<I>;\npipe<A, B, C, D, E, F, G, H, I>(): Observable<unknown>;\npipe(): Observable<any> | Observable<A> | Observable<B> | Observable<C> | Observable<D> | Observable<E> | Observable<F> | Observable<G> | Observable<H> | Observable<I> | Observable<unknown> {\n $0\n}",
"insertText": "pipe(): Observable<any>;\npipe<A>(): Observable<A>;\npipe<A, B>(): Observable<B>;\npipe<A, B, C>(): Observable<C>;\npipe<A, B, C, D>(): Observable<D>;\npipe<A, B, C, D, E>(): Observable<E>;\npipe<A, B, C, D, E, F>(): Observable<F>;\npipe<A, B, C, D, E, F, G>(): Observable<G>;\npipe<A, B, C, D, E, F, G, H>(): Observable<H>;\npipe<A, B, C, D, E, F, G, H, I>(): Observable<I>;\npipe<A, B, C, D, E, F, G, H, I>(): Observable<unknown>;\npipe(): Observable<any> | Observable<unknown> | Observable<A> | Observable<B> | Observable<C> | Observable<D> | Observable<E> | Observable<F> | Observable<G> | Observable<H> | Observable<I> {\n $0\n}",
"filterText": "pipe",
"isSnippet": true,
"displayParts": [
@@ -2618,7 +2618,7 @@
// | interface ClassDecoratorContext<Class extends abstract new (...args: any) => any = abstract new (...args: any) => any>
// | interface ClassFieldDecoratorContext<This = unknown, Value = unknown>
// | interface ClassGetterDecoratorContext<This = unknown, Value = unknown>
// | type ClassMemberDecoratorContext = ClassMethodDecoratorContext<unknown, (this: unknown, ...args: any) => any> | ClassGetterDecoratorContext<unknown, unknown> | ClassSetterDecoratorContext<unknown, unknown> | ClassFieldDecoratorContext<...> | ClassAccessorDecoratorContext<...>
// | type ClassMemberDecoratorContext = ClassAccessorDecoratorContext<unknown, unknown> | ClassFieldDecoratorContext<unknown, unknown> | ClassGetterDecoratorContext<unknown, unknown> | ClassMethodDecoratorContext<...> | ClassSetterDecoratorContext<...>
// | interface ClassMethodDecoratorContext<This = unknown, Value extends (this: This, ...args: any) => any = (this: This, ...args: any) => any>
// | interface ClassSetterDecoratorContext<This = unknown, Value = unknown>
// | interface ConcatArray<T>
@@ -2629,7 +2629,7 @@
// | interface Date
// | var Date: DateConstructor
// | interface DateConstructor
// | type DecoratorContext = ClassMemberDecoratorContext | ClassDecoratorContext<abstract new (...args: any) => any>
// | type DecoratorContext = ClassDecoratorContext<abstract new (...args: any) => any> | ClassMemberDecoratorContext
// | type DecoratorMetadata = Record<PropertyKey, unknown> & object
// | type DecoratorMetadataObject = Record<PropertyKey, unknown> & object
// | interface Error
@@ -2798,7 +2798,7 @@
// | interface ClassDecoratorContext<Class extends abstract new (...args: any) => any = abstract new (...args: any) => any>
// | interface ClassFieldDecoratorContext<This = unknown, Value = unknown>
// | interface ClassGetterDecoratorContext<This = unknown, Value = unknown>
// | type ClassMemberDecoratorContext = ClassMethodDecoratorContext<unknown, (this: unknown, ...args: any) => any> | ClassGetterDecoratorContext<unknown, unknown> | ClassSetterDecoratorContext<unknown, unknown> | ClassFieldDecoratorContext<...> | ClassAccessorDecoratorContext<...>
// | type ClassMemberDecoratorContext = ClassAccessorDecoratorContext<unknown, unknown> | ClassFieldDecoratorContext<unknown, unknown> | ClassGetterDecoratorContext<unknown, unknown> | ClassMethodDecoratorContext<...> | ClassSetterDecoratorContext<...>
// | interface ClassMethodDecoratorContext<This = unknown, Value extends (this: This, ...args: any) => any = (this: This, ...args: any) => any>
// | interface ClassSetterDecoratorContext<This = unknown, Value = unknown>
// | interface ConcatArray<T>
@@ -2809,7 +2809,7 @@
// | interface Date
// | var Date: DateConstructor
// | interface DateConstructor
// | type DecoratorContext = ClassMemberDecoratorContext | ClassDecoratorContext<abstract new (...args: any) => any>
// | type DecoratorContext = ClassDecoratorContext<abstract new (...args: any) => any> | ClassMemberDecoratorContext
// | type DecoratorMetadata = Record<PropertyKey, unknown> & object
// | type DecoratorMetadataObject = Record<PropertyKey, unknown> & object
// | interface Error
@@ -76027,7 +76027,7 @@
"kind": "space"
},
{
"text": "ClassMethodDecoratorContext",
"text": "ClassAccessorDecoratorContext",
"kind": "interfaceName"
},
{
@@ -76047,21 +76047,33 @@
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
"text": "unknown",
"kind": "keyword"
},
{
"text": "this",
"kind": "parameterName"
},
{
"text": ":",
"text": ">",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassFieldDecoratorContext",
"kind": "interfaceName"
},
{
"text": "<",
"kind": "punctuation"
},
{
"text": "unknown",
"kind": "keyword"
@@ -76075,43 +76087,7 @@
"kind": "space"
},
{
"text": "...",
"kind": "punctuation"
},
{
"text": "args",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"text": "unknown",
"kind": "keyword"
},
{
@@ -76171,47 +76147,7 @@
"kind": "space"
},
{
"text": "ClassSetterDecoratorContext",
"kind": "interfaceName"
},
{
"text": "<",
"kind": "punctuation"
},
{
"text": "unknown",
"kind": "keyword"
},
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "unknown",
"kind": "keyword"
},
{
"text": ">",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassFieldDecoratorContext",
"text": "ClassMethodDecoratorContext",
"kind": "interfaceName"
},
{
@@ -76239,7 +76175,7 @@
"kind": "space"
},
{
"text": "ClassAccessorDecoratorContext",
"text": "ClassSetterDecoratorContext",
"kind": "interfaceName"
},
{
@@ -77132,22 +77068,6 @@
"text": " ",
"kind": "space"
},
{
"text": "ClassMemberDecoratorContext",
"kind": "aliasName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassDecoratorContext",
"kind": "interfaceName"
@@ -77219,6 +77139,22 @@
{
"text": ">",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassMemberDecoratorContext",
"kind": "aliasName"
}
],
"documentation": [
@@ -85498,7 +85434,7 @@
"kind": "space"
},
{
"text": "ClassMethodDecoratorContext",
"text": "ClassAccessorDecoratorContext",
"kind": "interfaceName"
},
{
@@ -85518,21 +85454,33 @@
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
"text": "unknown",
"kind": "keyword"
},
{
"text": "this",
"kind": "parameterName"
},
{
"text": ":",
"text": ">",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassFieldDecoratorContext",
"kind": "interfaceName"
},
{
"text": "<",
"kind": "punctuation"
},
{
"text": "unknown",
"kind": "keyword"
@@ -85546,43 +85494,7 @@
"kind": "space"
},
{
"text": "...",
"kind": "punctuation"
},
{
"text": "args",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"text": "unknown",
"kind": "keyword"
},
{
@@ -85642,47 +85554,7 @@
"kind": "space"
},
{
"text": "ClassSetterDecoratorContext",
"kind": "interfaceName"
},
{
"text": "<",
"kind": "punctuation"
},
{
"text": "unknown",
"kind": "keyword"
},
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "unknown",
"kind": "keyword"
},
{
"text": ">",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassFieldDecoratorContext",
"text": "ClassMethodDecoratorContext",
"kind": "interfaceName"
},
{
@@ -85710,7 +85582,7 @@
"kind": "space"
},
{
"text": "ClassAccessorDecoratorContext",
"text": "ClassSetterDecoratorContext",
"kind": "interfaceName"
},
{
@@ -86603,22 +86475,6 @@
"text": " ",
"kind": "space"
},
{
"text": "ClassMemberDecoratorContext",
"kind": "aliasName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassDecoratorContext",
"kind": "interfaceName"
@@ -86690,6 +86546,22 @@
{
"text": ">",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "ClassMemberDecoratorContext",
"kind": "aliasName"
}
],
"documentation": [
@@ -62,7 +62,7 @@ interface Collection<K, V> {
> : ^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^
>reducer : (reduction: V | R, value: V, key: K, iter: this) => R
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>reduction : V | R
>reduction : R | V
> : ^^^^^
>value : V
> : ^
@@ -152,7 +152,7 @@ declare module Immutable {
> : ^ ^^ ^^ ^^ ^^ ^^^ ^^^^^
>key : string | number
> : ^^^^^^^^^^^^^^^
>sequence : Collection.Keyed<string, any> | Collection.Indexed<any>
>sequence : Collection.Indexed<any> | Collection.Keyed<string, any>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Collection : any
> : ^^^
@@ -356,7 +356,7 @@ declare module Immutable {
merge(...collections: Array<Collection.Indexed<T> | Array<T>>): this;
>merge : (...collections: Array<Collection.Indexed<T> | Array<T>>) => this
> : ^^^^ ^^ ^^^^^
>collections : (Collection.Indexed<T> | T[])[]
>collections : (T[] | Collection.Indexed<T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Collection : any
> : ^^^
@@ -372,7 +372,7 @@ declare module Immutable {
> : ^
>key : number
> : ^^^^^^
>collections : (Collection.Indexed<T> | T[])[]
>collections : (T[] | Collection.Indexed<T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Collection : any
> : ^^^
@@ -380,7 +380,7 @@ declare module Immutable {
mergeDeep(...collections: Array<Collection.Indexed<T> | Array<T>>): this;
>mergeDeep : (...collections: Array<Collection.Indexed<T> | Array<T>>) => this
> : ^^^^ ^^ ^^^^^
>collections : (Collection.Indexed<T> | T[])[]
>collections : (T[] | Collection.Indexed<T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Collection : any
> : ^^^
@@ -396,7 +396,7 @@ declare module Immutable {
> : ^
>key : number
> : ^^^^^^
>collections : (Collection.Indexed<T> | T[])[]
>collections : (T[] | Collection.Indexed<T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Collection : any
> : ^^^
@@ -1108,25 +1108,25 @@ declare module Immutable {
union(...collections: Array<Collection<any, T> | Array<T>>): this;
>union : (...collections: Array<Collection<any, T> | Array<T>>) => this
> : ^^^^ ^^ ^^^^^
>collections : (Collection<any, T> | T[])[]
>collections : (T[] | Collection<any, T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
merge(...collections: Array<Collection<any, T> | Array<T>>): this;
>merge : (...collections: Array<Collection<any, T> | Array<T>>) => this
> : ^^^^ ^^ ^^^^^
>collections : (Collection<any, T> | T[])[]
>collections : (T[] | Collection<any, T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
intersect(...collections: Array<Collection<any, T> | Array<T>>): this;
>intersect : (...collections: Array<Collection<any, T> | Array<T>>) => this
> : ^^^^ ^^ ^^^^^
>collections : (Collection<any, T> | T[])[]
>collections : (T[] | Collection<any, T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
subtract(...collections: Array<Collection<any, T> | Array<T>>): this;
>subtract : (...collections: Array<Collection<any, T> | Array<T>>) => this
> : ^^^^ ^^ ^^^^^
>collections : (Collection<any, T> | T[])[]
>collections : (T[] | Collection<any, T>)[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Transient changes
@@ -1559,11 +1559,11 @@ declare module Immutable {
export interface Class<T extends Object> {
(values?: Partial<T> | Iterable<[string, any]>): Instance<T> & Readonly<T>;
>values : Partial<T> | Iterable<[string, any]>
>values : Iterable<[string, any]> | Partial<T>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
new (values?: Partial<T> | Iterable<[string, any]>): Instance<T> & Readonly<T>;
>values : Partial<T> | Iterable<[string, any]>
>values : Iterable<[string, any]> | Partial<T>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
export interface Instance<T extends Object> {
@@ -3359,7 +3359,7 @@ declare module Immutable {
> : ^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^
>reducer : (reduction: V | R, value: V, key: K, iter: this) => R
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>reduction : V | R
>reduction : R | V
> : ^^^^^
>value : V
> : ^
@@ -3391,7 +3391,7 @@ declare module Immutable {
> : ^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^
>reducer : (reduction: V | R, value: V, key: K, iter: this) => R
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>reduction : V | R
>reduction : R | V
> : ^^^^^
>value : V
> : ^
@@ -1,27 +1,27 @@
complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts(33,5): error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>>'.
Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts(33,5): error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, EmailChannel> | ChannelOfType<T, TextChannel>>'.
Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, EmailChannel> | ChannelOfType<T, TextChannel>, "type">'.
Types of property 'type' are incompatible.
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
Type '"text"' is not assignable to type 'T & "text"'.
Type '"text"' is not assignable to type 'T'.
'"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
Type '"text"' is not assignable to type 'T & "text"'.
Type '"text"' is not assignable to type 'T'.
'"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
Type 'T' is not assignable to type 'T & "text"'.
Type '"text" | "email"' is not assignable to type 'T & "text"'.
Type '"text"' is not assignable to type 'T & "text"'.
Type '"text"' is not assignable to type 'T'.
'"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
Type 'T' is not assignable to type '"text"'.
Type '"text" | "email"' is not assignable to type '"text"'.
Type '"email"' is not assignable to type '"text"'.
Type 'T' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"] & ChannelOfType<T, TextChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"] & ChannelOfType<T, TextChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"] & ChannelOfType<T, TextChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
Type '"email"' is not assignable to type 'T & "email"'.
Type '"email"' is not assignable to type 'T'.
'"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'.
Type 'T' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
Type '"email"' is not assignable to type 'T & "email"'.
Type '"email"' is not assignable to type 'T'.
'"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'.
Type 'T' is not assignable to type 'T & "email"'.
Type '"email" | "text"' is not assignable to type 'T & "email"'.
Type '"email"' is not assignable to type 'T & "email"'.
Type '"email"' is not assignable to type 'T'.
'"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'.
Type 'T' is not assignable to type '"email"'.
Type '"email" | "text"' is not assignable to type '"email"'.
Type '"text"' is not assignable to type '"email"'.
==== complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts (1 errors) ====
@@ -59,30 +59,30 @@ complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts(33,5): error TS2322
const localChannelId = `blahblahblah`;
return { type, localChannelId };
~~~~~~
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>>'.
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, EmailChannel> | ChannelOfType<T, TextChannel>>'.
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, EmailChannel> | ChannelOfType<T, TextChannel>, "type">'.
!!! error TS2322: Types of property 'type' are incompatible.
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"] & ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
!!! error TS2322: Type '"text"' is not assignable to type 'T'.
!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
!!! error TS2322: Type '"text"' is not assignable to type 'T'.
!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
!!! error TS2322: Type 'T' is not assignable to type 'T & "text"'.
!!! error TS2322: Type '"text" | "email"' is not assignable to type 'T & "text"'.
!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'.
!!! error TS2322: Type '"text"' is not assignable to type 'T'.
!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'.
!!! error TS2322: Type 'T' is not assignable to type '"text"'.
!!! error TS2322: Type '"text" | "email"' is not assignable to type '"text"'.
!!! error TS2322: Type '"email"' is not assignable to type '"text"'.
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"] & ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"] & ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"] & ChannelOfType<T, TextChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type '"email"' is not assignable to type 'T & "email"'.
!!! error TS2322: Type '"email"' is not assignable to type 'T'.
!!! error TS2322: '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'.
!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType<T, EmailChannel>["type"]'.
!!! error TS2322: Type '"email"' is not assignable to type 'T & "email"'.
!!! error TS2322: Type '"email"' is not assignable to type 'T'.
!!! error TS2322: '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'.
!!! error TS2322: Type 'T' is not assignable to type 'T & "email"'.
!!! error TS2322: Type '"email" | "text"' is not assignable to type 'T & "email"'.
!!! error TS2322: Type '"email"' is not assignable to type 'T & "email"'.
!!! error TS2322: Type '"email"' is not assignable to type 'T'.
!!! error TS2322: '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'.
!!! error TS2322: Type 'T' is not assignable to type '"email"'.
!!! error TS2322: Type '"email" | "text"' is not assignable to type '"email"'.
!!! error TS2322: Type '"text"' is not assignable to type '"email"'.
}
const newTextChannel = makeNewChannel('text');
@@ -34,7 +34,7 @@ type Channel = TextChannel | EmailChannel;
> : ^^^^^^^
export type ChannelType = Channel extends { type: infer R } ? R : never;
>ChannelType : "text" | "email"
>ChannelType : "email" | "text"
> : ^^^^^^^^^^^^^^^^
>type : R
> : ^
@@ -22,7 +22,7 @@ declare function Func<Values = object, ExtraProps = {}>(
> : ^ ^^^^^^^^^^^ ^^^^^^^ ^^ ^^^^^
x: (string extends "validate" | "initialValues" | keyof ExtraProps
>x : string extends "validate" | "initialValues" | keyof ExtraProps ? Readonly<FormikConfig<Values> & ExtraProps> : Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validate" | "initialValues" | Exclude<keyof ExtraProps, "validateOnChange">> & Partial<Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validateOnChange" | Extract<keyof ExtraProps, "validateOnChange">>>
>x : string extends "initialValues" | "validate" | keyof ExtraProps ? Readonly<FormikConfig<Values> & ExtraProps> : Pick<Readonly<FormikConfig<Values> & ExtraProps>, "initialValues" | "validate" | Exclude<keyof ExtraProps, "validateOnChange">> & Partial<Pick<Readonly<FormikConfig<Values> & ExtraProps>, "validateOnChange" | Extract<keyof ExtraProps, "validateOnChange">>>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
? Readonly<FormikConfig<Values> & ExtraProps>
@@ -14,11 +14,11 @@ declare function foo<T>(obj: I<T>): T
> : ^^^^
foo({
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | (() => void) | number[]
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | number[] | (() => void)
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T>(obj: I<T>) => T
> : ^ ^^ ^^ ^^^^^
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | number | true | (() => void) | number[]; [x: number]: number | (() => void) | number[]; p: string; 0: () => void; }
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | number | true | number[] | (() => void); [x: number]: number | number[] | (() => void); p: string; 0: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
p: "",
@@ -14,11 +14,11 @@ declare function foo<T>(obj: I<T>): T
> : ^^^^
foo({
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | (() => void) | number[]
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | number[] | (() => void)
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T>(obj: I<T>) => T
> : ^ ^^ ^^ ^^^^^
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | number | true | (() => void) | number[]; [x: number]: number | (() => void) | number[]; p: string; 0: () => void; }
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | number | true | number[] | (() => void); [x: number]: number | number[] | (() => void); p: string; 0: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
p: "",
@@ -25,11 +25,11 @@ declare function g<T>(obj: J<T>): T;
> : ^^^^
foo({
>foo({ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : number | (() => void) | number[]
>foo({ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : number | number[] | (() => void)
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T>(obj: I<T>) => T
> : ^ ^^ ^^ ^^^^^
>{ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: number | boolean | (() => void) | number[]; [x: number]: number | (() => void) | number[]; 0: () => void; }
>{ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: number | boolean | number[] | (() => void); [x: number]: number | number[] | (() => void); 0: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0: () => { },
@@ -25,11 +25,11 @@ declare function g<T>(obj: J<T>): T;
> : ^^^^
foo({
>foo({ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : number | (() => void) | number[]
>foo({ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : number | number[] | (() => void)
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>foo : <T>(obj: I<T>) => T
> : ^ ^^ ^^ ^^^^^
>{ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: number | boolean | (() => void) | number[]; [x: number]: number | (() => void) | number[]; 0: () => void; }
>{ 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: number | boolean | number[] | (() => void); [x: number]: number | number[] | (() => void); 0: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0: () => { },
@@ -55,6 +55,6 @@ type WithIndexKey = keyof WithIndex; // string | number <-- Expected: stri
> : ^^^^^^^^^^^^^^^
type WithoutIndexKey = keyof WithoutIndex; // number <-- Expected: "foo" | "bar"
>WithoutIndexKey : "foo" | "bar"
>WithoutIndexKey : "bar" | "foo"
> : ^^^^^^^^^^^^^
+2 -2
View File
@@ -20,11 +20,11 @@ ijs = ijs.concat([[3, 4], [5, 6]]);
> : ^^^^^^^^^^^^^^^^^^
>ijs.concat([[3, 4], [5, 6]]) : [number, number][]
> : ^^^^^^^^^^^^^^^^^^
>ijs.concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: ([number, number] | ConcatArray<[number, number]>)[]): [number, number][]; }
>ijs.concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: (ConcatArray<[number, number]> | [number, number])[]): [number, number][]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>ijs : [number, number][]
> : ^^^^^^^^^^^^^^^^^^
>concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: ([number, number] | ConcatArray<[number, number]>)[]): [number, number][]; }
>concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: (ConcatArray<[number, number]> | [number, number])[]): [number, number][]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>[[3, 4], [5, 6]] : [number, number][]
> : ^^^^^^^^^^^^^^^^^^
@@ -1,9 +1,9 @@
conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean'.
Type 'number' is not assignable to type 'boolean'.
Type 'string' is not assignable to type 'boolean'.
==== conditionalExpression1.ts (1 errors) ====
var x: boolean = (true ? 1 : ""); // should be an error
~
!!! error TS2322: Type 'string | number' is not assignable to type 'boolean'.
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
@@ -50,7 +50,7 @@ var d = false ? false : true;
var e = false ? "foo" : "bar";
>e : string
> : ^^^^^^
>false ? "foo" : "bar" : "foo" | "bar"
>false ? "foo" : "bar" : "bar" | "foo"
> : ^^^^^^^^^^^^^
>false : false
> : ^^^^^
@@ -175,7 +175,7 @@ typeof "123" == "string" ? exprBoolean1 : exprBoolean2;
> : ^^^^^^^
>typeof "123" == "string" : boolean
> : ^^^^^^^
>typeof "123" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof "123" : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"123" : "123"
> : ^^^^^
@@ -404,7 +404,7 @@ var resultIsBoolean3 = typeof "123" == "string" ? exprBoolean1 : exprBoolean2;
> : ^^^^^^^
>typeof "123" == "string" : boolean
> : ^^^^^^^
>typeof "123" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof "123" : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"123" : "123"
> : ^^^^^
@@ -468,7 +468,7 @@ var resultIsStringOrBoolean4 = typeof "123" === "string" ? exprString1 : exprBoo
> : ^^^^^^^^^^^^^^^^
>typeof "123" === "string" : boolean
> : ^^^^^^^
>typeof "123" : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof "123" : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"123" : "123"
> : ^^^^^
@@ -190,7 +190,7 @@ var array = ["1", "2", "3"];
typeof condString ? exprAny1 : exprAny2;
>typeof condString ? exprAny1 : exprAny2 : any
> : ^^^
>typeof condString : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof condString : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>condString : string
> : ^^^^^^
@@ -415,7 +415,7 @@ var resultIsAny3 = typeof condString ? exprAny1 : exprAny2;
> : ^^^
>typeof condString ? exprAny1 : exprAny2 : any
> : ^^^
>typeof condString : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof condString : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>condString : string
> : ^^^^^^
@@ -491,7 +491,7 @@ var resultIsStringOrBoolean3 = typeof condString ? exprString1 : exprBoolean1; /
> : ^^^^^^^^^^^^^^^^
>typeof condString ? exprString1 : exprBoolean1 : string | boolean
> : ^^^^^^^^^^^^^^^^
>typeof condString : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof condString : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>condString : string
> : ^^^^^^
@@ -4,14 +4,14 @@
declare function useState1<S>(initialState: (S extends (() => any) ? never : S) | (() => S)): S; // No args
>useState1 : <S>(initialState: (S extends (() => any) ? never : S) | (() => S)) => S
> : ^ ^^ ^^ ^^^^^
>initialState : (S extends () => any ? never : S) | (() => S)
> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^
>initialState : (() => S) | (S extends () => any ? never : S)
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
declare function useState2<S>(initialState: (S extends ((...args: any[]) => any) ? never : S) | (() => S)): S; // Any args
>useState2 : <S>(initialState: (S extends ((...args: any[]) => any) ? never : S) | (() => S)) => S
> : ^ ^^ ^^ ^^^^^
>initialState : (S extends (...args: any[]) => any ? never : S) | (() => S)
> : ^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^
>initialState : (() => S) | (S extends (...args: any[]) => any ? never : S)
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^
>args : any[]
> : ^^^^^
@@ -46,14 +46,14 @@ const func2 = useState2(() => () => 0);
declare function useState3<S, T extends S>(initialState: (T extends (() => any) ? never : T) | (() => S)): S; // No args
>useState3 : <S, T extends S>(initialState: (T extends (() => any) ? never : T) | (() => S)) => S
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^
>initialState : (T extends () => any ? never : T) | (() => S)
> : ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^
>initialState : (() => S) | (T extends () => any ? never : T)
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
declare function useState4<S, T extends S>(initialState: (T extends ((...args: any[]) => any) ? never : T) | (() => S)): S; // Any args
>useState4 : <S, T extends S>(initialState: (T extends ((...args: any[]) => any) ? never : T) | (() => S)) => S
> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^^^^
>initialState : (T extends (...args: any[]) => any ? never : T) | (() => S)
> : ^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^
>initialState : (() => S) | (T extends (...args: any[]) => any ? never : T)
> : ^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^
>args : any[]
> : ^^^^^
@@ -262,7 +262,7 @@ type T20 = TypeName<string | (() => void)>; // "string" | "function"
> : ^^^
type T21 = TypeName<any>; // "string" | "number" | "boolean" | "undefined" | "function" | "object"
>T21 : "string" | "number" | "boolean" | "undefined" | "object" | "function"
>T21 : "boolean" | "function" | "number" | "object" | "string" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
type T22 = TypeName<never>; // never
@@ -627,13 +627,13 @@ function zeroOf<T extends number | string | boolean>(value: T) {
return <ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false);
><ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : ZeroOf<T>
> : ^^^^^^^^^
>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : false | "" | 0
>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : "" | 0 | false
> : ^^^^^^^^^^^^^^
>typeof value === "number" ? 0 : typeof value === "string" ? "" : false : false | "" | 0
>typeof value === "number" ? 0 : typeof value === "string" ? "" : false : "" | 0 | false
> : ^^^^^^^^^^^^^^
>typeof value === "number" : boolean
> : ^^^^^^^
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>value : T
> : ^
@@ -641,11 +641,11 @@ function zeroOf<T extends number | string | boolean>(value: T) {
> : ^^^^^^^^
>0 : 0
> : ^
>typeof value === "string" ? "" : false : false | ""
>typeof value === "string" ? "" : false : "" | false
> : ^^^^^^^^^^
>typeof value === "string" : boolean
> : ^^^^^^^
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>value : T
> : ^
@@ -710,7 +710,7 @@ function f20<T extends string>(n: number, b: boolean, x: number | boolean, y: T)
> : ^^^^^^^
zeroOf(x); // 0 | false
>zeroOf(x) : false | 0
>zeroOf(x) : 0 | false
> : ^^^^^^^^^
>zeroOf : <T_1 extends number | string | boolean>(value: T_1) => ZeroOf<T_1>
> : ^^^^^^^^^^^^^ ^^ ^^ ^^^^^
@@ -13,10 +13,10 @@ conditionalTypes2.ts(24,5): error TS2322: Type 'Invariant<B>' is not assignable
Type 'keyof B' is not assignable to type 'keyof A'.
Type 'string | number | symbol' is not assignable to type 'keyof A'.
Type 'string' is not assignable to type 'keyof A'.
Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
Type 'string' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
Type 'keyof B' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
Type 'string | number | symbol' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
Type 'string' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
conditionalTypes2.ts(25,5): error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
Types of property 'foo' are incompatible.
Type 'A extends string ? keyof A : A' is not assignable to type 'B extends string ? keyof B : B'.
@@ -79,10 +79,10 @@ conditionalTypes2.ts(75,12): error TS2345: Argument of type 'Extract2<T, Foo, Ba
!!! error TS2322: Type 'keyof B' is not assignable to type 'keyof A'.
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'keyof A'.
!!! error TS2322: Type 'string' is not assignable to type 'keyof A'.
!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
!!! error TS2322: Type 'keyof B' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
!!! error TS2322: Type 'string' is not assignable to type 'number | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf"'.
!!! error TS2322: Type 'string' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
!!! error TS2322: Type 'keyof B' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
!!! error TS2322: Type 'string' is not assignable to type 'number | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "length" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substr" | "substring" | "toLocaleLowerCase" | "toLocaleUpperCase" | "toLowerCase" | "toString" | "toUpperCase" | "trim" | "valueOf"'.
b = a; // Error
~
!!! error TS2322: Type 'Invariant<A>' is not assignable to type 'Invariant<B>'.
@@ -104,7 +104,7 @@ function isFunction<T>(value: T): value is Extract<T, Function> {
return typeof value === "function";
>typeof value === "function" : boolean
> : ^^^^^^^
>typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>value : T
> : ^
@@ -411,7 +411,7 @@ interface B1<T> extends A1<T> {
declare function toString1(value: object | Function): string ;
>toString1 : (value: object | Function) => string
> : ^ ^^ ^^^^^
>value : object | Function
>value : Function | object
> : ^^^^^^^^^^^^^^^^^
declare function toString2(value: Function): string ;
+5 -5
View File
@@ -251,7 +251,7 @@ declare let o1: {
readonly y: 20;
};
declare let o2: {
readonly [x: string]: 1 | 2 | 3 | (() => void) | 4;
readonly [x: string]: 1 | 2 | 3 | 4 | (() => void);
readonly a: 1;
readonly b: 2;
readonly c: 3;
@@ -316,12 +316,12 @@ declare let t1: "foo";
declare let t2: "bar";
declare let t3: "foo-bar";
declare let t4: "(foo)-(bar)";
declare function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2";
declare function ff1(x: 'foo' | 'bar', y: 1 | 2): "bar-1" | "bar-2" | "foo-1" | "foo-2";
declare function ff2<T extends string, U extends string>(x: T, y: U): `${T}-${U}`;
declare const ts1: "foo-bar";
declare const ts2: "foo-1" | "foo-0";
declare const ts3: "top-left" | "top-right" | "bottom-left" | "bottom-right";
declare function ff3(x: 'foo' | 'bar', y: object): `foo${string}` | `bar${string}`;
declare const ts2: "foo-0" | "foo-1";
declare const ts3: "bottom-left" | "bottom-right" | "top-left" | "top-right";
declare function ff3(x: 'foo' | 'bar', y: object): `bar${string}` | `foo${string}`;
type Action = "verify" | "write";
type ContentMatch = "match" | "nonMatch";
type Outcome = `${Action}_${ContentMatch}`;
+19 -19
View File
@@ -304,11 +304,11 @@ let o1 = { x: 10, y: 20 } as const;
> : ^^
let o2 = { a: 1, 'b': 2, ['c']: 3, d() {}, ['e' + '']: 4 } as const;
>o2 : { readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
>o2 : { readonly [x: string]: 1 | 2 | 3 | 4 | (() => void); readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>{ a: 1, 'b': 2, ['c']: 3, d() {}, ['e' + '']: 4 } as const : { readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
>{ a: 1, 'b': 2, ['c']: 3, d() {}, ['e' + '']: 4 } as const : { readonly [x: string]: 1 | 2 | 3 | 4 | (() => void); readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>{ a: 1, 'b': 2, ['c']: 3, d() {}, ['e' + '']: 4 } : { readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
>{ a: 1, 'b': 2, ['c']: 3, d() {}, ['e' + '']: 4 } : { readonly [x: string]: 1 | 2 | 3 | 4 | (() => void); readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>a : 1
> : ^
@@ -346,7 +346,7 @@ let o3 = { ...o1, ...o2 } as const;
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>o1 : { readonly x: 10; readonly y: 20; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>o2 : { readonly [x: string]: 1 | 2 | 3 | (() => void) | 4; readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
>o2 : { readonly [x: string]: 1 | 2 | 3 | 4 | (() => void); readonly a: 1; readonly b: 2; readonly c: 3; readonly d: () => void; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
let o4 = { a: 1, b: 2 };
@@ -650,19 +650,19 @@ let t4 = `${`(${t1})`}-${`(${t2})`}` as const;
> : ^^^^^
function ff1(x: 'foo' | 'bar', y: 1 | 2) {
>ff1 : (x: "foo" | "bar", y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2"
>ff1 : (x: "foo" | "bar", y: 1 | 2) => "bar-1" | "bar-2" | "foo-1" | "foo-2"
> : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : "foo" | "bar"
>x : "bar" | "foo"
> : ^^^^^^^^^^^^^
>y : 1 | 2
> : ^^^^^
return `${x}-${y}` as const;
>`${x}-${y}` as const : "foo-1" | "foo-2" | "bar-1" | "bar-2"
>`${x}-${y}` as const : "bar-1" | "bar-2" | "foo-1" | "foo-2"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>`${x}-${y}` : "foo-1" | "foo-2" | "bar-1" | "bar-2"
>`${x}-${y}` : "bar-1" | "bar-2" | "foo-1" | "foo-2"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : "foo" | "bar"
>x : "bar" | "foo"
> : ^^^^^^^^^^^^^
>y : 1 | 2
> : ^^^^^
@@ -700,9 +700,9 @@ const ts1 = ff2('foo', 'bar');
> : ^^^^^
const ts2 = ff2('foo', !!true ? '0' : '1');
>ts2 : "foo-1" | "foo-0"
>ts2 : "foo-0" | "foo-1"
> : ^^^^^^^^^^^^^^^^^
>ff2('foo', !!true ? '0' : '1') : "foo-1" | "foo-0"
>ff2('foo', !!true ? '0' : '1') : "foo-0" | "foo-1"
> : ^^^^^^^^^^^^^^^^^
>ff2 : <T extends string, U extends string>(x: T, y: U) => `${T}-${U}`
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^
@@ -722,13 +722,13 @@ const ts2 = ff2('foo', !!true ? '0' : '1');
> : ^^^
const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right');
>ts3 : "top-left" | "top-right" | "bottom-left" | "bottom-right"
>ts3 : "bottom-left" | "bottom-right" | "top-left" | "top-right"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right') : "top-left" | "top-right" | "bottom-left" | "bottom-right"
>ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right') : "bottom-left" | "bottom-right" | "top-left" | "top-right"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>ff2 : <T extends string, U extends string>(x: T, y: U) => `${T}-${U}`
> : ^ ^^^^^^^^^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^
>!!true ? 'top' : 'bottom' : "top" | "bottom"
>!!true ? 'top' : 'bottom' : "bottom" | "top"
> : ^^^^^^^^^^^^^^^^
>!!true : true
> : ^^^^
@@ -754,19 +754,19 @@ const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right');
> : ^^^^^^^
function ff3(x: 'foo' | 'bar', y: object) {
>ff3 : (x: "foo" | "bar", y: object) => `foo${string}` | `bar${string}`
>ff3 : (x: "foo" | "bar", y: object) => `bar${string}` | `foo${string}`
> : ^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : "foo" | "bar"
>x : "bar" | "foo"
> : ^^^^^^^^^^^^^
>y : object
> : ^^^^^^
return `${x}${y}` as const;
>`${x}${y}` as const : `foo${string}` | `bar${string}`
>`${x}${y}` as const : `bar${string}` | `foo${string}`
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>`${x}${y}` : `foo${string}` | `bar${string}`
>`${x}${y}` : `bar${string}` | `foo${string}`
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : "foo" | "bar"
>x : "bar" | "foo"
> : ^^^^^^^^^^^^^
>y : object
> : ^^^^^^
+2 -2
View File
@@ -10,7 +10,7 @@ const enum TestType { foo, bar }
> : ^^^^^^^^^^^^
type TestTypeStr = keyof typeof TestType;
>TestTypeStr : "foo" | "bar"
>TestTypeStr : "bar" | "foo"
> : ^^^^^^^^^^^^^
>TestType : typeof TestType
> : ^^^^^^^^^^^^^^^
@@ -24,7 +24,7 @@ function f1(f: TestType) { }
function f2(f: TestTypeStr) { }
>f2 : (f: TestTypeStr) => void
> : ^ ^^ ^^^^^^^^^
>f : "foo" | "bar"
>f : "bar" | "foo"
> : ^^^^^^^^^^^^^
f1(TestType.foo)
@@ -20,7 +20,7 @@ function f1() {
if (typeof x === "string") {
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | number
> : ^^^^^^^^^^^^^^^
@@ -56,7 +56,7 @@ function f2() {
if (typeof x !== "string") {
>typeof x !== "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | number
> : ^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ function f3() {
if (typeof x === "string") {
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | number
> : ^^^^^^^^^^^^^^^
@@ -129,7 +129,7 @@ function f4() {
if (typeof x !== "string") {
>typeof x !== "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | number
> : ^^^^^^^^^^^^^^^
@@ -166,7 +166,7 @@ function f5() {
if (typeof x === "string") {
>typeof x === "string" : boolean
> : ^^^^^^^
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>x : string | number
> : ^^^^^^^^^^^^^^^
@@ -99,7 +99,7 @@ export default class Operation {
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>(result || []).concat(innerResult) : IValidationError[]
> : ^^^^^^^^^^^^^^^^^^
>(result || []).concat : { (...items: ConcatArray<IValidationError>[]): IValidationError[]; (...items: (IValidationError | ConcatArray<IValidationError>)[]): IValidationError[]; }
>(result || []).concat : { (...items: ConcatArray<IValidationError>[]): IValidationError[]; (...items: (ConcatArray<IValidationError> | IValidationError)[]): IValidationError[]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>(result || []) : IValidationError[]
> : ^^^^^^^^^^^^^^^^^^
@@ -109,7 +109,7 @@ export default class Operation {
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
>[] : never[]
> : ^^^^^^^
>concat : { (...items: ConcatArray<IValidationError>[]): IValidationError[]; (...items: (IValidationError | ConcatArray<IValidationError>)[]): IValidationError[]; }
>concat : { (...items: ConcatArray<IValidationError>[]): IValidationError[]; (...items: (ConcatArray<IValidationError> | IValidationError)[]): IValidationError[]; }
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>innerResult : any
}
@@ -2,7 +2,7 @@
=== one.ts ===
declare const y: never[] | string[];
>y : never[] | string[]
>y : string[] | never[]
> : ^^^^^^^^^^^^^^^^^^
export const yThen = y.map(item => item.length);
@@ -10,12 +10,12 @@ export const yThen = y.map(item => item.length);
> : ^^^^^^^^
>y.map(item => item.length) : number[]
> : ^^^^^^^^
>y.map : (<U>(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[])
> : ^^ ^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^
>y : never[] | string[]
>y.map : (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[])
> : ^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^
>y : string[] | never[]
> : ^^^^^^^^^^^^^^^^^^
>map : (<U>(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[])
> : ^^ ^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^
>map : (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | (<U>(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[])
> : ^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^
>item => item.length : (item: string) => number
> : ^ ^^^^^^^^^^^^^^^^^^^
>item : string
@@ -30,13 +30,13 @@ const test2: Promise<[one: number, two: string]> = new Promise(
> : ^^^^^^^^^^^^^^^^^^
(resolve) => resolve([1, 'two']),
>(resolve) => resolve([1, 'two']) : (resolve: (value: [one: number, two: string] | PromiseLike<[one: number, two: string]>) => void) => void
>(resolve) => resolve([1, 'two']) : (resolve: (value: PromiseLike<[one: number, two: string]> | [one: number, two: string]) => void) => void
> : ^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
>resolve : (value: [one: number, two: string] | PromiseLike<[one: number, two: string]>) => void
>resolve : (value: PromiseLike<[one: number, two: string]> | [one: number, two: string]) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>resolve([1, 'two']) : void
> : ^^^^
>resolve : (value: [one: number, two: string] | PromiseLike<[one: number, two: string]>) => void
>resolve : (value: PromiseLike<[one: number, two: string]> | [one: number, two: string]) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>[1, 'two'] : [number, string]
> : ^^^^^^^^^^^^^^^^
@@ -8,8 +8,8 @@ declare function test(
> : ^ ^^ ^^^^^
arg: Record<string, (arg: string) => void> | Array<(arg: number) => void>
>arg : Record<string, (arg: string) => void> | ((arg: number) => void)[]
> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^^^^ ^^^
>arg : ((arg: number) => void)[] | Record<string, (arg: string) => void>
> : ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^
>arg : string
> : ^^^^^^
>arg : number
@@ -8,8 +8,8 @@ declare function test(
> : ^ ^^ ^^^^^
arg: Record<string, (arg: string) => void> | Array<(arg: number) => void>
>arg : Record<string, (arg: string) => void> | ((arg: number) => void)[]
> : ^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^ ^^ ^^^^^ ^^^
>arg : ((arg: number) => void)[] | Record<string, (arg: string) => void>
> : ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^
>arg : string
> : ^^^^^^
>arg : number
@@ -150,13 +150,13 @@ var b = baz(b, b, g); // Should be number | string
> : ^ ^^ ^^ ^^ ^^ ^^^^^
var d: number[] | string[];
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
var d = foo(h); // Should be number[] | string[]
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>foo(h) : number[] | string[]
>foo(h) : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>foo : <T>(cb: (x: number, y: string) => T) => T
> : ^ ^^ ^^ ^^^^^
@@ -164,9 +164,9 @@ var d = foo(h); // Should be number[] | string[]
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^
var d = bar(1, "one", h); // Should be number[] | string[]
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>bar(1, "one", h) : number[] | string[]
>bar(1, "one", h) : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>bar : <T, U, V>(x: T, y: U, cb: (x: T, y: U) => V) => V
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
@@ -178,9 +178,9 @@ var d = bar(1, "one", h); // Should be number[] | string[]
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^
var d = bar("one", 1, h); // Should be number[] | string[]
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>bar("one", 1, h) : number[] | string[]
>bar("one", 1, h) : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>bar : <T, U, V>(x: T, y: U, cb: (x: T, y: U) => V) => V
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
@@ -192,15 +192,15 @@ var d = bar("one", 1, h); // Should be number[] | string[]
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^
var d = baz(d, d, g); // Should be number[] | string[]
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>baz(d, d, g) : number[] | string[]
>baz(d, d, g) : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>baz : <T, U>(x: T, y: T, cb: (x: T, y: T) => U) => U
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>d : number[] | string[]
>d : string[] | number[]
> : ^^^^^^^^^^^^^^^^^^^
>g : <T>(x: T, y: T) => T
> : ^ ^^ ^^ ^^ ^^ ^^^^^
@@ -51,7 +51,7 @@ declare const styled: StyledInterface;
interface BaseProps {
as?: "select" | "input";
>as : "select" | "input" | undefined
>as : "input" | "select" | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
@@ -74,7 +74,7 @@ declare function test2(a: { type: "foo" | "bar" } & { type: any }): void;
> : ^ ^^ ^^^^^
>a : { type: "foo" | "bar"; } & { type: any; }
> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^
>type : "foo" | "bar"
>type : "bar" | "foo"
> : ^^^^^^^^^^^^^
>type : any
@@ -105,7 +105,7 @@ type WebpackPluginFunction = (this: MyCompiler, compiler: MyCompiler) => void;
interface Optimization {
minimizer?: (WebpackPluginInstance | WebpackPluginFunction)[];
>minimizer : (WebpackPluginInstance | WebpackPluginFunction)[] | undefined
>minimizer : (WebpackPluginFunction | WebpackPluginInstance)[] | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
declare const A: <T, P extends keyof T>(
@@ -147,11 +147,11 @@ createMachine({
> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^
ev.type; // should be 'FOO' | 'BAR'
>ev.type : "FOO" | "BAR"
>ev.type : "BAR" | "FOO"
> : ^^^^^^^^^^^^^
>ev : { type: "FOO"; } | { type: "BAR"; }
> : ^^^^^^^^ ^^^^^^^^^^^^^^ ^^^
>type : "FOO" | "BAR"
>type : "BAR" | "FOO"
> : ^^^^^^^^^^^^^
},
@@ -60,7 +60,7 @@ const i2: Iterable<{ a: true }> | Iterable<{ b: false }> = [{ b: false }];
> : ^^^^^
const i3: Iterable<number> | 1[] = [2];
>i3 : Iterable<number> | 1[]
>i3 : 1[] | Iterable<number>
> : ^^^^^^^^^^^^^^^^^^^^^^
>[2] : 2[]
> : ^^^
@@ -21,7 +21,7 @@ interface Y {
> : ^^^
value: 'none' | 'done';
>value : "none" | "done"
>value : "done" | "none"
> : ^^^^^^^^^^^^^^^
method(): void;
@@ -72,11 +72,11 @@ foo({
> : ^^^
this.value;
>this.value : "none" | "done"
>this.value : "done" | "none"
> : ^^^^^^^^^^^^^^^
>this : Y
> : ^
>value : "none" | "done"
>value : "done" | "none"
> : ^^^^^^^^^^^^^^^
}
});
@@ -101,7 +101,7 @@ interface Y2 {
> : ^^^
value: 'none' | 'done';
>value : "none" | "done"
>value : "done" | "none"
> : ^^^^^^^^^^^^^^^
method(): void;
@@ -42,7 +42,7 @@ interface IWithCallSignatures4 {
// With no call signature | callSignatures
var x: IWithNoCallSignatures | IWithCallSignatures = a => a.toString();
>x : IWithNoCallSignatures | IWithCallSignatures
>x : IWithCallSignatures | IWithNoCallSignatures
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>a => a.toString() : (a: number) => string
> : ^ ^^^^^^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ var foo = <{ id: number; }[]>[{ id: 4 }, <{ id: number; }>({ })];
>id : number
> : ^^^^^^
>[{ id: 4 }, <{ id: number; }>({ })] : { id: number; }[]
> : ^^^^^^ ^^^^^
> : ^^^^^^^^^^^^^^^^^
>{ id: 4 } : { id: number; }
> : ^^^^^^^^^^^^^^^
>id : number

Some files were not shown because too many files have changed in this diff Show More