Skip to content

Commit 850c19b

Browse files
committed
Update baselines for GH#63276 hover fix
1 parent f33a70b commit 850c19b

File tree

127 files changed

+1161
-1097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1161
-1097
lines changed

tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
function foo(x: { id: number; name?: string; }): void;
55
>foo : (x: { id: number; name?: string; }) => void
66
> : ^ ^^ ^^^^^
7-
>x : { id: number; name?: string; }
8-
> : ^^^^^^ ^^^^^^^^^ ^^^
7+
>x : { id: number; name?: string | undefined; }
8+
> : ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
>id : number
1010
> : ^^^^^^
1111
>name : string | undefined

tests/baselines/reference/assignmentToInstantiationExpression.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
=== assignmentToInstantiationExpression.ts ===
44
let obj: { fn?: <T>() => T } = {};
5-
>obj : { fn?: <T>() => T; }
6-
> : ^^^^^^^ ^^^
5+
>obj : { fn?: (<T>() => T) | undefined; }
6+
> : ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^
77
>fn : (<T>() => T) | undefined
88
> : ^^ ^^^^^^^ ^^^^^^^^^^^^^
99
>{} : {}
@@ -16,8 +16,8 @@ obj.fn<number> = () => 1234;
1616
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^
1717
>obj.fn : (<T>() => T) | undefined
1818
> : ^^ ^^^^^^^ ^^^^^^^^^^^^^
19-
>obj : { fn?: <T>() => T; }
20-
> : ^^^^^^^ ^^^
19+
>obj : { fn?: (<T>() => T) | undefined; }
20+
> : ^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^
2121
>fn : (<T>() => T) | undefined
2222
> : ^^ ^^^^^^^ ^^^^^^^^^^^^^
2323
>() => 1234 : () => number

tests/baselines/reference/assignmentTypeNarrowing.types

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ type AOrArrA<T> = T | T[];
165165
> : ^^^^^^^^^^
166166

167167
const arr: AOrArrA<{x?: "ok"}> = [{ x: "ok" }]; // weak type
168-
>arr : AOrArrA<{ x?: "ok"; }>
169-
> : ^^^^^^^^^^^^^^ ^^^^
168+
>arr : AOrArrA<{ x?: "ok" | undefined; }>
169+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170170
>x : "ok" | undefined
171171
> : ^^^^^^^^^^^^^^^^
172172
>[{ x: "ok" }] : { x: "ok"; }[]
@@ -181,12 +181,12 @@ const arr: AOrArrA<{x?: "ok"}> = [{ x: "ok" }]; // weak type
181181
arr.push({ x: "ok" });
182182
>arr.push({ x: "ok" }) : number
183183
> : ^^^^^^
184-
>arr.push : (...items: { x?: "ok"; }[]) => number
185-
> : ^^^^ ^^^^^^^^ ^^^^^^^^^^
186-
>arr : { x?: "ok"; }[]
187-
> : ^^^^^^ ^^^^^
188-
>push : (...items: { x?: "ok"; }[]) => number
189-
> : ^^^^ ^^^^^^^^ ^^^^^^^^^^
184+
>arr.push : (...items: { x?: "ok" | undefined; }[]) => number
185+
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186+
>arr : { x?: "ok" | undefined; }[]
187+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^
188+
>push : (...items: { x?: "ok" | undefined; }[]) => number
189+
> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190190
>{ x: "ok" } : { x: "ok"; }
191191
> : ^^^^^^^^^^^^
192192
>x : "ok"

