diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
index cf999188ebc..26676a08b29 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
@@ -1,7 +1,8 @@
tests/cases/conformance/jsx/file.tsx(42,11): error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'SingleChildProp'.
- Types of property 'children' are incompatible.
- Type 'Element[]' is not assignable to type 'Element'.
- Property 'type' is missing in type 'Element[]'.
+ Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'SingleChildProp'.
+ Types of property 'children' are incompatible.
+ Type 'Element[]' is not assignable to type 'Element'.
+ Property 'type' is missing in type 'Element[]'.
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
@@ -49,6 +50,7 @@ tests/cases/conformance/jsx/file.tsx(42,11): error TS2322: Type '{ children: Ele
let k5 = <>>;
~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'SingleChildProp'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type 'Element[]' is not assignable to type 'Element'.
-!!! error TS2322: Property 'type' is missing in type 'Element[]'.
\ No newline at end of file
+!!! error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'SingleChildProp'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type 'Element[]' is not assignable to type 'Element'.
+!!! error TS2322: Property 'type' is missing in type 'Element[]'.
\ No newline at end of file
diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
index ac342678508..6b6bd5056eb 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
@@ -1,26 +1,31 @@
tests/cases/conformance/jsx/file.tsx(14,10): error TS2322: Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
- Property 'children' is missing in type '{ a: number; b: string; }'.
+ Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
+ Property 'children' is missing in type '{ a: number; b: string; }'.
tests/cases/conformance/jsx/file.tsx(17,11): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten.
tests/cases/conformance/jsx/file.tsx(31,6): error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
- Type '(Element | ((name: string) => Element))[]' is not assignable to type 'Element'.
- Property 'type' is missing in type '(Element | ((name: string) => Element))[]'.
+ Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
+ Type '(Element | ((name: string) => Element))[]' is not assignable to type 'Element'.
+ Property 'type' is missing in type '(Element | ((name: string) => Element))[]'.
tests/cases/conformance/jsx/file.tsx(37,6): error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type '(number | Element)[]' is not assignable to type 'string | Element'.
- Type '(number | Element)[]' is not assignable to type 'Element'.
- Property 'type' is missing in type '(number | Element)[]'.
+ Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type '(number | Element)[]' is not assignable to type 'string | Element'.
+ Type '(number | Element)[]' is not assignable to type 'Element'.
+ Property 'type' is missing in type '(number | Element)[]'.
tests/cases/conformance/jsx/file.tsx(43,6): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type '(string | Element)[]' is not assignable to type 'string | Element'.
- Type '(string | Element)[]' is not assignable to type 'Element'.
- Property 'type' is missing in type '(string | Element)[]'.
+ Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type '(string | Element)[]' is not assignable to type 'string | Element'.
+ Type '(string | Element)[]' is not assignable to type 'Element'.
+ Property 'type' is missing in type '(string | Element)[]'.
tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type 'Element[]' is not assignable to type 'string | Element'.
- Type 'Element[]' is not assignable to type 'Element'.
- Property 'type' is missing in type 'Element[]'.
+ Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type 'Element[]' is not assignable to type 'string | Element'.
+ Type 'Element[]' is not assignable to type 'Element'.
+ Property 'type' is missing in type 'Element[]'.
==== tests/cases/conformance/jsx/file.tsx (6 errors) ====
@@ -40,7 +45,8 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
let k = ;
~~~~
!!! error TS2322: Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Property 'children' is missing in type '{ a: number; b: string; }'.
+!!! error TS2322: Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Property 'children' is missing in type '{ a: number; b: string; }'.
let k0 =
@@ -62,10 +68,11 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
~~~~
!!! error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
-!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'Element'.
-!!! error TS2322: Property 'type' is missing in type '(Element | ((name: string) => Element))[]'.
+!!! error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
+!!! error TS2322: Type '(Element | ((name: string) => Element))[]' is not assignable to type 'Element'.
+!!! error TS2322: Property 'type' is missing in type '(Element | ((name: string) => Element))[]'.
My Div
{(name: string) =>
My name {name}
}
;
@@ -74,10 +81,11 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
~~~~
!!! error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'string | Element'.
-!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'Element'.
-!!! error TS2322: Property 'type' is missing in type '(number | Element)[]'.
+!!! error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'string | Element'.
+!!! error TS2322: Type '(number | Element)[]' is not assignable to type 'Element'.
+!!! error TS2322: Property 'type' is missing in type '(number | Element)[]'.
My Div
{1000000}
;
@@ -86,10 +94,11 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
~~~~
!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'string | Element'.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element'.
-!!! error TS2322: Property 'type' is missing in type '(string | Element)[]'.
+!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'string | Element'.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element'.
+!!! error TS2322: Property 'type' is missing in type '(string | Element)[]'.
My Div
hi hi hi!
;
@@ -98,10 +107,11 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Elem
~~~~
!!! error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type 'Element[]' is not assignable to type 'string | Element'.
-!!! error TS2322: Type 'Element[]' is not assignable to type 'Element'.
-!!! error TS2322: Property 'type' is missing in type 'Element[]'.
+!!! error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type 'Element[]' is not assignable to type 'string | Element'.
+!!! error TS2322: Type 'Element[]' is not assignable to type 'Element'.
+!!! error TS2322: Property 'type' is missing in type 'Element[]'.
My Div
My Div
;
\ No newline at end of file
diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt
index 986df05ceb6..6896e29fd58 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt
@@ -1,8 +1,9 @@
tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'?
tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
- Types of property 'children' are incompatible.
- Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
- Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
+ Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
+ Types of property 'children' are incompatible.
+ Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
+ Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
@@ -42,9 +43,10 @@ tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: ((u
~~~~~~~~~
!!! error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
-!!! error TS2322: Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
+!!! error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
+!!! error TS2322: Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt
index 8aa860f4889..b76b8468098 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt
@@ -1,13 +1,16 @@
tests/cases/conformance/jsx/file.tsx(20,10): error TS2322: Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
- Property 'children' is missing in type '{ a: number; b: string; }'.
+ Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
+ Property 'children' is missing in type '{ a: number; b: string; }'.
tests/cases/conformance/jsx/file.tsx(24,6): error TS2322: Type '{ children: Element; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type 'Element' is not assignable to type 'Button'.
- Property 'render' is missing in type 'Element'.
+ Type '{ children: Element; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type 'Element' is not assignable to type 'Button'.
+ Property 'render' is missing in type 'Element'.
tests/cases/conformance/jsx/file.tsx(28,6): error TS2322: Type '{ children: typeof Button; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type 'typeof Button' is not assignable to type 'Button'.
- Property 'render' is missing in type 'typeof Button'.
+ Type '{ children: typeof Button; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type 'typeof Button' is not assignable to type 'Button'.
+ Property 'render' is missing in type 'typeof Button'.
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -33,24 +36,27 @@ tests/cases/conformance/jsx/file.tsx(28,6): error TS2322: Type '{ children: type
let k = ;
~~~~
!!! error TS2322: Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Property 'children' is missing in type '{ a: number; b: string; }'.
+!!! error TS2322: Type '{ a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Property 'children' is missing in type '{ a: number; b: string; }'.
// Error: JSX.element is not the same as JSX.ElementClass
let k1 =
~~~~
!!! error TS2322: Type '{ children: Element; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type 'Element' is not assignable to type 'Button'.
-!!! error TS2322: Property 'render' is missing in type 'Element'.
+!!! error TS2322: Type '{ children: Element; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type 'Element' is not assignable to type 'Button'.
+!!! error TS2322: Property 'render' is missing in type 'Element'.
;
let k2 =
~~~~
!!! error TS2322: Type '{ children: typeof Button; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type 'typeof Button' is not assignable to type 'Button'.
-!!! error TS2322: Property 'render' is missing in type 'typeof Button'.
+!!! error TS2322: Type '{ children: typeof Button; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type 'typeof Button' is not assignable to type 'Button'.
+!!! error TS2322: Property 'render' is missing in type 'typeof Button'.
{Button}
;
\ No newline at end of file
diff --git a/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt
index 6a2325cb827..45f2c848d5f 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt
@@ -1,17 +1,20 @@
tests/cases/conformance/jsx/file.tsx(24,11): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
- Type '(string | Element)[]' is not assignable to type 'Element[]'.
- Type 'string | Element' is not assignable to type 'Element'.
- Type 'string' is not assignable to type 'Element'.
+ Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
+ Type '(string | Element)[]' is not assignable to type 'Element[]'.
+ Type 'string | Element' is not assignable to type 'Element'.
+ Type 'string' is not assignable to type 'Element'.
tests/cases/conformance/jsx/file.tsx(25,11): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
- Type '(string | Element)[]' is not assignable to type 'Element[]'.
+ Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
+ Type '(string | Element)[]' is not assignable to type 'Element[]'.
tests/cases/conformance/jsx/file.tsx(27,11): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
- Types of property 'children' are incompatible.
- Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
- Type '(string | Element)[]' is not assignable to type 'Element[]'.
+ Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+ Types of property 'children' are incompatible.
+ Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
+ Type '(string | Element)[]' is not assignable to type 'Element[]'.
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -41,22 +44,25 @@ tests/cases/conformance/jsx/file.tsx(27,11): error TS2322: Type '{ children: (st
let k1 = ;
~~~~
!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element[]'.
-!!! error TS2322: Type 'string | Element' is not assignable to type 'Element'.
-!!! error TS2322: Type 'string' is not assignable to type 'Element'.
+!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element[]'.
+!!! error TS2322: Type 'string | Element' is not assignable to type 'Element'.
+!!! error TS2322: Type 'string' is not assignable to type 'Element'.
let k2 =
~~~~
!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element[]'.
+!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element[]'.
;
let k3 =
~~~~
!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'children' are incompatible.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
-!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element[]'.
+!!! error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'children' are incompatible.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element | Element[]'.
+!!! error TS2322: Type '(string | Element)[]' is not assignable to type 'Element[]'.
;
\ No newline at end of file
diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
index 96e79a9cec7..d98e5c3db0d 100644
--- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
+++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
@@ -1,7 +1,9 @@
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,13): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'.
- Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'.
+ Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'.
+ Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'.
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(28,13): error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'LinkProps'.
- Property 'goTo' is missing in type '{ onClick: (k: "left" | "right") => void; extra: true; }'.
+ Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'LinkProps'.
+ Property 'goTo' is missing in type '{ onClick: (k: "left" | "right") => void; extra: true; }'.
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(29,43): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(30,36): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(33,65): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'.
@@ -38,11 +40,13 @@ tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,44): err
const b0 = {console.log(k)}}} extra />; // k has type "left" | "right"
~~~~~~~~~~
!!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'.
-!!! error TS2322: Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'.
+!!! error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'.
+!!! error TS2322: Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'.
const b2 = {console.log(k)}} extra />; // k has type "left" | "right"
~~~~~~~~~~
!!! error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'LinkProps'.
-!!! error TS2322: Property 'goTo' is missing in type '{ onClick: (k: "left" | "right") => void; extra: true; }'.
+!!! error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'LinkProps'.
+!!! error TS2322: Property 'goTo' is missing in type '{ onClick: (k: "left" | "right") => void; extra: true; }'.
const b3 = ; // goTo has type"home" | "contact"
~~~~~
!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
diff --git a/tests/baselines/reference/errorsOnWeakTypeIntersectionTargets01.errors.txt b/tests/baselines/reference/errorsOnWeakTypeIntersectionTargets01.errors.txt
index 97405007089..01b33e3afab 100644
--- a/tests/baselines/reference/errorsOnWeakTypeIntersectionTargets01.errors.txt
+++ b/tests/baselines/reference/errorsOnWeakTypeIntersectionTargets01.errors.txt
@@ -1,23 +1,24 @@
tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(10,12): error TS2322: Type '{ a: number; b: number; }' is not assignable to type 'A & B'.
Type '{ a: number; b: number; }' is not assignable to type 'B'.
- Types of property 'b' are incompatible.
- Type 'number' is not assignable to type 'string'.
-tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(16,12): error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'A & B'.
+ Type '{ a: number; b: number; }' is not assignable to type 'B'.
+ Types of property 'b' are incompatible.
+ Type 'number' is not assignable to type 'string'.
+tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(16,12): error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'A'.
Type '{ a: string; b: string; }' is not assignable to type 'A'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number'.
-tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(22,12): error TS2322: Type '{ a: string; }' is not assignable to type 'A & B'.
+tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(22,12): error TS2322: Type '{ a: string; }' is not assignable to type 'A'.
Type '{ a: string; }' is not assignable to type 'A'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number'.
-tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(27,12): error TS2322: Type '{ a: string; b: number; }' is not assignable to type 'A & B'.
+tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(27,12): error TS2322: Type '{ a: string; b: number; }' is not assignable to type 'A'.
Type '{ a: string; b: number; }' is not assignable to type 'A'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number'.
-tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(33,12): error TS2322: Type '{ b: number; }' is not assignable to type 'A & B'.
+tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(33,12): error TS2322: Type '{ b: number; }' is not assignable to type 'A'.
Type '{ b: number; }' is not assignable to type 'A'.
Property 'a' is missing in type '{ b: number; }'.
-tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS2322: Type '{ b: string; }' is not assignable to type 'A & B'.
+tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS2322: Type '{ b: string; }' is not assignable to type 'A'.
Type '{ b: string; }' is not assignable to type 'A'.
Property 'a' is missing in type '{ b: string; }'.
@@ -36,8 +37,9 @@ tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS23
~~
!!! error TS2322: Type '{ a: number; b: number; }' is not assignable to type 'A & B'.
!!! error TS2322: Type '{ a: number; b: number; }' is not assignable to type 'B'.
-!!! error TS2322: Types of property 'b' are incompatible.
-!!! error TS2322: Type 'number' is not assignable to type 'string'.
+!!! error TS2322: Type '{ a: number; b: number; }' is not assignable to type 'B'.
+!!! error TS2322: Types of property 'b' are incompatible.
+!!! error TS2322: Type 'number' is not assignable to type 'string'.
a: 0,
b: 12,
}
@@ -45,7 +47,7 @@ tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS23
// 'a' is incompatible, 'b' is present and compatible.
export let x2: A & B = {
~~
-!!! error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'A & B'.
+!!! error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'A'.
!!! error TS2322: Type '{ a: string; b: string; }' is not assignable to type 'A'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
@@ -56,7 +58,7 @@ tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS23
// 'a' is incompatible, 'b' is absent.
export let x3: A & B = {
~~
-!!! error TS2322: Type '{ a: string; }' is not assignable to type 'A & B'.
+!!! error TS2322: Type '{ a: string; }' is not assignable to type 'A'.
!!! error TS2322: Type '{ a: string; }' is not assignable to type 'A'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
@@ -66,7 +68,7 @@ tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS23
// Both 'a' and 'b' are incompatible
export let x4: A & B = {
~~
-!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type 'A & B'.
+!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type 'A'.
!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type 'A'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
@@ -77,7 +79,7 @@ tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS23
// 'b' is compatible, 'a' is missing
export let x5: A & B = {
~~
-!!! error TS2322: Type '{ b: number; }' is not assignable to type 'A & B'.
+!!! error TS2322: Type '{ b: number; }' is not assignable to type 'A'.
!!! error TS2322: Type '{ b: number; }' is not assignable to type 'A'.
!!! error TS2322: Property 'a' is missing in type '{ b: number; }'.
b: 0,
@@ -86,7 +88,7 @@ tests/cases/compiler/errorsOnWeakTypeIntersectionTargets01.ts(38,12): error TS23
// 'b' is incompatible, 'a' is missing
export let x6: A & B = {
~~
-!!! error TS2322: Type '{ b: string; }' is not assignable to type 'A & B'.
+!!! error TS2322: Type '{ b: string; }' is not assignable to type 'A'.
!!! error TS2322: Type '{ b: string; }' is not assignable to type 'A'.
!!! error TS2322: Property 'a' is missing in type '{ b: string; }'.
b: "",
diff --git a/tests/baselines/reference/tsxAttributeResolution12.errors.txt b/tests/baselines/reference/tsxAttributeResolution12.errors.txt
index 802a3b1d9d5..2dc257e5a8f 100644
--- a/tests/baselines/reference/tsxAttributeResolution12.errors.txt
+++ b/tests/baselines/reference/tsxAttributeResolution12.errors.txt
@@ -1,7 +1,7 @@
-tests/cases/conformance/jsx/file.tsx(25,11): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { reqd: any; }'.
+tests/cases/conformance/jsx/file.tsx(25,11): error TS2322: Type '{}' is not assignable to type '{ reqd: any; }'.
Type '{}' is not assignable to type '{ reqd: any; }'.
Property 'reqd' is missing in type '{}'.
-tests/cases/conformance/jsx/file.tsx(28,11): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { reqd: any; }'.
+tests/cases/conformance/jsx/file.tsx(28,11): error TS2322: Type '{}' is not assignable to type '{ reqd: any; }'.
Type '{}' is not assignable to type '{ reqd: any; }'.
Property 'reqd' is missing in type '{}'.
@@ -46,14 +46,14 @@ tests/cases/conformance/jsx/file.tsx(28,11): error TS2322: Type '{}' is not assi
const T = TestMod.Test;
var t1 = ;
~
-!!! error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { reqd: any; }'.
+!!! error TS2322: Type '{}' is not assignable to type '{ reqd: any; }'.
!!! error TS2322: Type '{}' is not assignable to type '{ reqd: any; }'.
!!! error TS2322: Property 'reqd' is missing in type '{}'.
// Should error
var t2 = ;
~~~~~~~~~~~~
-!!! error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { reqd: any; }'.
+!!! error TS2322: Type '{}' is not assignable to type '{ reqd: any; }'.
!!! error TS2322: Type '{}' is not assignable to type '{ reqd: any; }'.
!!! error TS2322: Property 'reqd' is missing in type '{}'.
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
index 669c315b71a..07c22d1aca6 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
@@ -1,5 +1,6 @@
tests/cases/conformance/jsx/file.tsx(13,11): error TS2322: Type '{}' is not assignable to type 'Prop'.
- Property 'a' is missing in type '{}'.
+ Type '{}' is not assignable to type 'Prop'.
+ Property 'a' is missing in type '{}'.
tests/cases/conformance/jsx/file.tsx(19,18): error TS2326: Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number'.
@@ -20,7 +21,8 @@ tests/cases/conformance/jsx/file.tsx(19,18): error TS2326: Types of property 'a'
let x1 =
~~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'Prop'.
-!!! error TS2322: Property 'a' is missing in type '{}'.
+!!! error TS2322: Type '{}' is not assignable to type 'Prop'.
+!!! error TS2322: Property 'a' is missing in type '{}'.
// OK
let x =
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt
index 68a7a8a356d..93dc0fd391b 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt
@@ -3,8 +3,9 @@ tests/cases/conformance/jsx/file.tsx(27,33): error TS2326: Types of property 'y'
tests/cases/conformance/jsx/file.tsx(28,50): error TS2326: Types of property 'x' are incompatible.
Type '3' is not assignable to type '2'.
tests/cases/conformance/jsx/file.tsx(30,11): error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'.
- Types of property 'y' are incompatible.
- Type 'true' is not assignable to type 'false'.
+ Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'.
+ Types of property 'y' are incompatible.
+ Type 'true' is not assignable to type 'false'.
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -46,7 +47,8 @@ tests/cases/conformance/jsx/file.tsx(30,11): error TS2322: Type '{ y: true; x: 2
let x3 =
~~~~~~~~~~~~~
!!! error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'.
-!!! error TS2322: Types of property 'y' are incompatible.
-!!! error TS2322: Type 'true' is not assignable to type 'false'.
+!!! error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'.
+!!! error TS2322: Types of property 'y' are incompatible.
+!!! error TS2322: Type 'true' is not assignable to type 'false'.
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt
index accecdff013..e0d3b75c251 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt
@@ -1,5 +1,6 @@
tests/cases/conformance/jsx/file.tsx(11,10): error TS2322: Type '{ property1: string; property2: number; }' is not assignable to type 'AnotherComponentProps'.
- Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }'.
+ Type '{ property1: string; property2: number; }' is not assignable to type 'AnotherComponentProps'.
+ Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }'.
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
@@ -16,7 +17,8 @@ tests/cases/conformance/jsx/file.tsx(11,10): error TS2322: Type '{ property1: st
~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ property1: string; property2: number; }' is not assignable to type 'AnotherComponentProps'.
-!!! error TS2322: Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }'.
+!!! error TS2322: Type '{ property1: string; property2: number; }' is not assignable to type 'AnotherComponentProps'.
+!!! error TS2322: Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }'.
);
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
index d472e032a1e..03faad4455a 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
@@ -1,17 +1,21 @@
tests/cases/conformance/jsx/file.tsx(17,10): error TS2322: Type '{}' is not assignable to type 'PoisonedProp'.
- Property 'x' is missing in type '{}'.
+ Type '{}' is not assignable to type 'PoisonedProp'.
+ Property 'x' is missing in type '{}'.
tests/cases/conformance/jsx/file.tsx(18,10): error TS2322: Type '{}' is not assignable to type 'PoisonedProp'.
- Property 'x' is missing in type '{}'.
+ Type '{}' is not assignable to type 'PoisonedProp'.
+ Property 'x' is missing in type '{}'.
tests/cases/conformance/jsx/file.tsx(19,19): error TS2326: Types of property 'x' are incompatible.
Type 'true' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(19,21): error TS2326: Types of property 'y' are incompatible.
Type 'true' is not assignable to type '"2"'.
tests/cases/conformance/jsx/file.tsx(20,10): error TS2322: Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
- Types of property 'x' are incompatible.
- Type 'number' is not assignable to type 'string'.
+ Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
+ Types of property 'x' are incompatible.
+ Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(21,11): error TS2322: Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
- Types of property 'x' are incompatible.
- Type 'number' is not assignable to type 'string'.
+ Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
+ Types of property 'x' are incompatible.
+ Type 'number' is not assignable to type 'string'.
==== tests/cases/conformance/jsx/file.tsx (6 errors) ====
@@ -34,11 +38,13 @@ tests/cases/conformance/jsx/file.tsx(21,11): error TS2322: Type '{ X: string; x:
let p = ;
~~~~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'PoisonedProp'.
-!!! error TS2322: Property 'x' is missing in type '{}'.
+!!! error TS2322: Type '{}' is not assignable to type 'PoisonedProp'.
+!!! error TS2322: Property 'x' is missing in type '{}'.
let y = ;
~~~~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'PoisonedProp'.
-!!! error TS2322: Property 'x' is missing in type '{}'.
+!!! error TS2322: Type '{}' is not assignable to type 'PoisonedProp'.
+!!! error TS2322: Property 'x' is missing in type '{}'.
let z = ;
~
!!! error TS2326: Types of property 'x' are incompatible.
@@ -49,10 +55,12 @@ tests/cases/conformance/jsx/file.tsx(21,11): error TS2322: Type '{ X: string; x:
let w = ;
~~~~~~~~
!!! error TS2322: Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
-!!! error TS2322: Types of property 'x' are incompatible.
-!!! error TS2322: Type 'number' is not assignable to type 'string'.
+!!! error TS2322: Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
+!!! error TS2322: Types of property 'x' are incompatible.
+!!! error TS2322: Type 'number' is not assignable to type 'string'.
let w1 = ;
~~~~~~~~
!!! error TS2322: Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
-!!! error TS2322: Types of property 'x' are incompatible.
-!!! error TS2322: Type 'number' is not assignable to type 'string'.
\ No newline at end of file
+!!! error TS2322: Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
+!!! error TS2322: Types of property 'x' are incompatible.
+!!! error TS2322: Type 'number' is not assignable to type 'string'.
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
index 22fa2022bad..a260cb5736d 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
@@ -1,6 +1,7 @@
tests/cases/conformance/jsx/file.tsx(20,10): error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
- Types of property 'y' are incompatible.
- Type 'number' is not assignable to type '2'.
+ Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
+ Types of property 'y' are incompatible.
+ Type 'number' is not assignable to type '2'.
tests/cases/conformance/jsx/file.tsx(33,10): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
@@ -27,8 +28,9 @@ tests/cases/conformance/jsx/file.tsx(33,10): error TS2559: Type '{ prop1: boolea
let p = ;
~~~~~~~~
!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
-!!! error TS2322: Types of property 'y' are incompatible.
-!!! error TS2322: Type 'number' is not assignable to type '2'.
+!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
+!!! error TS2322: Types of property 'y' are incompatible.
+!!! error TS2322: Type 'number' is not assignable to type '2'.
class EmptyProp extends React.Component<{}, {}> {
render() {
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt
index 65deca2aff4..b7bf5a43968 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt
@@ -1,6 +1,7 @@
tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'.
Type '{ editable: true; }' is not assignable to type '{ editable: true; onEdit: (newText: string) => void; }'.
- Property 'onEdit' is missing in type '{ editable: true; }'.
+ Type '{ editable: true; }' is not assignable to type '{ editable: true; onEdit: (newText: string) => void; }'.
+ Property 'onEdit' is missing in type '{ editable: true; }'.
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
@@ -20,7 +21,8 @@ tests/cases/conformance/jsx/file.tsx(13,10): error TS2322: Type '{ editable: tru
~~~~~~~~~~~~~
!!! error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'.
!!! error TS2322: Type '{ editable: true; }' is not assignable to type '{ editable: true; onEdit: (newText: string) => void; }'.
-!!! error TS2322: Property 'onEdit' is missing in type '{ editable: true; }'.
+!!! error TS2322: Type '{ editable: true; }' is not assignable to type '{ editable: true; onEdit: (newText: string) => void; }'.
+!!! error TS2322: Property 'onEdit' is missing in type '{ editable: true; }'.
const textProps: TextProps = {
editable: false
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
index a9019c17e0d..a466e16bddb 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
@@ -1,15 +1,19 @@
tests/cases/conformance/jsx/file.tsx(12,13): error TS2322: Type '{ extraProp: true; }' is not assignable to type '{ yy: number; yy1: string; }'.
- Property 'yy' is missing in type '{ extraProp: true; }'.
+ Type '{ extraProp: true; }' is not assignable to type '{ yy: number; yy1: string; }'.
+ Property 'yy' is missing in type '{ extraProp: true; }'.
tests/cases/conformance/jsx/file.tsx(13,13): error TS2322: Type '{ yy: number; }' is not assignable to type '{ yy: number; yy1: string; }'.
- Property 'yy1' is missing in type '{ yy: number; }'.
+ Type '{ yy: number; }' is not assignable to type '{ yy: number; yy1: string; }'.
+ Property 'yy1' is missing in type '{ yy: number; }'.
tests/cases/conformance/jsx/file.tsx(14,31): error TS2326: Types of property 'yy1' are incompatible.
Type 'true' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(16,31): error TS2339: Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
tests/cases/conformance/jsx/file.tsx(17,13): error TS2322: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
- Types of property 'yy' are incompatible.
- Type 'boolean' is not assignable to type 'number'.
+ Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
+ Types of property 'yy' are incompatible.
+ Type 'boolean' is not assignable to type 'number'.
tests/cases/conformance/jsx/file.tsx(25,13): error TS2322: Type '{ extra-data: true; }' is not assignable to type '{ yy: string; direction?: number; }'.
- Property 'yy' is missing in type '{ extra-data: true; }'.
+ Type '{ extra-data: true; }' is not assignable to type '{ yy: string; direction?: number; }'.
+ Property 'yy' is missing in type '{ extra-data: true; }'.
tests/cases/conformance/jsx/file.tsx(26,40): error TS2326: Types of property 'direction' are incompatible.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsx/file.tsx(33,32): error TS2326: Types of property 'y3' are incompatible.
@@ -37,11 +41,13 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2326: Types of property 'y1
const c0 = ; // extra property;
~~~~~~~~
!!! error TS2322: Type '{ extraProp: true; }' is not assignable to type '{ yy: number; yy1: string; }'.
-!!! error TS2322: Property 'yy' is missing in type '{ extraProp: true; }'.
+!!! error TS2322: Type '{ extraProp: true; }' is not assignable to type '{ yy: number; yy1: string; }'.
+!!! error TS2322: Property 'yy' is missing in type '{ extraProp: true; }'.
const c1 = ; // missing property;
~~~~~~~~
!!! error TS2322: Type '{ yy: number; }' is not assignable to type '{ yy: number; yy1: string; }'.
-!!! error TS2322: Property 'yy1' is missing in type '{ yy: number; }'.
+!!! error TS2322: Type '{ yy: number; }' is not assignable to type '{ yy: number; yy1: string; }'.
+!!! error TS2322: Property 'yy1' is missing in type '{ yy: number; }'.
const c2 = ; // type incompatible;
~~~
!!! error TS2326: Types of property 'yy1' are incompatible.
@@ -53,8 +59,9 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2326: Types of property 'y1
const c5 = ; // type incompatible;
~~~~~~~~
!!! error TS2322: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
-!!! error TS2322: Types of property 'yy' are incompatible.
-!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
+!!! error TS2322: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
+!!! error TS2322: Types of property 'yy' are incompatible.
+!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
const c6 = ; // Should error as there is extra attribute that doesn't match any. Current it is not
const c7 = ; // Should error as there is extra attribute that doesn't match any. Current it is not
@@ -65,7 +72,8 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2326: Types of property 'y1
const d1 =
~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ extra-data: true; }' is not assignable to type '{ yy: string; direction?: number; }'.
-!!! error TS2322: Property 'yy' is missing in type '{ extra-data: true; }'.
+!!! error TS2322: Type '{ extra-data: true; }' is not assignable to type '{ yy: string; direction?: number; }'.
+!!! error TS2322: Property 'yy' is missing in type '{ extra-data: true; }'.
const d2 =
~~~~~~~~~~~~~~~~
!!! error TS2326: Types of property 'direction' are incompatible.
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
index b0b05adfa6a..ed0f38f7171 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
@@ -1,13 +1,18 @@
tests/cases/conformance/jsx/file.tsx(48,13): error TS2322: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'HyphenProps'.
- Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }'.
+ Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'HyphenProps'.
+ Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }'.
tests/cases/conformance/jsx/file.tsx(49,13): error TS2322: Type '{ children: string; to: string; onClick: (e: any) => void; }' is not assignable to type 'HyphenProps'.
- Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: any) => void; }'.
+ Type '{ children: string; to: string; onClick: (e: any) => void; }' is not assignable to type 'HyphenProps'.
+ Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: any) => void; }'.
tests/cases/conformance/jsx/file.tsx(50,13): error TS2322: Type '{ onClick: () => void; to: string; }' is not assignable to type 'HyphenProps'.
- Property '"data-format"' is missing in type '{ onClick: () => void; to: string; }'.
+ Type '{ onClick: () => void; to: string; }' is not assignable to type 'HyphenProps'.
+ Property '"data-format"' is missing in type '{ onClick: () => void; to: string; }'.
tests/cases/conformance/jsx/file.tsx(51,13): error TS2322: Type '{ onClick: (k: MouseEvent) => void; to: string; }' is not assignable to type 'HyphenProps'.
- Property '"data-format"' is missing in type '{ onClick: (k: MouseEvent) => void; to: string; }'.
+ Type '{ onClick: (k: MouseEvent) => void; to: string; }' is not assignable to type 'HyphenProps'.
+ Property '"data-format"' is missing in type '{ onClick: (k: MouseEvent) => void; to: string; }'.
tests/cases/conformance/jsx/file.tsx(53,13): error TS2322: Type '{ to: string; onClick(e: any): void; }' is not assignable to type 'HyphenProps'.
- Property '"data-format"' is missing in type '{ to: string; onClick(e: any): void; }'.
+ Type '{ to: string; onClick(e: any): void; }' is not assignable to type 'HyphenProps'.
+ Property '"data-format"' is missing in type '{ to: string; onClick(e: any): void; }'.
tests/cases/conformance/jsx/file.tsx(54,51): error TS2326: Types of property 'children' are incompatible.
Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(55,68): error TS2326: Types of property 'className' are incompatible.
@@ -67,24 +72,29 @@ tests/cases/conformance/jsx/file.tsx(56,24): error TS2326: Types of property 'da
const b0 = {}}>GO; // extra property;
~~~~~~~~~~
!!! error TS2322: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'HyphenProps'.
-!!! error TS2322: Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }'.
+!!! error TS2322: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'HyphenProps'.
+!!! error TS2322: Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }'.
const b1 = {}} {...obj0}>Hello world; // extra property;
~~~~~~~~~~
!!! error TS2322: Type '{ children: string; to: string; onClick: (e: any) => void; }' is not assignable to type 'HyphenProps'.
-!!! error TS2322: Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: any) => void; }'.
+!!! error TS2322: Type '{ children: string; to: string; onClick: (e: any) => void; }' is not assignable to type 'HyphenProps'.
+!!! error TS2322: Property '"data-format"' is missing in type '{ children: string; to: string; onClick: (e: any) => void; }'.
const b2 = ; // extra property
~~~~~~~~~~
!!! error TS2322: Type '{ onClick: () => void; to: string; }' is not assignable to type 'HyphenProps'.
-!!! error TS2322: Property '"data-format"' is missing in type '{ onClick: () => void; to: string; }'.
+!!! error TS2322: Type '{ onClick: () => void; to: string; }' is not assignable to type 'HyphenProps'.
+!!! error TS2322: Property '"data-format"' is missing in type '{ onClick: () => void; to: string; }'.
const b3 = {}}} />; // extra property
~~~~~~~~~~
!!! error TS2322: Type '{ onClick: (k: MouseEvent) => void; to: string; }' is not assignable to type 'HyphenProps'.
-!!! error TS2322: Property '"data-format"' is missing in type '{ onClick: (k: MouseEvent) => void; to: string; }'.
+!!! error TS2322: Type '{ onClick: (k: MouseEvent) => void; to: string; }' is not assignable to type 'HyphenProps'.
+!!! error TS2322: Property '"data-format"' is missing in type '{ onClick: (k: MouseEvent) => void; to: string; }'.
const b4 = ; // Should error because Incorrect type; but attributes are any so everything is allowed
const b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes
~~~~~~~~~~
!!! error TS2322: Type '{ to: string; onClick(e: any): void; }' is not assignable to type 'HyphenProps'.
-!!! error TS2322: Property '"data-format"' is missing in type '{ to: string; onClick(e: any): void; }'.
+!!! error TS2322: Type '{ to: string; onClick(e: any): void; }' is not assignable to type 'HyphenProps'.
+!!! error TS2322: Property '"data-format"' is missing in type '{ to: string; onClick(e: any): void; }'.
const b6 = ; // incorrect type for optional attribute
~~~~~~~~~~~~~
!!! error TS2326: Types of property 'children' are incompatible.
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
index 2a5f87adb97..26f9c3b9834 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
@@ -1,10 +1,12 @@
tests/cases/conformance/jsx/file.tsx(19,10): error TS2322: Type '{ naaame: string; }' is not assignable to type '{ name: string; }'.
- Property 'name' is missing in type '{ naaame: string; }'.
+ Type '{ naaame: string; }' is not assignable to type '{ name: string; }'.
+ Property 'name' is missing in type '{ naaame: string; }'.
tests/cases/conformance/jsx/file.tsx(27,15): error TS2326: Types of property 'name' are incompatible.
Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(29,10): error TS2559: Type '{ naaaaaaame: string; }' has no properties in common with type 'IntrinsicAttributes & { name?: string; }'.
tests/cases/conformance/jsx/file.tsx(34,10): error TS2322: Type '{ extra-prop-name: string; }' is not assignable to type '{ "prop-name": string; }'.
- Property '"prop-name"' is missing in type '{ extra-prop-name: string; }'.
+ Type '{ extra-prop-name: string; }' is not assignable to type '{ "prop-name": string; }'.
+ Property '"prop-name"' is missing in type '{ extra-prop-name: string; }'.
tests/cases/conformance/jsx/file.tsx(37,10): error TS2559: Type '{ prop1: true; }' has no properties in common with type 'IntrinsicAttributes'.
tests/cases/conformance/jsx/file.tsx(38,11): error TS2559: Type '{ ref: (x: any) => any; }' has no properties in common with type 'IntrinsicAttributes'.
tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
@@ -33,7 +35,8 @@ tests/cases/conformance/jsx/file.tsx(45,11): error TS2559: Type '{ prop1: boolea
let b = ;
~~~~~
!!! error TS2322: Type '{ naaame: string; }' is not assignable to type '{ name: string; }'.
-!!! error TS2322: Property 'name' is missing in type '{ naaame: string; }'.
+!!! error TS2322: Type '{ naaame: string; }' is not assignable to type '{ name: string; }'.
+!!! error TS2322: Property 'name' is missing in type '{ naaame: string; }'.
// OK
let c = ;
@@ -56,7 +59,8 @@ tests/cases/conformance/jsx/file.tsx(45,11): error TS2559: Type '{ prop1: boolea
let h = ;
~~~~~~~~~~~~
!!! error TS2322: Type '{ extra-prop-name: string; }' is not assignable to type '{ "prop-name": string; }'.
-!!! error TS2322: Property '"prop-name"' is missing in type '{ extra-prop-name: string; }'.
+!!! error TS2322: Type '{ extra-prop-name: string; }' is not assignable to type '{ "prop-name": string; }'.
+!!! error TS2322: Property '"prop-name"' is missing in type '{ extra-prop-name: string; }'.
// Error
let i =
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt
index 710a443029f..a39dfd35aef 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/file.tsx(8,43): error TS2326: Types of property 'ignore-prop' are incompatible.
Type '(T & { ignore-prop: number; })["ignore-prop"]' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.
-tests/cases/conformance/jsx/file.tsx(13,15): error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: {}; "ignore-prop": string; }'.
+tests/cases/conformance/jsx/file.tsx(13,15): error TS2322: Type 'T' is not assignable to type '{ prop: {}; "ignore-prop": string; }'.
Type 'T' is not assignable to type '{ prop: {}; "ignore-prop": string; }'.
tests/cases/conformance/jsx/file.tsx(20,19): error TS2326: Types of property 'func' are incompatible.
Type '(a: number, b: string) => void' is not assignable to type '(arg: number) => void'.
@@ -30,7 +30,7 @@ tests/cases/conformance/jsx/file.tsx(31,52): error TS2326: Types of property 'se
function Baz(arg: T) {
let a0 =
~~~~~~~~~~~~~~~~~~
-!!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: {}; "ignore-prop": string; }'.
+!!! error TS2322: Type 'T' is not assignable to type '{ prop: {}; "ignore-prop": string; }'.
!!! error TS2322: Type 'T' is not assignable to type '{ prop: {}; "ignore-prop": string; }'.
}
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt
index 61f80848667..f0c95fd4d12 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt
@@ -1,6 +1,7 @@
tests/cases/conformance/jsx/file.tsx(9,15): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: {}; a: number; }'.
- Property 'b' is missing in type '{ a: number; }'.
-tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: {}; a: {}; }'.
+ Type '{ a: number; }' is not assignable to type '{ b: {}; a: number; }'.
+ Property 'b' is missing in type '{ a: number; }'.
+tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type '{ b: {}; a: {}; }'.
Type 'T & { ignore-prop: true; }' is not assignable to type '{ b: {}; a: {}; }'.
Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }'.
@@ -17,10 +18,11 @@ tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-pr
let a0 =
~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: {}; a: number; }'.
-!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
+!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: {}; a: number; }'.
+!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
let a2 = // missing a
~~~~~~~~~~~~~~~~~
-!!! error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: {}; a: {}; }'.
+!!! error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type '{ b: {}; a: {}; }'.
!!! error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type '{ b: {}; a: {}; }'.
!!! error TS2322: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }'.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxUnionElementType6.errors.txt b/tests/baselines/reference/tsxUnionElementType6.errors.txt
index 1dc5a05f8b5..219aeeb1c5a 100644
--- a/tests/baselines/reference/tsxUnionElementType6.errors.txt
+++ b/tests/baselines/reference/tsxUnionElementType6.errors.txt
@@ -2,9 +2,11 @@ tests/cases/conformance/jsx/file.tsx(18,10): error TS2559: Type '{ x: true; }' h
tests/cases/conformance/jsx/file.tsx(19,27): error TS2326: Types of property 'x' are incompatible.
Type 'string' is not assignable to type 'boolean'.
tests/cases/conformance/jsx/file.tsx(20,10): error TS2322: Type '{}' is not assignable to type '{ x: boolean; }'.
- Property 'x' is missing in type '{}'.
+ Type '{}' is not assignable to type '{ x: boolean; }'.
+ Property 'x' is missing in type '{}'.
tests/cases/conformance/jsx/file.tsx(21,10): error TS2322: Type '{ data-prop: true; }' is not assignable to type '{ x: boolean; }'.
- Property 'x' is missing in type '{ data-prop: true; }'.
+ Type '{ data-prop: true; }' is not assignable to type '{ x: boolean; }'.
+ Property 'x' is missing in type '{ data-prop: true; }'.
==== tests/cases/conformance/jsx/file.tsx (4 errors) ====
@@ -35,10 +37,12 @@ tests/cases/conformance/jsx/file.tsx(21,10): error TS2322: Type '{ data-prop: tr
let c = ;
~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{}' is not assignable to type '{ x: boolean; }'.
-!!! error TS2322: Property 'x' is missing in type '{}'.
+!!! error TS2322: Type '{}' is not assignable to type '{ x: boolean; }'.
+!!! error TS2322: Property 'x' is missing in type '{}'.
let d = ;
~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ data-prop: true; }' is not assignable to type '{ x: boolean; }'.
-!!! error TS2322: Property 'x' is missing in type '{ data-prop: true; }'.
+!!! error TS2322: Type '{ data-prop: true; }' is not assignable to type '{ x: boolean; }'.
+!!! error TS2322: Property 'x' is missing in type '{ data-prop: true; }'.
\ No newline at end of file