Skip to content

Commit

Permalink
Accept new baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Jun 24, 2021
1 parent 08b6e2e commit 0bed057
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function foo2(param: number | null | undefined): number | null {
>assert(param !== undefined) : void
>assert : (value: any) => asserts value
>param !== undefined : boolean
>param : number | null | undefined
>param : number | null
>undefined : undefined
>param : number | null
>null : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const v5 = v && v;
>v5 : void
>v && v : void
>v : void
>v : void
>v : never

const v6 = v && u;
>v6 : void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ var re5 = a5 && a5;
>re5 : void
>a5 && a5 : void
>a5 : void
>a5 : void
>a5 : never

var re6 = a6 && a5;
>re6 : void
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/voidIsInitialized.types
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if(typeof x === "undefined") {
>"undefined" : "undefined"

x // no error: assume x2 is initialised
>x : void
>x : undefined
}

if(typeof y !== "undefined") {
Expand All @@ -24,6 +24,6 @@ if(typeof y !== "undefined") {
>"undefined" : "undefined"

y // no error: do not narrow void
>y : void
>y : never
}

0 comments on commit 0bed057

Please sign in to comment.