tests/baselines/reference/avoidNarrowingUsingConstVariableFromBindingElementWithLiteralInitializer.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ declare const foo: ["a", string, number] | ["b", string, boolean];
88
export function test(arg: { index?: number }) {
99
>test : (arg: { index?: number; }) => void
1010
> : ^ ^^ ^^^^^^^^^
11-
>arg : { index?: number; }
12-
> : ^^^^^^^^^^ ^^^
11+
>arg : { index?: number | undefined; }
12+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1313
>index : number | undefined
1414
> : ^^^^^^^^^^^^^^^^^^
1515

@@ -18,8 +18,8 @@ export function test(arg: { index?: number }) {
1818
> : ^^^^^^
1919
>0 : 0
2020
> : ^
21-
>arg : { index?: number; }
22-
> : ^^^^^^^^^^ ^^^
21+
>arg : { index?: number | undefined; }
22+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323

2424
if (foo[index] === "a") {
2525
>foo[index] === "a" : boolean

tests/baselines/reference/checkJsxChildrenProperty12.types

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ class Button extends React.Component<ButtonProp, any> {
4848
> : ^^^^^^^^^^^
4949
>InnerButton : typeof InnerButton
5050
> : ^^^^^^^^^^^^^^^^^^
51-
>this.props : ButtonProp & { children?: React.ReactNode; }
52-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51+
>this.props : ButtonProp & { children?: React.ReactNode | undefined; }
52+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5353
>this : this
5454
> : ^^^^
55-
>props : ButtonProp & { children?: React.ReactNode; }
56-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55+
>props : ButtonProp & { children?: React.ReactNode | undefined; }
56+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5757
}
5858
else {
5959
return (<InnerButton {...this.props} >
@@ -63,12 +63,12 @@ class Button extends React.Component<ButtonProp, any> {
6363
> : ^^^^^^^^^^^
6464
>InnerButton : typeof InnerButton
6565
> : ^^^^^^^^^^^^^^^^^^
66-
>this.props : ButtonProp & { children?: React.ReactNode; }
67-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
>this.props : ButtonProp & { children?: React.ReactNode | undefined; }
67+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6868
>this : this
6969
> : ^^^^
70-
>props : ButtonProp & { children?: React.ReactNode; }
71-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70+
>props : ButtonProp & { children?: React.ReactNode | undefined; }
71+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7272

7373
<div>Hello World</div>
7474
><div>Hello World</div> : JSX.Element

tests/baselines/reference/checkJsxChildrenProperty13.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ class Button extends React.Component<ButtonProp, any> {
4343
> : ^^^^^^^^^^^
4444
>InnerButton : typeof InnerButton
4545
> : ^^^^^^^^^^^^^^^^^^
46-
>this.props : ButtonProp & { children?: React.ReactNode; }
47-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
>this.props : ButtonProp & { children?: React.ReactNode | undefined; }
47+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4848
>this : this
4949
> : ^^^^
50-
>props : ButtonProp & { children?: React.ReactNode; }
51-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
>props : ButtonProp & { children?: React.ReactNode | undefined; }
51+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5252
>children : string
5353
> : ^^^^^^
5454

tests/baselines/reference/checkJsxChildrenProperty3.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
5151
> : ^^^^^^^^^^^
5252
>this.props.children : ((user: IUser) => JSX.Element) & (React.ReactNode | undefined)
5353
> : ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54-
>this.props : IFetchUserProps & { children?: React.ReactNode; }
55-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+
>this.props : IFetchUserProps & { children?: React.ReactNode | undefined; }
55+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5656
>this : this
5757
> : ^^^^
58-
>props : IFetchUserProps & { children?: React.ReactNode; }
59-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58+
>props : IFetchUserProps & { children?: React.ReactNode | undefined; }
59+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060
>children : ((user: IUser) => JSX.Element) & (React.ReactNode | undefined)
6161
> : ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6262
>this.state.result : any

tests/baselines/reference/checkJsxChildrenProperty4.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
5252
> : ^^^^^^^^^^^
5353
>this.props.children : ((user: IUser) => JSX.Element) & (React.ReactNode | undefined)
5454
> : ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55-
>this.props : IFetchUserProps & { children?: React.ReactNode; }
56-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55+
>this.props : IFetchUserProps & { children?: React.ReactNode | undefined; }
56+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5757
>this : this
5858
> : ^^^^
59-
>props : IFetchUserProps & { children?: React.ReactNode; }
60-
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59+
>props : IFetchUserProps & { children?: React.ReactNode | undefined; }
60+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6161
>children : ((user: IUser) => JSX.Element) & (React.ReactNode | undefined)
6262
> : ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6363
>this.state.result : any

tests/baselines/reference/checkJsxIntersectionElementPropsType.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ declare class Component<P> {
2323
class C<T> extends Component<{ x?: boolean; } & T> {}
2424
>C : C<T>
2525
> : ^^^^
26-
>Component : Component<{ x?: boolean; } & T>
27-
> : ^^^^^^^^^^^^^^^^ ^^^^^^^^
26+
>Component : Component<{ x?: boolean | undefined; } & T>
27+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2828
>x : boolean | undefined
2929
> : ^^^^^^^^^^^^^^^^^^^
3030

tests/baselines/reference/classIsSubtypeOfBaseType.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class Derived2 extends Base<{ bar: string; }> {
3939
> : ^^^^^^
4040

4141
foo: {
42-
>foo : { bar?: string; }
43-
> : ^^^^^^^^ ^^^
42+
>foo : { bar?: string | undefined; }
43+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4444

4545
bar?: string; // error
4646
>bar : string | undefined

0 commit comments

Comments
 (0)