(props: T) : JSX.Element;
>T : Symbol(T, Decl(file.tsx, 2, 27))
>props : Symbol(props, Decl(file.tsx, 2, 30))
>T : Symbol(T, Decl(file.tsx, 2, 27))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
const decorator = function (props: U) {
>decorator : Symbol(decorator, Decl(file.tsx, 3, 5))
diff --git a/tests/baselines/reference/tsxGenericAttributesType9.js b/tests/baselines/reference/tsxGenericAttributesType9.js
index b7b90736ad..c53a8de520 100644
--- a/tests/baselines/reference/tsxGenericAttributesType9.js
+++ b/tests/baselines/reference/tsxGenericAttributesType9.js
@@ -1,7 +1,7 @@
//// [file.tsx]
import React = require('react');
-export function makeP (Ctor: React.ComponentClass
): React.ComponentClass
{
+export function makeP
(Ctor: React.ComponentClass
) {
return class extends React.PureComponent
{
public render(): JSX.Element {
return (
@@ -9,7 +9,9 @@ export function makeP
(Ctor: React.ComponentClass
): React.ComponentClass
);
}
};
-}
+}
+
+
//// [file.jsx]
"use strict";
diff --git a/tests/baselines/reference/tsxGenericAttributesType9.symbols b/tests/baselines/reference/tsxGenericAttributesType9.symbols
index f4df2e7940..2771e0a07e 100644
--- a/tests/baselines/reference/tsxGenericAttributesType9.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType9.symbols
@@ -2,36 +2,35 @@
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
-export function makeP
(Ctor: React.ComponentClass
): React.ComponentClass
{
+export function makeP
(Ctor: React.ComponentClass
) {
>makeP : Symbol(makeP, Decl(file.tsx, 0, 32))
>P : Symbol(P, Decl(file.tsx, 2, 22))
>Ctor : Symbol(Ctor, Decl(file.tsx, 2, 25))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 204, 5))
->P : Symbol(P, Decl(file.tsx, 2, 22))
->React : Symbol(React, Decl(file.tsx, 0, 0))
->ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 204, 5))
+>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 205, 5))
>P : Symbol(P, Decl(file.tsx, 2, 22))
return class extends React.PureComponent
{
->React.PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 179, 5))
+>React.PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 180, 5))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 179, 5))
+>PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 180, 5))
>P : Symbol(P, Decl(file.tsx, 2, 22))
public render(): JSX.Element {
>render : Symbol((Anonymous class).render, Decl(file.tsx, 3, 52))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
return (
>Ctor : Symbol(Ctor, Decl(file.tsx, 2, 25))
->this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
+>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
>this : Symbol((Anonymous class), Decl(file.tsx, 3, 7))
->props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
+>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
);
}
};
}
+
+
diff --git a/tests/baselines/reference/tsxGenericAttributesType9.types b/tests/baselines/reference/tsxGenericAttributesType9.types
index a1d7efc49b..2cc8a57bc5 100644
--- a/tests/baselines/reference/tsxGenericAttributesType9.types
+++ b/tests/baselines/reference/tsxGenericAttributesType9.types
@@ -2,15 +2,12 @@
import React = require('react');
>React : typeof React
-export function makeP
(Ctor: React.ComponentClass
): React.ComponentClass
{
->makeP :
(Ctor: React.ComponentClass
) => React.ComponentClass
+export function makeP
(Ctor: React.ComponentClass
) {
+>makeP :
(Ctor: React.ComponentClass
) => typeof (Anonymous class)
>P : P
>Ctor : React.ComponentClass
>React : any
>ComponentClass : React.ComponentClass
->P : P
->React : any
->ComponentClass : React.ComponentClass
>P : P
return class extends React.PureComponent
{
@@ -39,3 +36,5 @@ export function makeP
(Ctor: React.ComponentClass
): React.ComponentClass
}
};
}
+
+
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols
index b4aaafb21a..fbdff5c5f3 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols
@@ -16,9 +16,9 @@ declare class MyComp
extends React.Component
{
>MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
>P : Symbol(P, Decl(file.tsx, 7, 21))
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>P : Symbol(P, Decl(file.tsx, 7, 21))
internalProp: P;
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
index 230ca1e279..3dda3667ff 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
@@ -1,5 +1,7 @@
-tests/cases/conformance/jsx/file.tsx(16,17): error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
-tests/cases/conformance/jsx/file.tsx(17,18): error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
+tests/cases/conformance/jsx/file.tsx(16,17): error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
+ Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: 10; b: "hi"; }'.
+tests/cases/conformance/jsx/file.tsx(17,18): error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
+ Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: "hi"; }'.
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
@@ -19,8 +21,10 @@ tests/cases/conformance/jsx/file.tsx(17,18): error TS2339: Property 'a' does not
// Error
let x =
- ~~~~~~
-!!! error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
+ ~~~~~~~~~~~~~
+!!! error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: 10; b: "hi"; }'.
let x2 =
~~~~~~
-!!! error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
\ No newline at end of file
+!!! error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: "hi"; }'.
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
index 273ea39281..82a4e5cc82 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
@@ -4,16 +4,16 @@ import React = require('react');
class Poisoned extends React.Component<{}, {}> {
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 0, 32))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
render() {
>render : Symbol(Poisoned.render, Decl(file.tsx, 2, 48))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols
index 5646934ef4..ebea95a29e 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols
@@ -39,17 +39,17 @@ interface Prop {
class OverWriteAttr extends React.Component {
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
render() {
>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols
index 2e14622579..6b8d637f82 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols
@@ -52,9 +52,9 @@ function ChildComponent({ property1 }: AnotherComponentProps) {
return (
{property1}
->span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
>property1 : Symbol(property1, Decl(file.tsx, 23, 25))
->span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols
index 00e1095482..013e2553b0 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols
@@ -47,9 +47,9 @@ function AnotherComponent({ property1 }: AnotherComponentProps) {
return (
{property1}
->span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
>property1 : Symbol(property1, Decl(file.tsx, 19, 27))
->span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols
index 05de039a49..125244c229 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols
@@ -14,17 +14,17 @@ interface PoisonedProp {
class Poisoned extends React.Component {
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
render() {
>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols
index 93d8535658..ccf2e68d4f 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols
@@ -14,17 +14,17 @@ interface PoisonedProp {
class Poisoned extends React.Component {
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
render() {
>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
@@ -48,16 +48,16 @@ let p = ;
class EmptyProp extends React.Component<{}, {}> {
>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
render() {
>render : Symbol(EmptyProp.render, Decl(file.tsx, 21, 49))
return Default hi
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
index be7018512f..26e67cf549 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
@@ -2,9 +2,11 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y:
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,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+ Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop1: boolean; }'.
-==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
+==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
import React = require('react');
interface PoisonedProp {
@@ -42,4 +44,7 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y:
prop1: false
}
// Ok
- let e = ;
\ No newline at end of file
+ let e = ;
+ ~~~~~~
+!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop1: boolean; }'.
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols
index 8a6e3fd317..66be8dc918 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols
@@ -13,17 +13,17 @@ type TextProps = { editable: false }
class TextComponent extends React.Component {
>TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
render() {
>render : Symbol(TextComponent.render, Decl(file.tsx, 5, 60))
return Some Text.. ;
->span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
->span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
+>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
}
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols
index 2dec493b88..77243fa9ac 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols
@@ -36,17 +36,17 @@ interface Prop {
class OverWriteAttr extends React.Component {
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
render() {
>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols
index f55b20dfe6..b2461c8d3f 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols
@@ -14,17 +14,17 @@ interface OptionProp {
class Opt extends React.Component {
>Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
render() {
>render : Symbol(Opt.render, Decl(file.tsx, 7, 51))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js
index 09eb20c755..95200b2487 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js
@@ -33,11 +33,11 @@ declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JS
// OK
const e1 =
-const e2 =
const e3 =
const e4 =
const e5 =
const e6 =
+const e2 =
@@ -60,9 +60,9 @@ define(["require", "exports", "react"], function (require, exports, React) {
var d5 = ;
// OK
var e1 = ;
- var e2 = ;
var e3 = ;
var e4 = ;
var e5 = ;
var e6 = ;
+ var e2 = ;
});
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols
index 809766f59d..6946c2b327 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols
@@ -6,24 +6,24 @@ declare function OneThing(k: {yxx: string}): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
>k : Symbol(k, Decl(file.tsx, 2, 26))
>yxx : Symbol(yxx, Decl(file.tsx, 2, 30))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OneThing(k: {yxx1: string, children: string}): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
>k : Symbol(k, Decl(file.tsx, 3, 26))
>yxx1 : Symbol(yxx1, Decl(file.tsx, 3, 30))
>children : Symbol(children, Decl(file.tsx, 3, 43))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
>l : Symbol(l, Decl(file.tsx, 4, 26))
>yy : Symbol(yy, Decl(file.tsx, 4, 30))
>yy1 : Symbol(yy1, Decl(file.tsx, 4, 41))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OneThing(l: {yy: number, yy1: string, yy2: boolean}): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
@@ -31,15 +31,15 @@ declare function OneThing(l: {yy: number, yy1: string, yy2: boolean}): JSX.Eleme
>yy : Symbol(yy, Decl(file.tsx, 5, 30))
>yy1 : Symbol(yy1, Decl(file.tsx, 5, 41))
>yy2 : Symbol(yy2, Decl(file.tsx, 5, 54))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OneThing(l1: {data: string, "data-prop": boolean}): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
>l1 : Symbol(l1, Decl(file.tsx, 6, 26))
>data : Symbol(data, Decl(file.tsx, 6, 31))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const c1 =
@@ -76,31 +76,31 @@ declare function TestingOneThing({y1: string}): JSX.Element;
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
>y1 : Symbol(y1)
>string : Symbol(string, Decl(file.tsx, 16, 34))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function TestingOneThing(j: {"extra-data": string, yy?: string}): JSX.Element;
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
>j : Symbol(j, Decl(file.tsx, 17, 33))
>yy : Symbol(yy, Decl(file.tsx, 17, 58))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Element;
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
>n : Symbol(n, Decl(file.tsx, 18, 33))
>yy : Symbol(yy, Decl(file.tsx, 18, 37))
>direction : Symbol(direction, Decl(file.tsx, 18, 48))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element;
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
>n : Symbol(n, Decl(file.tsx, 19, 33))
>yy : Symbol(yy, Decl(file.tsx, 19, 37))
>name : Symbol(name, Decl(file.tsx, 19, 48))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const d1 = ;
@@ -140,8 +140,8 @@ declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
>a : Symbol(a, Decl(file.tsx, 29, 33))
>y1 : Symbol(y1, Decl(file.tsx, 29, 37))
>y2 : Symbol(y2, Decl(file.tsx, 29, 49))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JSX.Element;
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
@@ -149,42 +149,44 @@ declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JS
>y1 : Symbol(y1, Decl(file.tsx, 30, 37))
>y2 : Symbol(y2, Decl(file.tsx, 30, 49))
>y3 : Symbol(y3, Decl(file.tsx, 30, 62))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const e1 =
>e1 : Symbol(e1, Decl(file.tsx, 33, 5))
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
-const e2 =
->e2 : Symbol(e2, Decl(file.tsx, 34, 5))
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
->extra-prop : Symbol(extra-prop, Decl(file.tsx, 34, 27))
-
const e3 =
->e3 : Symbol(e3, Decl(file.tsx, 35, 5))
+>e3 : Symbol(e3, Decl(file.tsx, 34, 5))
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
->y1 : Symbol(y1, Decl(file.tsx, 35, 27))
+>y1 : Symbol(y1, Decl(file.tsx, 34, 27))
const e4 =
->e4 : Symbol(e4, Decl(file.tsx, 36, 5))
+>e4 : Symbol(e4, Decl(file.tsx, 35, 5))
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
->y1 : Symbol(y1, Decl(file.tsx, 36, 27))
->y2 : Symbol(y2, Decl(file.tsx, 36, 38))
+>y1 : Symbol(y1, Decl(file.tsx, 35, 27))
+>y2 : Symbol(y2, Decl(file.tsx, 35, 38))
const e5 =
->e5 : Symbol(e5, Decl(file.tsx, 37, 5))
+>e5 : Symbol(e5, Decl(file.tsx, 36, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
+>y1 : Symbol(y1, Decl(file.tsx, 36, 27))
+>y3 : Symbol(y3, Decl(file.tsx, 36, 30))
+
+const e6 =
+>e6 : Symbol(e6, Decl(file.tsx, 37, 5))
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
>y1 : Symbol(y1, Decl(file.tsx, 37, 27))
>y3 : Symbol(y3, Decl(file.tsx, 37, 30))
+>y2 : Symbol(y2, Decl(file.tsx, 37, 33))
-const e6 =
->e6 : Symbol(e6, Decl(file.tsx, 38, 5))
+const e2 =
+>e2 : Symbol(e2, Decl(file.tsx, 38, 5))
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
>y1 : Symbol(y1, Decl(file.tsx, 38, 27))
>y3 : Symbol(y3, Decl(file.tsx, 38, 30))
->y2 : Symbol(y2, Decl(file.tsx, 38, 33))
+>extra-prop : Symbol(extra-prop, Decl(file.tsx, 38, 33))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types
index 8e288ebd34..4af53688d0 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types
@@ -171,12 +171,6 @@ const e1 =
> : JSX.Element
>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; }
-const e2 =
->e2 : JSX.Element
-> : JSX.Element
->TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; }
->extra-prop : true
-
const e3 =
>e3 : JSX.Element
> : JSX.Element
@@ -207,5 +201,13 @@ const e6 =
>y2 : number
>10 : 10
+const e2 =
+>e2 : JSX.Element
+> : JSX.Element
+>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; }
+>y1 : true
+>y3 : true
+>extra-prop : true
+
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols
index 25d17e8a64..ed61361841 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols
@@ -4,16 +4,16 @@ import React = require('react')
declare function OneThing(): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
>l : Symbol(l, Decl(file.tsx, 2, 26))
>yy : Symbol(yy, Decl(file.tsx, 2, 30))
>yy1 : Symbol(yy1, Decl(file.tsx, 2, 41))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
let obj = {
>obj : Symbol(obj, Decl(file.tsx, 4, 3))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols
index 6290039388..37d1ef3ce0 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols
@@ -7,8 +7,8 @@ interface Context {
}
declare function ZeroThingOrTwoThing(): JSX.Element;
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ZeroThingOrTwoThing(l: {yy: number, yy1: string}, context: Context): JSX.Element;
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
@@ -17,8 +17,8 @@ declare function ZeroThingOrTwoThing(l: {yy: number, yy1: string}, context: Cont
>yy1 : Symbol(yy1, Decl(file.tsx, 4, 52))
>context : Symbol(context, Decl(file.tsx, 4, 66))
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
let obj2: any;
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
@@ -55,15 +55,15 @@ declare function ThreeThing(l: {y1: string}): JSX.Element;
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>l : Symbol(l, Decl(file.tsx, 15, 28))
>y1 : Symbol(y1, Decl(file.tsx, 15, 32))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ThreeThing(l: {y2: string}): JSX.Element;
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>l : Symbol(l, Decl(file.tsx, 16, 28))
>y2 : Symbol(y2, Decl(file.tsx, 16, 32))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ThreeThing(l: {yy: number, yy1: string}, context: Context, updater: any): JSX.Element;
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
@@ -73,8 +73,8 @@ declare function ThreeThing(l: {yy: number, yy1: string}, context: Context, upda
>context : Symbol(context, Decl(file.tsx, 17, 57))
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
>updater : Symbol(updater, Decl(file.tsx, 17, 75))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const three1 = ;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols
index c644448497..cc3cb19930 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols
@@ -19,7 +19,7 @@ export interface ButtonProps extends ClickableProps {
onClick: React.MouseEventHandler;
>onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 7, 53))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->MouseEventHandler : Symbol(React.MouseEventHandler, Decl(react.d.ts, 388, 66))
+>MouseEventHandler : Symbol(React.MouseEventHandler, Decl(react.d.ts, 389, 66))
}
export interface LinkProps extends ClickableProps {
@@ -60,22 +60,22 @@ export function MainButton(buttonProps: ButtonProps): JSX.Element;
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
>buttonProps : Symbol(buttonProps, Decl(file.tsx, 28, 27))
>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
export function MainButton(linkProps: LinkProps): JSX.Element;
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
>linkProps : Symbol(linkProps, Decl(file.tsx, 29, 27))
>LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
export function MainButton(hyphenProps: HyphenProps): JSX.Element;
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
>hyphenProps : Symbol(hyphenProps, Decl(file.tsx, 30, 27))
>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
export function MainButton(props: ButtonProps | LinkProps | HyphenProps): JSX.Element {
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
@@ -83,8 +83,8 @@ export function MainButton(props: ButtonProps | LinkProps | HyphenProps): JSX.El
>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
>LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
const linkProps = props as LinkProps;
>linkProps : Symbol(linkProps, Decl(file.tsx, 32, 9))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols
index 3cc5e4b300..f1973b1cc0 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols
@@ -17,8 +17,8 @@ function MyComponent(attr: T) {
>T : Symbol(T, Decl(file.tsx, 6, 21))
return attr.values
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// OK
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
index 243f29493b..38fe85a087 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
@@ -5,16 +5,21 @@ tests/cases/conformance/jsx/file.tsx(27,15): error TS2322: Type '{ name: 42; }'
Type '{ name: 42; }' is not assignable to type '{ name?: string; }'.
Types of property 'name' are incompatible.
Type '42' is not assignable to type 'string'.
-tests/cases/conformance/jsx/file.tsx(29,15): error TS2339: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
+tests/cases/conformance/jsx/file.tsx(29,15): error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
+ Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ naaaaaaame: "no"; }'.
tests/cases/conformance/jsx/file.tsx(34,23): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { "prop-name": string; }'.
Type '{}' is not assignable to type '{ "prop-name": string; }'.
Property '"prop-name"' is missing in type '{}'.
-tests/cases/conformance/jsx/file.tsx(37,23): error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
-tests/cases/conformance/jsx/file.tsx(38,24): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes'.
+tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
+ Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: true; }'.
+tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
+ Weak type 'IntrinsicAttributes' has no properties in common with '{ ref: (x: any) => any; }'.
tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
+tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
+ Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: boolean; }'.
-==== tests/cases/conformance/jsx/file.tsx (7 errors) ====
+==== tests/cases/conformance/jsx/file.tsx (8 errors) ====
function EmptyPropSFC() {
return Default Greeting
;
}
@@ -54,7 +59,8 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
// Error
let f = ;
~~~~~~~~~~~~~~~
-!!! error TS2339: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
+!!! error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ naaaaaaame: "no"; }'.
// OK
let g = ;
@@ -68,10 +74,12 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
// Error
let i =
~~~~~
-!!! error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
+!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
+!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: true; }'.
let i1 = x.greeting.substr(10)} />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-!!! error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes'.
+!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
+!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ ref: (x: any) => any; }'.
let o = {
prop1: true;
@@ -81,6 +89,9 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
// OK as access properties are allow when spread
let i2 =
+ ~~~~~~
+!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
+!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: boolean; }'.
let o1: any;
// OK
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt
index 00e2c4a526..b0c2600532 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt
@@ -1,4 +1,5 @@
-tests/cases/conformance/jsx/file.tsx(19,16): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
+tests/cases/conformance/jsx/file.tsx(19,16): error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
+ Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ ref: "myRef"; }'.
tests/cases/conformance/jsx/file.tsx(25,42): error TS2339: Property 'subtr' does not exist on type 'string'.
tests/cases/conformance/jsx/file.tsx(27,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'.
tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'.
@@ -25,7 +26,8 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot
// Error - not allowed to specify 'ref' on SFCs
let c = ;
~~~~~~~~~~~
-!!! error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
+!!! error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ ref: "myRef"; }'.
// OK - ref is valid for classes
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols
index a18da7954b..a2809f1845 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols
@@ -5,7 +5,7 @@ import React = require('react');
const Foo = (props: any) =>
;
>Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
>props : Symbol(props, Decl(file.tsx, 2, 13))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
// Should be OK
const foo = ;
@@ -17,31 +17,31 @@ const foo = ;
var MainMenu: React.StatelessComponent<{}> = (props) => (
>MainMenu : Symbol(MainMenu, Decl(file.tsx, 8, 3))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
+>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
>props : Symbol(props, Decl(file.tsx, 8, 46))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
Main Menu
->h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2411, 48))
->h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2411, 48))
+>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2412, 48))
+>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2412, 48))
);
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
var App: React.StatelessComponent<{ children }> = ({children}) => (
>App : Symbol(App, Decl(file.tsx, 12, 3))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
+>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
>children : Symbol(children, Decl(file.tsx, 12, 35))
>children : Symbol(children, Decl(file.tsx, 12, 52))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>MainMenu : Symbol(MainMenu, Decl(file.tsx, 8, 3))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
);
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols
index 0e972a36c4..5070ccaf5c 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols
@@ -11,8 +11,8 @@ declare function ComponentWithTwoAttributes(l: {key1: K, value: V}): JSX.El
>K : Symbol(K, Decl(file.tsx, 2, 44))
>value : Symbol(value, Decl(file.tsx, 2, 61))
>V : Symbol(V, Decl(file.tsx, 2, 46))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
function Baz(key1: T, value: U) {
@@ -48,8 +48,8 @@ declare function Link(l: {func: (arg: U)=>void}): JSX.Element;
>func : Symbol(func, Decl(file.tsx, 10, 29))
>arg : Symbol(arg, Decl(file.tsx, 10, 36))
>U : Symbol(U, Decl(file.tsx, 10, 22))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
function createLink(func: (a: number)=>void) {
@@ -97,8 +97,8 @@ declare function InferParamComponent(attr: InferParamProp): JSX.Element;
>attr : Symbol(attr, Decl(file.tsx, 26, 40))
>InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 19, 1))
>T : Symbol(T, Decl(file.tsx, 26, 37))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
let i = { }} />;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols
index e93eb374aa..b0823c19d6 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols
@@ -5,8 +5,8 @@ import React = require('react')
declare function OverloadComponent(): JSX.Element;
>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
>U : Symbol(U, Decl(file.tsx, 2, 35))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OverloadComponent(attr: {b: U, a?: string, "ignore-prop": boolean}): JSX.Element;
>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
@@ -15,8 +15,8 @@ declare function OverloadComponent(attr: {b: U, a?: string, "ignore-prop": bo
>b : Symbol(b, Decl(file.tsx, 3, 45))
>U : Symbol(U, Decl(file.tsx, 3, 35))
>a : Symbol(a, Decl(file.tsx, 3, 50))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function OverloadComponent(attr: {b: U, a: T}): JSX.Element;
>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
@@ -27,8 +27,8 @@ declare function OverloadComponent(attr: {b: U, a: T}): JSX.Element;
>U : Symbol(U, Decl(file.tsx, 4, 37))
>a : Symbol(a, Decl(file.tsx, 4, 53))
>T : Symbol(T, Decl(file.tsx, 4, 35))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
function Baz(arg1: T, arg2: U) {
@@ -93,8 +93,8 @@ declare function Link(l: {func: (arg: U)=>void}): JSX.Element;
>func : Symbol(func, Decl(file.tsx, 17, 29))
>arg : Symbol(arg, Decl(file.tsx, 17, 36))
>U : Symbol(U, Decl(file.tsx, 17, 22))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function Link(l: {func: (arg1:U, arg2: string)=>void}): JSX.Element;
>Link : Symbol(Link, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 65))
@@ -104,8 +104,8 @@ declare function Link(l: {func: (arg1:U, arg2: string)=>void}): JSX.Element;
>arg1 : Symbol(arg1, Decl(file.tsx, 18, 36))
>U : Symbol(U, Decl(file.tsx, 18, 22))
>arg2 : Symbol(arg2, Decl(file.tsx, 18, 43))
->JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
->Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
+>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
+>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
function createLink(func: (a: number)=>void) {
>createLink : Symbol(createLink, Decl(file.tsx, 18, 79))
diff --git a/tests/baselines/reference/tsxUnionElementType1.symbols b/tests/baselines/reference/tsxUnionElementType1.symbols
index 728e559ee6..8a53907ea6 100644
--- a/tests/baselines/reference/tsxUnionElementType1.symbols
+++ b/tests/baselines/reference/tsxUnionElementType1.symbols
@@ -8,8 +8,8 @@ function SFC1(prop: { x: number }) {
>x : Symbol(x, Decl(file.tsx, 2, 21))
return hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
};
@@ -19,8 +19,8 @@ function SFC2(prop: { x: boolean }) {
>x : Symbol(x, Decl(file.tsx, 6, 21))
return World ;
->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
+>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
+>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
}
var SFCComp = SFC1 || SFC2;
diff --git a/tests/baselines/reference/tsxUnionElementType3.symbols b/tests/baselines/reference/tsxUnionElementType3.symbols
index 05fe89a77e..875294d6f6 100644
--- a/tests/baselines/reference/tsxUnionElementType3.symbols
+++ b/tests/baselines/reference/tsxUnionElementType3.symbols
@@ -4,9 +4,9 @@ import React = require('react');
class RC1 extends React.Component<{x : number}, {}> {
>RC1 : Symbol(RC1, Decl(file.tsx, 0, 32))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>x : Symbol(x, Decl(file.tsx, 2, 35))
render() {
@@ -18,9 +18,9 @@ class RC1 extends React.Component<{x : number}, {}> {
class RC2 extends React.Component<{ x: string }, {}> {
>RC2 : Symbol(RC2, Decl(file.tsx, 6, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>x : Symbol(x, Decl(file.tsx, 8, 35))
render() {
@@ -34,9 +34,9 @@ class RC2 extends React.Component<{ x: string }, {}> {
class RC3 extends React.Component<{}, {}> {
>RC3 : Symbol(RC3, Decl(file.tsx, 13, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
render() {
>render : Symbol(RC3.render, Decl(file.tsx, 15, 43))
@@ -47,9 +47,9 @@ class RC3 extends React.Component<{}, {}> {
class RC4 extends React.Component<{}, {}> {
>RC4 : Symbol(RC4, Decl(file.tsx, 19, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
render() {
>render : Symbol(RC4.render, Decl(file.tsx, 21, 43))
diff --git a/tests/baselines/reference/tsxUnionElementType4.errors.txt b/tests/baselines/reference/tsxUnionElementType4.errors.txt
index 4658b566cc..dc86c84735 100644
--- a/tests/baselines/reference/tsxUnionElementType4.errors.txt
+++ b/tests/baselines/reference/tsxUnionElementType4.errors.txt
@@ -3,8 +3,10 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type '{ x: true; }' i
Type '{ x: true; }' is not assignable to type '{ x: string; }'.
Types of property 'x' are incompatible.
Type 'true' is not assignable to type 'string'.
-tests/cases/conformance/jsx/file.tsx(33,21): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
-tests/cases/conformance/jsx/file.tsx(34,22): error TS2339: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+ Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ x: 10; }'.
+tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+ Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop: true; }'.
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
@@ -48,8 +50,10 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2339: Property 'prop' does
!!! error TS2322: Type 'true' is not assignable to type 'string'.
let b =
~~~~~~
-!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ x: 10; }'.
let c = ;
~~~~
-!!! error TS2339: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop: true; }'.
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxUnionElementType5.symbols b/tests/baselines/reference/tsxUnionElementType5.symbols
index 9a5e94f69a..2ac4800ac5 100644
--- a/tests/baselines/reference/tsxUnionElementType5.symbols
+++ b/tests/baselines/reference/tsxUnionElementType5.symbols
@@ -6,16 +6,16 @@ function EmptySFC1() {
>EmptySFC1 : Symbol(EmptySFC1, Decl(file.tsx, 0, 32))
return hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
function EmptySFC2() {
>EmptySFC2 : Symbol(EmptySFC2, Decl(file.tsx, 4, 1))
return Hello
;
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
+>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
function SFC2(prop: { x: boolean }) {
@@ -24,8 +24,8 @@ function SFC2(prop: { x: boolean }) {
>x : Symbol(x, Decl(file.tsx, 10, 21))
return World ;
->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
+>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
+>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
}
var EmptySFCComp = EmptySFC1 || EmptySFC2;
diff --git a/tests/baselines/reference/tsxUnionElementType6.errors.txt b/tests/baselines/reference/tsxUnionElementType6.errors.txt
index cac96565b8..98929a838f 100644
--- a/tests/baselines/reference/tsxUnionElementType6.errors.txt
+++ b/tests/baselines/reference/tsxUnionElementType6.errors.txt
@@ -1,4 +1,5 @@
-tests/cases/conformance/jsx/file.tsx(18,23): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes'.
+tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
+ Weak type 'IntrinsicAttributes' has no properties in common with '{ x: true; }'.
tests/cases/conformance/jsx/file.tsx(19,27): error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
Type '{ x: "hi"; }' is not assignable to type '{ x: boolean; }'.
Types of property 'x' are incompatible.
@@ -31,7 +32,8 @@ tests/cases/conformance/jsx/file.tsx(21,27): error TS2322: Type '{}' is not assi
// Error
let a = ;
~
-!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes'.
+!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
+!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ x: true; }'.
let b = ;
~~~~~~
!!! error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.symbols b/tests/baselines/reference/tsxUnionTypeComponent1.symbols
index 4af712bf3f..9a8219e123 100644
--- a/tests/baselines/reference/tsxUnionTypeComponent1.symbols
+++ b/tests/baselines/reference/tsxUnionTypeComponent1.symbols
@@ -8,16 +8,16 @@ interface ComponentProps {
AnyComponent: React.StatelessComponent | React.ComponentClass;
>AnyComponent : Symbol(ComponentProps.AnyComponent, Decl(file.tsx, 2, 26))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
+>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 204, 5))
+>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 205, 5))
}
class MyComponent extends React.Component {
>MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
render() {
@@ -25,9 +25,9 @@ class MyComponent extends React.Component {
const { AnyComponent } = this.props;
>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 8, 15))
->this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
+>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
>this : Symbol(MyComponent, Decl(file.tsx, 4, 1))
->props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
+>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
return ( );
>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 8, 15))
@@ -38,15 +38,15 @@ class MyComponent extends React.Component {
test }/>
>MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 14, 12))
->button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
->button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
+>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
+>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
// Component Class as Props
class MyButtonComponent extends React.Component<{},{}> {
>MyButtonComponent : Symbol(MyButtonComponent, Decl(file.tsx, 14, 57))
->React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
->Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
+>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
}