Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'origin/main' into fix/noinfer-flow-type
  • Loading branch information
Andarist committed May 31, 2024
commit 34a6d3dc7cb73de3ae58dd6d599553c18dcc08ec
20 changes: 10 additions & 10 deletions tests/baselines/reference/narrowingNoInfer1.types
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ function map<A, B>(items: readonly A[], f: (a: NoInfer<A>) => B) {
>items.map(f) : B[]
> : ^^^
>items.map : <U>(callbackfn: (value: A, index: number, array: readonly A[]) => U, thisArg?: any) => U[]
> : ^^^^ ^^^ ^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
> : ^^^^ ^^^ ^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^
>items : readonly A[]
> : ^^^^^^^^^^^^
>map : <U>(callbackfn: (value: A, index: number, array: readonly A[]) => U, thisArg?: any) => U[]
> : ^^^^ ^^^ ^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^
> : ^^^^ ^^^ ^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^
>f : (a: NoInfer<A>) => B
> : ^ ^^ ^^^^^^
> : ^ ^^ ^^^^^
}

const something = map(m, (_) =>
Expand All @@ -58,11 +58,11 @@ const something = map(m, (_) =>
>map : <A, B>(items: readonly A[], f: (a: NoInfer<A>) => B) => B[]
> : ^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^
>m : { result: NoInfer<TaggedUnion>; }[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^ ^^^^^
>(_) => _.result._tag === "a" ? { ..._, result: _.result } : null : (_: NoInfer<{ result: NoInfer<TaggedUnion>; }>) => { result: TaggedA; } | null
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>_ : NoInfer<{ result: NoInfer<TaggedUnion>; }>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^^^^^^^^^ ^^^^

_.result._tag === "a" ? { ..._, result: _.result } : null,
>_.result._tag === "a" ? { ..._, result: _.result } : null : { result: TaggedA; } | null
Expand All @@ -74,7 +74,7 @@ const something = map(m, (_) =>
>_.result : TaggedUnion
> : ^^^^^^^^^^^
>_ : { result: NoInfer<TaggedUnion>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^ ^^^
>result : TaggedUnion
> : ^^^^^^^^^^^
>_tag : "a" | "b"
Expand All @@ -84,13 +84,13 @@ const something = map(m, (_) =>
>{ ..._, result: _.result } : { result: TaggedA; }
> : ^^^^^^^^^^^^^^^^^^^^
>_ : { result: NoInfer<TaggedUnion>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^ ^^^
>result : TaggedA
> : ^^^^^^^
>_.result : TaggedA
> : ^^^^^^^
>_ : { result: NoInfer<TaggedUnion>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> : ^^^^^^^^^^ ^^^
>result : TaggedA
> : ^^^^^^^

Expand All @@ -112,7 +112,7 @@ test2({ type: 'a' as const }, { type: 'b' as const }, (thing) => {
>test2({ type: 'a' as const }, { type: 'b' as const }, (thing) => { if (thing.type === "a") { thing; } else { thing; }}) : void
> : ^^^^
>test2 : <T1, T2>(a: T1, b: T2, cb: (thing: NoInfer<T1> | NoInfer<T2>) => void) => void
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^
> : ^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^
>{ type: 'a' as const } : { type: "a"; }
> : ^^^^^^^^^^^^^^
>type : "a"
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.