(
//// [jsxExcessPropsAndAssignability.js]
"use strict";
-///
+///
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js
index 29e499dbf98ea..4b9862f13fa12 100644
--- a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=preserve).js
@@ -10,8 +10,8 @@ return <>
}
//// [jsxFragReactReferenceErrors.jsx]
-///
-///
+///
+///
export function Component() {
return <>
>;
diff --git a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js
index 9ccb21875c4e4..dde6a23cde9b2 100644
--- a/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js
+++ b/tests/baselines/reference/jsxFragReactReferenceErrors(jsx=react-native).js
@@ -10,8 +10,8 @@ return <>
}
//// [jsxFragReactReferenceErrors.js]
-///
-///
+///
+///
export function Component() {
return <>
>;
diff --git a/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.js b/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.js
index a924ced342d7b..2d15aa2d80f5e 100644
--- a/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.js
+++ b/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.js
@@ -20,7 +20,7 @@ export function Counter({ count = 0 }: CounterProps) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Counter = Counter;
-///
+///
var react_1 = require("react");
function Counter(_a) {
var _b = _a.count, count = _b === void 0 ? 0 : _b;
diff --git a/tests/baselines/reference/jsxFragmentWrongType.js b/tests/baselines/reference/jsxFragmentWrongType.js
index 1ae32537896e1..4047503e145b5 100644
--- a/tests/baselines/reference/jsxFragmentWrongType.js
+++ b/tests/baselines/reference/jsxFragmentWrongType.js
@@ -12,8 +12,8 @@ const jsxWithReactFragment = {test} ;
//// [a.js]
"use strict";
-///
-///
+///
+///
const test = () => "asd";
const jsxWithJsxFragment = React.createElement(React.Fragment, null, test);
const jsxWithReactFragment = React.createElement(React.Fragment, null, test);
diff --git a/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.js b/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.js
index 7a3cb23a80a42..06246bcf4330e 100644
--- a/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.js
+++ b/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.js
@@ -45,7 +45,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = __importStar(require("react"));
require("./App.css"); // doesn't actually exist
var tag = React.createElement("div", null);
diff --git a/tests/baselines/reference/jsxIntrinsicElementsCompatability.js b/tests/baselines/reference/jsxIntrinsicElementsCompatability.js
index 42d7bba5817a6..bfef3e2319820 100644
--- a/tests/baselines/reference/jsxIntrinsicElementsCompatability.js
+++ b/tests/baselines/reference/jsxIntrinsicElementsCompatability.js
@@ -48,7 +48,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = __importStar(require("react"));
function SomeComponent(props) {
// Just so the return value is RectElement, the rendered element doesnt matter
diff --git a/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.js b/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.js
index d9aa42c0d725e..94e8f888bc77b 100644
--- a/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.js
+++ b/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.js
@@ -67,7 +67,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = __importStar(require("react"));
// opening + closing
var a = React.createElement("div", null); // empty type args
diff --git a/tests/baselines/reference/jsxIntrinsicUnions.js b/tests/baselines/reference/jsxIntrinsicUnions.js
index 4c25bbb44902e..3c45fc199acd6 100644
--- a/tests/baselines/reference/jsxIntrinsicUnions.js
+++ b/tests/baselines/reference/jsxIntrinsicUnions.js
@@ -12,7 +12,7 @@ const tag = {"Title"} ;
//// [jsxIntrinsicUnions.js]
"use strict";
-///
+///
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
diff --git a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js
index 195ca5b5746f4..fb1fda0ae4e86 100644
--- a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js
+++ b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.js
@@ -28,7 +28,7 @@ const d = ; // Technically OK, but probably
//// [jsxIssuesErrorWhenTagExpectsTooManyArguments.js]
"use strict";
-///
+///
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).js
index 87b4ca1caf85a..a81f427c6c390 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).js
@@ -11,5 +11,5 @@ export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
var a = (0, jsx_runtime_1.jsx)("div", { children: "text" });
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).js
index 6b7527be6f216..9c1142c829c6e 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).js
@@ -12,5 +12,5 @@ export {};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "jsxJsxsCjsTransformChildren.tsx";
-///
+///
var a = (0, jsx_dev_runtime_1.jsxDEV)("div", { children: "text" }, void 0, false, { fileName: _jsxFileName, lineNumber: 2, columnNumber: 10 }, this);
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).js
index 4f8b504854d7a..b141720f7cab2 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).js
@@ -14,5 +14,5 @@ export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("preact/jsx-runtime");
-///
+///
var a = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", {}), "text", (0, jsx_runtime_1.jsx)("div", { className: "foo" })] });
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).js
index 026bf9ff40343..2b6a98cf136e7 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).js
@@ -15,5 +15,5 @@ export {};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_dev_runtime_1 = require("preact/jsx-dev-runtime");
var _jsxFileName = "jsxJsxsCjsTransformCustomImport.tsx";
-///
+///
var a = (0, jsx_dev_runtime_1.jsxDEV)(jsx_dev_runtime_1.Fragment, { children: [(0, jsx_dev_runtime_1.jsxDEV)("p", {}, void 0, false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 3 }, this), "text", (0, jsx_dev_runtime_1.jsxDEV)("div", { className: "foo" }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 3 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 2, columnNumber: 10 }, this);
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).js
index a30cfa0d547c0..af6a112701fb4 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).js
@@ -26,14 +26,14 @@ export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("preact/jsx-runtime");
-///
+///
/* @jsxImportSource preact */
var a = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", {}), "text", (0, jsx_runtime_1.jsx)("div", { className: "foo" })] });
//// [react.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
/* @jsxImportSource react */
require("./preact");
var a = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", {}), "text", (0, jsx_runtime_1.jsx)("div", { className: "foo" })] });
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).js
index 7db430ee8e58a..b373eae7fce93 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).js
@@ -26,8 +26,8 @@ export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_dev_runtime_1 = require("preact/jsx-dev-runtime");
-var _jsxFileName = "preact.tsx";
-///
+var _jsxFileName = "/.src/preact.tsx";
+///
/* @jsxImportSource preact */
var a = (0, jsx_dev_runtime_1.jsxDEV)(jsx_dev_runtime_1.Fragment, { children: [(0, jsx_dev_runtime_1.jsxDEV)("p", {}, void 0, false, { fileName: _jsxFileName, lineNumber: 4, columnNumber: 3 }, this), "text", (0, jsx_dev_runtime_1.jsxDEV)("div", { className: "foo" }, void 0, false, { fileName: _jsxFileName, lineNumber: 6, columnNumber: 3 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
//// [react.js]
@@ -35,7 +35,7 @@ var a = (0, jsx_dev_runtime_1.jsxDEV)(jsx_dev_runtime_1.Fragment, { children: [(
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "react.tsx";
-///
+///
/* @jsxImportSource react */
require("./preact");
var a = (0, jsx_dev_runtime_1.jsxDEV)(jsx_dev_runtime_1.Fragment, { children: [(0, jsx_dev_runtime_1.jsxDEV)("p", {}, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 3 }, this), "text", (0, jsx_dev_runtime_1.jsxDEV)("div", { className: "foo" }, void 0, false, { fileName: _jsxFileName, lineNumber: 7, columnNumber: 3 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 4, columnNumber: 10 }, this);
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).js
index 1a26bcf92bf90..8edda8fd9a63a 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).js
@@ -25,7 +25,7 @@ var __assign = (this && this.__assign) || function () {
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
var props = { answer: 42 };
var a = (0, jsx_runtime_1.jsx)("div", __assign({}, props, { children: "text" }), "foo");
var b = (0, react_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).js
index 91eca31420e94..fd6d5cfc85264 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).js
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "jsxJsxsCjsTransformKeyProp.tsx";
-///
+///
var props = { answer: 42 };
var a = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
var b = (0, react_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).js
index b541a5fd7c4e6..98a94f003a37a 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).js
@@ -25,7 +25,7 @@ var __assign = (this && this.__assign) || function () {
Object.defineProperty(exports, "__esModule", { value: true });
var preact_1 = require("preact");
var jsx_runtime_1 = require("preact/jsx-runtime");
-///
+///
var props = { answer: 42 };
var a = (0, jsx_runtime_1.jsx)("div", __assign({}, props, { children: "text" }), "foo");
var b = (0, preact_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).js
index aebf6bc35e98c..ff1fa475b3876 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).js
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var preact_1 = require("preact");
var jsx_dev_runtime_1 = require("preact/jsx-dev-runtime");
var _jsxFileName = "jsxJsxsCjsTransformKeyPropCustomImport.tsx";
-///
+///
var props = { answer: 42 };
var a = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
var b = (0, preact_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).js
index 8d70495e99aa8..f79616363e44f 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).js
@@ -36,7 +36,7 @@ var __assign = (this && this.__assign) || function () {
Object.defineProperty(exports, "__esModule", { value: true });
var preact_1 = require("preact");
var jsx_runtime_1 = require("preact/jsx-runtime");
-///
+///
/* @jsxImportSource preact */
var props = { answer: 42 };
var a = (0, jsx_runtime_1.jsx)("div", __assign({}, props, { children: "text" }), "foo");
@@ -57,7 +57,7 @@ var __assign = (this && this.__assign) || function () {
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
/* @jsxImportSource react */
require("./preact");
var props2 = { answer: 42 };
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).js
index fa7e3fcc2624b..d7eb6ab57bc7e 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).js
@@ -36,8 +36,8 @@ var __assign = (this && this.__assign) || function () {
Object.defineProperty(exports, "__esModule", { value: true });
var preact_1 = require("preact");
var jsx_dev_runtime_1 = require("preact/jsx-dev-runtime");
-var _jsxFileName = "preact.tsx";
-///
+var _jsxFileName = "/.src/preact.tsx";
+///
/* @jsxImportSource preact */
var props = { answer: 42 };
var a = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 4, columnNumber: 10 }, this);
@@ -59,7 +59,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "react.tsx";
-///
+///
/* @jsxImportSource react */
require("./preact");
var props2 = { answer: 42 };
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).js
index 89de2ac2aee33..55f8bef270f0b 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).js
@@ -10,5 +10,5 @@ export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
var a = (0, jsx_runtime_1.jsx)("div", {});
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).js
index f759f5d185230..df7072e91ac96 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).js
@@ -11,5 +11,5 @@ export {};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "jsxJsxsCjsTransformSubstitutesNames.tsx";
-///
+///
var a = (0, jsx_dev_runtime_1.jsxDEV)("div", {}, void 0, false, { fileName: _jsxFileName, lineNumber: 2, columnNumber: 10 }, this);
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).js b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).js
index c20a3be31edba..41411f34cdda6 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).js
@@ -14,5 +14,5 @@ export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
var a = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", {}), "text", (0, jsx_runtime_1.jsx)("div", {})] });
diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).js b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).js
index 2d7673469591a..c11a5de4af6db 100644
--- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).js
@@ -15,5 +15,5 @@ export {};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "jsxJsxsCjsTransformSubstitutesNamesFragment.tsx";
-///
+///
var a = (0, jsx_dev_runtime_1.jsxDEV)(jsx_dev_runtime_1.Fragment, { children: [(0, jsx_dev_runtime_1.jsxDEV)("p", {}, void 0, false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 3 }, this), "text", (0, jsx_dev_runtime_1.jsxDEV)("div", {}, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 3 }, this)] }, void 0, true, { fileName: _jsxFileName, lineNumber: 2, columnNumber: 10 }, this);
diff --git a/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.js b/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.js
index 5a20394746ee2..e4fdd3bd7ec77 100644
--- a/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.js
+++ b/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.js
@@ -14,5 +14,5 @@ export const tag =
//// [jsxNamespacedNameNotComparedToNonMatchingIndexSignature.js]
import { jsx as _jsx } from "react/jsx-runtime";
-///
+///
export const tag = _jsx("div", { "ns:thing": "a" });
diff --git a/tests/baselines/reference/jsxPartialSpread.js b/tests/baselines/reference/jsxPartialSpread.js
index 1a4b1c080de8f..192c2b548aac7 100644
--- a/tests/baselines/reference/jsxPartialSpread.js
+++ b/tests/baselines/reference/jsxPartialSpread.js
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Repro = Repro;
-///
+///
var Select = function (p) { return
; };
var react_1 = __importDefault(require("react"));
function Repro(_a) {
diff --git a/tests/baselines/reference/jsxRuntimePragma(jsx=preserve).js b/tests/baselines/reference/jsxRuntimePragma(jsx=preserve).js
index b91b48357abdd..f698429ed0e44 100644
--- a/tests/baselines/reference/jsxRuntimePragma(jsx=preserve).js
+++ b/tests/baselines/reference/jsxRuntimePragma(jsx=preserve).js
@@ -71,7 +71,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime classic */
var React = __importStar(require("react"));
var HelloWorld = function () { return Hello world ; };
@@ -82,7 +82,7 @@ exports.selfClosing = ;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime automatic */
var HelloWorld = function () { return Hello world ; };
exports.HelloWorld = HelloWorld;
@@ -92,7 +92,7 @@ exports.selfClosing = ;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime classic */
/* @jsxRuntime automatic */
var HelloWorld = function () { return Hello world ; };
@@ -136,7 +136,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime automatic */
/* @jsxRuntime classic */
var React = __importStar(require("react"));
diff --git a/tests/baselines/reference/jsxRuntimePragma(jsx=react).js b/tests/baselines/reference/jsxRuntimePragma(jsx=react).js
index ca060d3ae8507..945701342891e 100644
--- a/tests/baselines/reference/jsxRuntimePragma(jsx=react).js
+++ b/tests/baselines/reference/jsxRuntimePragma(jsx=react).js
@@ -71,7 +71,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime classic */
var React = __importStar(require("react"));
var HelloWorld = function () { return React.createElement("h1", null, "Hello world"); };
@@ -84,7 +84,7 @@ exports.selfClosing = React.createElement("img", { src: "./image.png" });
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
/* @jsxRuntime automatic */
var HelloWorld = function () { return (0, jsx_runtime_1.jsx)("h1", { children: "Hello world" }); };
exports.HelloWorld = HelloWorld;
@@ -95,7 +95,7 @@ exports.selfClosing = (0, jsx_runtime_1.jsx)("img", { src: "./image.png" });
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
/* @jsxRuntime classic */
/* @jsxRuntime automatic */
var HelloWorld = function () { return (0, jsx_runtime_1.jsx)("h1", { children: "Hello world" }); };
@@ -139,7 +139,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime automatic */
/* @jsxRuntime classic */
var React = __importStar(require("react"));
diff --git a/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsx).js b/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsx).js
index ca060d3ae8507..945701342891e 100644
--- a/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsx).js
+++ b/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsx).js
@@ -71,7 +71,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime classic */
var React = __importStar(require("react"));
var HelloWorld = function () { return React.createElement("h1", null, "Hello world"); };
@@ -84,7 +84,7 @@ exports.selfClosing = React.createElement("img", { src: "./image.png" });
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
/* @jsxRuntime automatic */
var HelloWorld = function () { return (0, jsx_runtime_1.jsx)("h1", { children: "Hello world" }); };
exports.HelloWorld = HelloWorld;
@@ -95,7 +95,7 @@ exports.selfClosing = (0, jsx_runtime_1.jsx)("img", { src: "./image.png" });
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
-///
+///
/* @jsxRuntime classic */
/* @jsxRuntime automatic */
var HelloWorld = function () { return (0, jsx_runtime_1.jsx)("h1", { children: "Hello world" }); };
@@ -139,7 +139,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime automatic */
/* @jsxRuntime classic */
var React = __importStar(require("react"));
diff --git a/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsxdev).js b/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsxdev).js
index 71f270ca594a6..7a4708a681903 100644
--- a/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/jsxRuntimePragma(jsx=react-jsxdev).js
@@ -71,7 +71,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime classic */
var React = __importStar(require("react"));
var HelloWorld = function () { return React.createElement("h1", null, "Hello world"); };
@@ -86,7 +86,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "two.tsx";
-///
+///
/* @jsxRuntime automatic */
var HelloWorld = function () { return (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: "Hello world" }, void 0, false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 32 }, _this); };
exports.HelloWorld = HelloWorld;
@@ -99,7 +99,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
var jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
var _jsxFileName = "three.tsx";
-///
+///
/* @jsxRuntime classic */
/* @jsxRuntime automatic */
var HelloWorld = function () { return (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: "Hello world" }, void 0, false, { fileName: _jsxFileName, lineNumber: 4, columnNumber: 32 }, _this); };
@@ -143,7 +143,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.selfClosing = exports.frag = exports.HelloWorld = void 0;
-///
+///
/* @jsxRuntime automatic */
/* @jsxRuntime classic */
var React = __importStar(require("react"));
diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js
index 512cfe440f660..20bc1ce09f44c 100644
--- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js
+++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js
@@ -72,7 +72,7 @@ const Test5 = () => ;
//// [reactDefaultPropsInferenceSuccess.js]
"use strict";
-///
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/reactHOCSpreadprops.js b/tests/baselines/reference/reactHOCSpreadprops.js
index 7e367e95205c2..b0e0236013e47 100644
--- a/tests/baselines/reference/reactHOCSpreadprops.js
+++ b/tests/baselines/reference/reactHOCSpreadprops.js
@@ -41,7 +41,7 @@ var __assign = (this && this.__assign) || function () {
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = require("react");
function f(App) {
var C = /** @class */ (function (_super) {
diff --git a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.js b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.js
index 1263b13d2bdf7..020ad83b5e2bb 100644
--- a/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.js
+++ b/tests/baselines/reference/reactReadonlyHOCAssignabilityReal.js
@@ -74,7 +74,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = __importStar(require("react"));
function myHigherOrderComponent(Inner) {
return /** @class */ (function (_super) {
diff --git a/tests/baselines/reference/reactSFCAndFunctionResolvable.js b/tests/baselines/reference/reactSFCAndFunctionResolvable.js
index f94bcb741c506..3b52968e6ed2e 100644
--- a/tests/baselines/reference/reactSFCAndFunctionResolvable.js
+++ b/tests/baselines/reference/reactSFCAndFunctionResolvable.js
@@ -29,7 +29,7 @@ const RandomComponent: React.SFC = () => {
//// [reactSFCAndFunctionResolvable.js]
"use strict";
-///
+///
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
diff --git a/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM.js b/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM.js
index 2a4d1956ef323..ef3bbc535082c 100644
--- a/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM.js
+++ b/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM.js
@@ -15,7 +15,7 @@ const children: any[] = [];
//// [reactTagNameComponentWithPropsNoOOM.js]
"use strict";
-///
+///
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
diff --git a/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM2.js b/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM2.js
index 02ed32721483c..b2cec05cc687b 100644
--- a/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM2.js
+++ b/tests/baselines/reference/reactTagNameComponentWithPropsNoOOM2.js
@@ -15,7 +15,7 @@ const children: any[] = [];
//// [reactTagNameComponentWithPropsNoOOM2.js]
"use strict";
-///
+///
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
diff --git a/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.js b/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.js
index 2abf6e9510631..913679a2957ee 100644
--- a/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.js
+++ b/tests/baselines/reference/returnTypePredicateIsInstantiateInContextOfTarget.js
@@ -67,7 +67,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = __importStar(require("react"));
var TestComponent = /** @class */ (function (_super) {
__extends(TestComponent, _super);
diff --git a/tests/baselines/reference/spellingSuggestionJSXAttribute.js b/tests/baselines/reference/spellingSuggestionJSXAttribute.js
index 2fcc65228a5b2..08d7f2d093aa9 100644
--- a/tests/baselines/reference/spellingSuggestionJSXAttribute.js
+++ b/tests/baselines/reference/spellingSuggestionJSXAttribute.js
@@ -69,7 +69,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var React = __importStar(require("react"));
function MyComp2(props) {
return null;
diff --git a/tests/baselines/reference/tsxInvokeComponentType.js b/tests/baselines/reference/tsxInvokeComponentType.js
index b83c7cb8e8260..cefe2fd7db332 100644
--- a/tests/baselines/reference/tsxInvokeComponentType.js
+++ b/tests/baselines/reference/tsxInvokeComponentType.js
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var react_1 = __importDefault(require("react"));
var bad = react_1.default.createElement(Elem, null);
var good = react_1.default.createElement(Elem, { someKey: "ok" });
diff --git a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.js b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.js
index b9e146103b770..219180544e7fd 100644
--- a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.js
+++ b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.js
@@ -23,7 +23,7 @@ function test(wrappedProps: P) {
//// [tsxNotUsingApparentTypeOfSFC.js]
"use strict";
-///
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxReactEmit8(jsx=react-jsx).js b/tests/baselines/reference/tsxReactEmit8(jsx=react-jsx).js
index 3fe1ea7733596..7fc951fb41dee 100644
--- a/tests/baselines/reference/tsxReactEmit8(jsx=react-jsx).js
+++ b/tests/baselines/reference/tsxReactEmit8(jsx=react-jsx).js
@@ -9,6 +9,6 @@
//// [tsxReactEmit8.js]
import { jsx as _jsx } from "react/jsx-runtime";
-///
+///
_jsx("div", { children: "1" });
_jsx("div", { children: "2" }, "key-attr");
diff --git a/tests/baselines/reference/tsxReactEmit8(jsx=react-jsxdev).js b/tests/baselines/reference/tsxReactEmit8(jsx=react-jsxdev).js
index 80091e84285a0..8219d0eb1ccd9 100644
--- a/tests/baselines/reference/tsxReactEmit8(jsx=react-jsxdev).js
+++ b/tests/baselines/reference/tsxReactEmit8(jsx=react-jsxdev).js
@@ -10,6 +10,6 @@
//// [tsxReactEmit8.js]
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
const _jsxFileName = "tsxReactEmit8.tsx";
-///
+///
_jsxDEV("div", { children: "1" }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 1 }, this);
_jsxDEV("div", { children: "2" }, "key-attr", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 14 }, this);
diff --git a/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2015).js b/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2015).js
index 7fd95bd3d0729..5c2ac43497c2d 100644
--- a/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2015).js
+++ b/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2015).js
@@ -56,7 +56,7 @@ export function T12(a: any, b: any, c: any, d: any) {
//// [test.js]
import { jsx as _jsx } from "react/jsx-runtime";
-///
+///
export function T1(a) {
return _jsx("div", Object.assign({ className: "T1" }, a, { children: "T1" }));
}
diff --git a/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2018).js b/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2018).js
index 87162bbccc6e6..ec251f3b9062f 100644
--- a/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2018).js
+++ b/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=es2018).js
@@ -56,7 +56,7 @@ export function T12(a: any, b: any, c: any, d: any) {
//// [test.js]
import { jsx as _jsx } from "react/jsx-runtime";
-///
+///
export function T1(a) {
return _jsx("div", { className: "T1", ...a, children: "T1" });
}
diff --git a/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=esnext).js b/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=esnext).js
index 87162bbccc6e6..ec251f3b9062f 100644
--- a/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=esnext).js
+++ b/tests/baselines/reference/tsxReactEmitSpreadAttribute(target=esnext).js
@@ -56,7 +56,7 @@ export function T12(a: any, b: any, c: any, d: any) {
//// [test.js]
import { jsx as _jsx } from "react/jsx-runtime";
-///
+///
export function T1(a) {
return _jsx("div", { className: "T1", ...a, children: "T1" });
}
diff --git a/tests/baselines/reference/tsxReactPropsInferenceSucceedsOnIntersections.js b/tests/baselines/reference/tsxReactPropsInferenceSucceedsOnIntersections.js
index d674dedcf28ea..d87e67de7a464 100644
--- a/tests/baselines/reference/tsxReactPropsInferenceSucceedsOnIntersections.js
+++ b/tests/baselines/reference/tsxReactPropsInferenceSucceedsOnIntersections.js
@@ -20,7 +20,7 @@ const CustomButton: React.SFC = props =>
+///
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
diff --git a/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.js b/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.js
index 39ef9039480f0..874ff757dfe3a 100644
--- a/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.js
+++ b/tests/baselines/reference/tsxSpreadDoesNotReportExcessProps.js
@@ -14,7 +14,7 @@ class MyComponent extends React.Component<{dataSource: number[], onClick?: any},
//// [tsxSpreadDoesNotReportExcessProps.js]
"use strict";
-///
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxStatelessComponentDefaultProps.js b/tests/baselines/reference/tsxStatelessComponentDefaultProps.js
index c9249fa38e833..5385637cb99a4 100644
--- a/tests/baselines/reference/tsxStatelessComponentDefaultProps.js
+++ b/tests/baselines/reference/tsxStatelessComponentDefaultProps.js
@@ -19,7 +19,7 @@ let a =
//// [tsxStatelessComponentDefaultProps.js]
"use strict";
-///
+///
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
diff --git a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js
index e5b35f0c013ba..19cf7e7a48720 100644
--- a/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js
+++ b/tests/baselines/reference/tsxUnionMemberChecksFilterDataProps.js
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
-///
+///
var react_1 = __importDefault(require("react"));
var RootNotHappy = function () { return (react_1.default.createElement(NotHappy, { "data-testid": "my-test-id" })); };
var RootHappy = function () { return (react_1.default.createElement(Happy, { "data-testid": "my-test-id" })); };
From 0c3605f8a0927d9c1215b4af72549b648c573038 Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Wed, 28 Jan 2026 12:10:17 -0800
Subject: [PATCH 2/2] Remove compiler runner libFiles option entirely
---
src/harness/harnessIO.ts | 9 -
...oleanLiteralsContextuallyTypedFromUnion.js | 2 +
...LiteralsContextuallyTypedFromUnion.symbols | 103 ++++----
...anLiteralsContextuallyTypedFromUnion.types | 1 +
.../reference/checkJsxChildrenProperty1.js | 3 +
.../checkJsxChildrenProperty1.symbols | 52 ++--
.../reference/checkJsxChildrenProperty1.types | 2 +
.../reference/checkJsxChildrenProperty12.js | 3 +
.../checkJsxChildrenProperty12.symbols | 42 ++--
.../checkJsxChildrenProperty12.types | 2 +
.../checkJsxChildrenProperty13.errors.txt | 4 +-
.../reference/checkJsxChildrenProperty13.js | 3 +
.../checkJsxChildrenProperty13.symbols | 36 +--
.../checkJsxChildrenProperty13.types | 2 +
.../checkJsxChildrenProperty14.errors.txt | 4 +-
.../reference/checkJsxChildrenProperty14.js | 3 +
.../checkJsxChildrenProperty14.symbols | 120 ++++-----
.../checkJsxChildrenProperty14.types | 2 +
.../checkJsxChildrenProperty15.errors.txt | 8 +-
.../reference/checkJsxChildrenProperty15.js | 3 +
.../checkJsxChildrenProperty15.symbols | 38 +--
.../checkJsxChildrenProperty15.types | 2 +
.../checkJsxChildrenProperty2.errors.txt | 16 +-
.../reference/checkJsxChildrenProperty2.js | 3 +
.../checkJsxChildrenProperty2.symbols | 102 ++++----
.../reference/checkJsxChildrenProperty2.types | 2 +
.../reference/checkJsxChildrenProperty3.js | 3 +
.../checkJsxChildrenProperty3.symbols | 58 ++---
.../reference/checkJsxChildrenProperty3.types | 2 +
.../checkJsxChildrenProperty4.errors.txt | 14 +-
.../reference/checkJsxChildrenProperty4.js | 3 +
.../checkJsxChildrenProperty4.symbols | 62 ++---
.../reference/checkJsxChildrenProperty4.types | 2 +
.../checkJsxChildrenProperty5.errors.txt | 14 +-
.../reference/checkJsxChildrenProperty5.js | 3 +
.../checkJsxChildrenProperty5.symbols | 60 ++---
.../reference/checkJsxChildrenProperty5.types | 2 +
.../reference/checkJsxChildrenProperty6.js | 3 +
.../checkJsxChildrenProperty6.symbols | 84 ++++---
.../reference/checkJsxChildrenProperty6.types | 2 +
.../checkJsxChildrenProperty7.errors.txt | 8 +-
.../reference/checkJsxChildrenProperty7.js | 3 +
.../checkJsxChildrenProperty7.symbols | 72 +++---
.../reference/checkJsxChildrenProperty7.types | 2 +
.../reference/checkJsxChildrenProperty8.js | 3 +
.../checkJsxChildrenProperty8.symbols | 84 ++++---
.../reference/checkJsxChildrenProperty8.types | 2 +
.../reference/checkJsxChildrenProperty9.js | 3 +
.../checkJsxChildrenProperty9.symbols | 12 +-
.../reference/checkJsxChildrenProperty9.types | 2 +
...xGenericTagHasCorrectInferences.errors.txt | 5 +-
.../checkJsxGenericTagHasCorrectInferences.js | 2 +
...kJsxGenericTagHasCorrectInferences.symbols | 91 +++----
...eckJsxGenericTagHasCorrectInferences.types | 1 +
.../commentEmittingInPreserveJsx1.js | 3 +
.../commentEmittingInPreserveJsx1.symbols | 2 +
.../commentEmittingInPreserveJsx1.types | 2 +
...StringLiteralsInJsxAttributes02.errors.txt | 14 +-
...llyTypedStringLiteralsInJsxAttributes02.js | 3 +
...pedStringLiteralsInJsxAttributes02.symbols | 140 ++++++-----
...TypedStringLiteralsInJsxAttributes02.types | 2 +
.../correctlyMarkAliasAsReferences1.js | 2 +
.../correctlyMarkAliasAsReferences1.symbols | 17 +-
.../correctlyMarkAliasAsReferences1.types | 1 +
.../correctlyMarkAliasAsReferences2.js | 2 +
.../correctlyMarkAliasAsReferences2.symbols | 19 +-
.../correctlyMarkAliasAsReferences2.types | 1 +
...correctlyMarkAliasAsReferences3.errors.txt | 3 +-
.../correctlyMarkAliasAsReferences3.js | 2 +
.../correctlyMarkAliasAsReferences3.symbols | 17 +-
.../correctlyMarkAliasAsReferences3.types | 1 +
.../correctlyMarkAliasAsReferences4.js | 2 +
.../correctlyMarkAliasAsReferences4.symbols | 19 +-
.../correctlyMarkAliasAsReferences4.types | 1 +
...xCheckJsxNoTypeArgumentsAllowed.errors.txt | 39 +--
.../jsxCheckJsxNoTypeArgumentsAllowed.js | 2 +
.../jsxCheckJsxNoTypeArgumentsAllowed.symbols | 25 +-
.../jsxCheckJsxNoTypeArgumentsAllowed.types | 61 ++---
.../baselines/reference/jsxHasLiteralType.js | 2 +
.../reference/jsxHasLiteralType.symbols | 25 +-
.../reference/jsxHasLiteralType.types | 1 +
.../jsxInferenceProducesLiteralAsExpected.js | 2 +
...InferenceProducesLiteralAsExpected.symbols | 75 +++---
...sxInferenceProducesLiteralAsExpected.types | 1 +
.../reference/jsxSpreadFirstUnionNoErrors.js | 2 +
.../jsxSpreadFirstUnionNoErrors.symbols | 53 ++--
.../jsxSpreadFirstUnionNoErrors.types | 1 +
...SpreadOverwritesAttributeStrict.errors.txt | 26 +-
.../jsxSpreadOverwritesAttributeStrict.js | 3 +
...jsxSpreadOverwritesAttributeStrict.symbols | 102 ++++----
.../jsxSpreadOverwritesAttributeStrict.types | 2 +
.../baselines/reference/multiline.errors.txt | 36 ++-
tests/baselines/reference/multiline.js | 16 +-
tests/baselines/reference/multiline.symbols | 64 ++---
tests/baselines/reference/multiline.types | 50 +---
.../tsxAttributeResolution15.errors.txt | 6 +-
.../reference/tsxAttributeResolution15.js | 3 +
.../tsxAttributeResolution15.symbols | 30 +--
.../reference/tsxAttributeResolution15.types | 2 +
.../reference/tsxAttributeResolution16.js | 3 +
.../tsxAttributeResolution16.symbols | 42 ++--
.../reference/tsxAttributeResolution16.types | 2 +
...DeepAttributeAssignabilityError.errors.txt | 3 +-
.../tsxDeepAttributeAssignabilityError.js | 2 +
...tsxDeepAttributeAssignabilityError.symbols | 21 +-
.../tsxDeepAttributeAssignabilityError.types | 1 +
.../tsxDefaultAttributesResolution1.js | 3 +
.../tsxDefaultAttributesResolution1.symbols | 18 +-
.../tsxDefaultAttributesResolution1.types | 2 +
.../tsxDefaultAttributesResolution2.js | 3 +
.../tsxDefaultAttributesResolution2.symbols | 18 +-
.../tsxDefaultAttributesResolution2.types | 2 +
...tsxDefaultAttributesResolution3.errors.txt | 6 +-
.../tsxDefaultAttributesResolution3.js | 3 +
.../tsxDefaultAttributesResolution3.symbols | 18 +-
.../tsxDefaultAttributesResolution3.types | 2 +
.../reference/tsxFragmentChildrenCheck.js | 2 +
.../tsxFragmentChildrenCheck.symbols | 7 +-
.../reference/tsxFragmentChildrenCheck.types | 1 +
.../reference/tsxGenericAttributesType1.js | 3 +
.../tsxGenericAttributesType1.symbols | 68 ++---
.../reference/tsxGenericAttributesType1.types | 2 +
.../reference/tsxGenericAttributesType2.js | 3 +
.../tsxGenericAttributesType2.symbols | 24 +-
.../reference/tsxGenericAttributesType2.types | 2 +
.../reference/tsxGenericAttributesType3.js | 3 +
.../tsxGenericAttributesType3.symbols | 28 ++-
.../reference/tsxGenericAttributesType3.types | 2 +
.../reference/tsxGenericAttributesType4.js | 3 +
.../tsxGenericAttributesType4.symbols | 26 +-
.../reference/tsxGenericAttributesType4.types | 2 +
.../reference/tsxGenericAttributesType5.js | 3 +
.../tsxGenericAttributesType5.symbols | 34 +--
.../reference/tsxGenericAttributesType5.types | 2 +
.../reference/tsxGenericAttributesType6.js | 3 +
.../tsxGenericAttributesType6.symbols | 36 +--
.../reference/tsxGenericAttributesType6.types | 2 +
.../reference/tsxGenericAttributesType7.js | 3 +
.../tsxGenericAttributesType7.symbols | 38 +--
.../reference/tsxGenericAttributesType7.types | 2 +
.../reference/tsxGenericAttributesType8.js | 3 +
.../tsxGenericAttributesType8.symbols | 36 +--
.../reference/tsxGenericAttributesType8.types | 2 +
.../reference/tsxGenericAttributesType9.js | 3 +
.../tsxGenericAttributesType9.symbols | 18 +-
.../reference/tsxGenericAttributesType9.types | 2 +
...ReactComponentWithDefaultTypeParameter1.js | 3 +
...ComponentWithDefaultTypeParameter1.symbols | 28 ++-
...ctComponentWithDefaultTypeParameter1.types | 2 +
...ReactComponentWithDefaultTypeParameter2.js | 3 +
...ComponentWithDefaultTypeParameter2.symbols | 30 +--
...ctComponentWithDefaultTypeParameter2.types | 2 +
...ponentWithDefaultTypeParameter3.errors.txt | 8 +-
...ReactComponentWithDefaultTypeParameter3.js | 3 +
...ComponentWithDefaultTypeParameter3.symbols | 38 +--
...ctComponentWithDefaultTypeParameter3.types | 2 +
.../tsxResolveExternalModuleExportsTypes.js | 1 +
...xResolveExternalModuleExportsTypes.symbols | 19 +-
...tsxResolveExternalModuleExportsTypes.types | 35 +--
.../reference/tsxSfcReturnNull.errors.txt | 2 +
tests/baselines/reference/tsxSfcReturnNull.js | 3 +
.../reference/tsxSfcReturnNull.symbols | 20 +-
.../reference/tsxSfcReturnNull.types | 2 +
...sxSfcReturnNullStrictNullChecks.errors.txt | 2 +
.../tsxSfcReturnNullStrictNullChecks.js | 3 +
.../tsxSfcReturnNullStrictNullChecks.symbols | 20 +-
.../tsxSfcReturnNullStrictNullChecks.types | 2 +
...ReturnUndefinedStrictNullChecks.errors.txt | 6 +-
.../tsxSfcReturnUndefinedStrictNullChecks.js | 3 +
...SfcReturnUndefinedStrictNullChecks.symbols | 20 +-
...sxSfcReturnUndefinedStrictNullChecks.types | 2 +
.../tsxSpreadAttributesResolution1.js | 3 +
.../tsxSpreadAttributesResolution1.symbols | 18 +-
.../tsxSpreadAttributesResolution1.types | 2 +
...tsxSpreadAttributesResolution10.errors.txt | 18 +-
.../tsxSpreadAttributesResolution10.js | 3 +
.../tsxSpreadAttributesResolution10.symbols | 52 ++--
.../tsxSpreadAttributesResolution10.types | 2 +
.../tsxSpreadAttributesResolution11.js | 3 +
.../tsxSpreadAttributesResolution11.symbols | 100 ++++----
.../tsxSpreadAttributesResolution11.types | 2 +
...tsxSpreadAttributesResolution12.errors.txt | 12 +-
.../tsxSpreadAttributesResolution12.js | 3 +
.../tsxSpreadAttributesResolution12.symbols | 78 +++---
.../tsxSpreadAttributesResolution12.types | 2 +
.../tsxSpreadAttributesResolution13.js | 3 +
.../tsxSpreadAttributesResolution13.symbols | 40 +--
.../tsxSpreadAttributesResolution13.types | 2 +
...tsxSpreadAttributesResolution14.errors.txt | 4 +-
.../tsxSpreadAttributesResolution14.js | 3 +
.../tsxSpreadAttributesResolution14.symbols | 32 +--
.../tsxSpreadAttributesResolution14.types | 2 +
.../tsxSpreadAttributesResolution15.js | 3 +
.../tsxSpreadAttributesResolution15.symbols | 38 +--
.../tsxSpreadAttributesResolution15.types | 2 +
...tsxSpreadAttributesResolution16.errors.txt | 6 +-
.../tsxSpreadAttributesResolution16.js | 3 +
.../tsxSpreadAttributesResolution16.symbols | 34 +--
.../tsxSpreadAttributesResolution16.types | 2 +
.../tsxSpreadAttributesResolution2.errors.txt | 18 +-
.../tsxSpreadAttributesResolution2.js | 3 +
.../tsxSpreadAttributesResolution2.symbols | 58 ++---
.../tsxSpreadAttributesResolution2.types | 2 +
.../tsxSpreadAttributesResolution3.js | 3 +
.../tsxSpreadAttributesResolution3.symbols | 34 +--
.../tsxSpreadAttributesResolution3.types | 2 +
.../tsxSpreadAttributesResolution4.errors.txt | 4 +-
.../tsxSpreadAttributesResolution4.js | 3 +
.../tsxSpreadAttributesResolution4.symbols | 66 ++---
.../tsxSpreadAttributesResolution4.types | 2 +
.../tsxSpreadAttributesResolution5.errors.txt | 6 +-
.../tsxSpreadAttributesResolution5.js | 3 +
.../tsxSpreadAttributesResolution5.symbols | 42 ++--
.../tsxSpreadAttributesResolution5.types | 2 +
.../tsxSpreadAttributesResolution6.errors.txt | 6 +-
.../tsxSpreadAttributesResolution6.js | 3 +
.../tsxSpreadAttributesResolution6.symbols | 30 +--
.../tsxSpreadAttributesResolution6.types | 2 +
.../tsxSpreadAttributesResolution7.js | 3 +
.../tsxSpreadAttributesResolution7.symbols | 44 ++--
.../tsxSpreadAttributesResolution7.types | 2 +
.../tsxSpreadAttributesResolution8.js | 3 +
.../tsxSpreadAttributesResolution8.symbols | 48 ++--
.../tsxSpreadAttributesResolution8.types | 2 +
.../tsxSpreadAttributesResolution9.js | 3 +
.../tsxSpreadAttributesResolution9.symbols | 54 ++--
.../tsxSpreadAttributesResolution9.types | 2 +
...elessFunctionComponentOverload1.errors.txt | 6 +-
.../tsxStatelessFunctionComponentOverload1.js | 3 +
...tatelessFunctionComponentOverload1.symbols | 214 ++++++++--------
...xStatelessFunctionComponentOverload1.types | 2 +
...elessFunctionComponentOverload2.errors.txt | 2 +
.../tsxStatelessFunctionComponentOverload2.js | 3 +
...tatelessFunctionComponentOverload2.symbols | 102 ++++----
...xStatelessFunctionComponentOverload2.types | 2 +
...elessFunctionComponentOverload3.errors.txt | 2 +
.../tsxStatelessFunctionComponentOverload3.js | 3 +
...tatelessFunctionComponentOverload3.symbols | 98 ++++----
...xStatelessFunctionComponentOverload3.types | 2 +
...elessFunctionComponentOverload4.errors.txt | 48 ++--
.../tsxStatelessFunctionComponentOverload4.js | 3 +
...tatelessFunctionComponentOverload4.symbols | 174 ++++++-------
...xStatelessFunctionComponentOverload4.types | 2 +
...elessFunctionComponentOverload5.errors.txt | 28 ++-
.../tsxStatelessFunctionComponentOverload5.js | 3 +
...tatelessFunctionComponentOverload5.symbols | 174 ++++++-------
...xStatelessFunctionComponentOverload5.types | 2 +
.../tsxStatelessFunctionComponentOverload6.js | 3 +
...tatelessFunctionComponentOverload6.symbols | 192 +++++++-------
...xStatelessFunctionComponentOverload6.types | 2 +
...ponentWithDefaultTypeParameter1.errors.txt | 2 +
...ctionComponentWithDefaultTypeParameter1.js | 3 +
...ComponentWithDefaultTypeParameter1.symbols | 28 ++-
...onComponentWithDefaultTypeParameter1.types | 2 +
...ponentWithDefaultTypeParameter2.errors.txt | 6 +-
...ctionComponentWithDefaultTypeParameter2.js | 3 +
...ComponentWithDefaultTypeParameter2.symbols | 22 +-
...onComponentWithDefaultTypeParameter2.types | 2 +
...tsxStatelessFunctionComponents1.errors.txt | 20 +-
.../tsxStatelessFunctionComponents1.js | 3 +
.../tsxStatelessFunctionComponents1.symbols | 120 ++++-----
.../tsxStatelessFunctionComponents1.types | 2 +
...tsxStatelessFunctionComponents2.errors.txt | 10 +-
.../tsxStatelessFunctionComponents2.js | 3 +
.../tsxStatelessFunctionComponents2.symbols | 94 +++----
.../tsxStatelessFunctionComponents2.types | 2 +
...tsxStatelessFunctionComponents3.errors.txt | 2 +
.../tsxStatelessFunctionComponents3.js | 3 +
.../tsxStatelessFunctionComponents3.symbols | 22 +-
.../tsxStatelessFunctionComponents3.types | 2 +
...ionComponentsWithTypeArguments1.errors.txt | 2 +
...essFunctionComponentsWithTypeArguments1.js | 3 +
...nctionComponentsWithTypeArguments1.symbols | 130 +++++-----
...FunctionComponentsWithTypeArguments1.types | 2 +
...ionComponentsWithTypeArguments2.errors.txt | 18 +-
...essFunctionComponentsWithTypeArguments2.js | 3 +
...nctionComponentsWithTypeArguments2.symbols | 118 ++++-----
...FunctionComponentsWithTypeArguments2.types | 2 +
...ionComponentsWithTypeArguments3.errors.txt | 2 +
...essFunctionComponentsWithTypeArguments3.js | 3 +
...nctionComponentsWithTypeArguments3.symbols | 162 ++++++------
...FunctionComponentsWithTypeArguments3.types | 2 +
...ionComponentsWithTypeArguments4.errors.txt | 14 +-
...essFunctionComponentsWithTypeArguments4.js | 3 +
...nctionComponentsWithTypeArguments4.symbols | 76 +++---
...FunctionComponentsWithTypeArguments4.types | 2 +
...ionComponentsWithTypeArguments5.errors.txt | 2 +
...essFunctionComponentsWithTypeArguments5.js | 3 +
...nctionComponentsWithTypeArguments5.symbols | 98 ++++----
...FunctionComponentsWithTypeArguments5.types | 2 +
.../tsxTypeArgumentResolution.errors.txt | 24 +-
.../reference/tsxTypeArgumentResolution.js | 3 +
.../tsxTypeArgumentResolution.symbols | 238 +++++++++---------
.../reference/tsxTypeArgumentResolution.types | 2 +
.../tsxTypeArgumentsJsxPreserveOutput.js | 3 +
.../tsxTypeArgumentsJsxPreserveOutput.symbols | 82 +++---
.../tsxTypeArgumentsJsxPreserveOutput.types | 2 +
.../reference/tsxUnionElementType1.errors.txt | 4 +-
.../reference/tsxUnionElementType1.js | 3 +
.../reference/tsxUnionElementType1.symbols | 24 +-
.../reference/tsxUnionElementType1.types | 2 +
.../reference/tsxUnionElementType2.errors.txt | 4 +-
.../reference/tsxUnionElementType2.js | 3 +
.../reference/tsxUnionElementType2.symbols | 24 +-
.../reference/tsxUnionElementType2.types | 2 +
.../reference/tsxUnionElementType3.errors.txt | 6 +-
.../reference/tsxUnionElementType3.js | 3 +
.../reference/tsxUnionElementType3.symbols | 68 ++---
.../reference/tsxUnionElementType3.types | 2 +
.../reference/tsxUnionElementType4.errors.txt | 10 +-
.../reference/tsxUnionElementType4.js | 3 +
.../reference/tsxUnionElementType4.symbols | 60 ++---
.../reference/tsxUnionElementType4.types | 2 +
.../reference/tsxUnionElementType5.js | 3 +
.../reference/tsxUnionElementType5.symbols | 40 +--
.../reference/tsxUnionElementType5.types | 2 +
.../reference/tsxUnionElementType6.errors.txt | 16 +-
.../reference/tsxUnionElementType6.js | 3 +
.../reference/tsxUnionElementType6.symbols | 46 ++--
.../reference/tsxUnionElementType6.types | 2 +
.../reference/tsxUnionTypeComponent1.js | 3 +
.../reference/tsxUnionTypeComponent1.symbols | 30 +--
.../reference/tsxUnionTypeComponent1.types | 2 +
.../tsxUnionTypeComponent2.errors.txt | 4 +-
.../reference/tsxUnionTypeComponent2.js | 3 +
.../reference/tsxUnionTypeComponent2.symbols | 10 +-
.../reference/tsxUnionTypeComponent2.types | 2 +
.../unicodeEscapesInJsxtags.errors.txt | 9 +-
.../reference/unicodeEscapesInJsxtags.js | 2 +
.../reference/unicodeEscapesInJsxtags.symbols | 59 ++---
.../reference/unicodeEscapesInJsxtags.types | 1 +
...leanLiteralsContextuallyTypedFromUnion.tsx | 2 +-
tests/cases/compiler/jsxHasLiteralType.tsx | 2 +-
.../jsxInferenceProducesLiteralAsExpected.tsx | 2 +-
.../compiler/jsxSpreadFirstUnionNoErrors.tsx | 2 +-
.../tsxDeepAttributeAssignabilityError.tsx | 2 +-
.../compiler/tsxFragmentChildrenCheck.ts | 2 +-
.../tsxResolveExternalModuleExportsTypes.ts | 2 +-
.../conformance/directives/multiline.tsx | 2 +-
.../jsx/checkJsxChildrenProperty1.tsx | 2 +-
.../jsx/checkJsxChildrenProperty12.tsx | 2 +-
.../jsx/checkJsxChildrenProperty13.tsx | 2 +-
.../jsx/checkJsxChildrenProperty14.tsx | 2 +-
.../jsx/checkJsxChildrenProperty15.tsx | 2 +-
.../jsx/checkJsxChildrenProperty2.tsx | 2 +-
.../jsx/checkJsxChildrenProperty3.tsx | 2 +-
.../jsx/checkJsxChildrenProperty4.tsx | 2 +-
.../jsx/checkJsxChildrenProperty5.tsx | 2 +-
.../jsx/checkJsxChildrenProperty6.tsx | 2 +-
.../jsx/checkJsxChildrenProperty7.tsx | 2 +-
.../jsx/checkJsxChildrenProperty8.tsx | 2 +-
.../jsx/checkJsxChildrenProperty9.tsx | 2 +-
...checkJsxGenericTagHasCorrectInferences.tsx | 2 +-
.../jsx/commentEmittingInPreserveJsx1.tsx | 2 +-
.../jsx/correctlyMarkAliasAsReferences1.tsx | 2 +-
.../jsx/correctlyMarkAliasAsReferences2.tsx | 2 +-
.../jsx/correctlyMarkAliasAsReferences3.tsx | 2 +-
.../jsx/correctlyMarkAliasAsReferences4.tsx | 2 +-
.../jsx/jsxCheckJsxNoTypeArgumentsAllowed.tsx | 2 +-
.../jsxSpreadOverwritesAttributeStrict.tsx | 2 +-
.../jsx/tsxAttributeResolution15.tsx | 2 +-
.../jsx/tsxAttributeResolution16.tsx | 2 +-
.../jsx/tsxDefaultAttributesResolution1.tsx | 2 +-
.../jsx/tsxDefaultAttributesResolution2.tsx | 2 +-
.../jsx/tsxDefaultAttributesResolution3.tsx | 2 +-
.../jsx/tsxGenericAttributesType1.tsx | 2 +-
.../jsx/tsxGenericAttributesType2.tsx | 2 +-
.../jsx/tsxGenericAttributesType3.tsx | 2 +-
.../jsx/tsxGenericAttributesType4.tsx | 2 +-
.../jsx/tsxGenericAttributesType5.tsx | 2 +-
.../jsx/tsxGenericAttributesType6.tsx | 2 +-
.../jsx/tsxGenericAttributesType7.tsx | 2 +-
.../jsx/tsxGenericAttributesType8.tsx | 2 +-
.../jsx/tsxGenericAttributesType9.tsx | 2 +-
...eactComponentWithDefaultTypeParameter1.tsx | 2 +-
...eactComponentWithDefaultTypeParameter2.tsx | 2 +-
...eactComponentWithDefaultTypeParameter3.tsx | 2 +-
.../conformance/jsx/tsxSfcReturnNull.tsx | 2 +-
.../jsx/tsxSfcReturnNullStrictNullChecks.tsx | 2 +-
.../tsxSfcReturnUndefinedStrictNullChecks.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution1.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution10.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution11.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution12.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution13.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution14.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution15.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution16.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution2.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution3.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution4.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution5.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution6.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution7.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution8.tsx | 2 +-
.../jsx/tsxSpreadAttributesResolution9.tsx | 2 +-
...tsxStatelessFunctionComponentOverload1.tsx | 2 +-
...tsxStatelessFunctionComponentOverload2.tsx | 2 +-
...tsxStatelessFunctionComponentOverload3.tsx | 2 +-
...tsxStatelessFunctionComponentOverload4.tsx | 2 +-
...tsxStatelessFunctionComponentOverload5.tsx | 2 +-
...tsxStatelessFunctionComponentOverload6.tsx | 2 +-
...tionComponentWithDefaultTypeParameter1.tsx | 2 +-
...tionComponentWithDefaultTypeParameter2.tsx | 2 +-
.../jsx/tsxStatelessFunctionComponents1.tsx | 2 +-
.../jsx/tsxStatelessFunctionComponents2.tsx | 2 +-
.../jsx/tsxStatelessFunctionComponents3.tsx | 2 +-
...ssFunctionComponentsWithTypeArguments1.tsx | 2 +-
...ssFunctionComponentsWithTypeArguments2.tsx | 2 +-
...ssFunctionComponentsWithTypeArguments3.tsx | 2 +-
...ssFunctionComponentsWithTypeArguments4.tsx | 2 +-
...ssFunctionComponentsWithTypeArguments5.tsx | 2 +-
.../jsx/tsxTypeArgumentResolution.tsx | 2 +-
.../jsx/tsxTypeArgumentsJsxPreserveOutput.tsx | 2 +-
.../conformance/jsx/tsxUnionElementType1.tsx | 2 +-
.../conformance/jsx/tsxUnionElementType2.tsx | 2 +-
.../conformance/jsx/tsxUnionElementType3.tsx | 2 +-
.../conformance/jsx/tsxUnionElementType4.tsx | 2 +-
.../conformance/jsx/tsxUnionElementType5.tsx | 2 +-
.../conformance/jsx/tsxUnionElementType6.tsx | 2 +-
.../jsx/tsxUnionTypeComponent1.tsx | 2 +-
.../jsx/tsxUnionTypeComponent2.tsx | 2 +-
.../jsx/unicodeEscapesInJsxtags.tsx | 2 +-
...lyTypedStringLiteralsInJsxAttributes02.tsx | 2 +-
424 files changed, 3705 insertions(+), 3104 deletions(-)
diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts
index d4b25a7d53166..a06bde1c95182 100644
--- a/src/harness/harnessIO.ts
+++ b/src/harness/harnessIO.ts
@@ -240,7 +240,6 @@ export namespace Compiler {
interface HarnessOptions {
useCaseSensitiveFileNames?: boolean;
baselineFile?: string;
- libFiles?: string;
noTypesAndSymbols?: boolean;
captureSuggestions?: boolean;
}
@@ -251,7 +250,6 @@ export namespace Compiler {
{ name: "useCaseSensitiveFileNames", type: "boolean", defaultValueDescription: false },
{ name: "baselineFile", type: "string" },
{ name: "fileName", type: "string" },
- { name: "libFiles", type: "string" },
{ name: "noErrorTruncation", type: "boolean", defaultValueDescription: false },
{ name: "suppressOutputPathCheck", type: "boolean", defaultValueDescription: false },
{ name: "noImplicitReferences", type: "boolean", defaultValueDescription: false },
@@ -368,13 +366,6 @@ export namespace Compiler {
.map(file => options.configFile ? ts.getNormalizedAbsolutePath(file.unitName, currentDirectory) : file.unitName)
.filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json));
- // Files from tests\lib that are requested by "@libFiles"
- if (options.libFiles) {
- for (const fileName of options.libFiles.split(",")) {
- programFileNames.push(vpath.combine(vfs.testLibFolder, fileName));
- }
- }
-
const docs = inputFiles.concat(otherFiles).map(documents.TextDocument.fromTestFile);
const fs = vfs.createFromFileSystem(IO, !useCaseSensitiveFileNames, { documents: docs, cwd: currentDirectory });
if (symlinks) {
diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js
index 45a77912690ed..36f1719bd640d 100644
--- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js
+++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] ////
//// [booleanLiteralsContextuallyTypedFromUnion.tsx]
+///
interface A { isIt: true; text: string; }
interface B { isIt: false; value: number; }
type C = A | B;
@@ -28,6 +29,7 @@ let Success = () =>
//// [booleanLiteralsContextuallyTypedFromUnion.jsx]
"use strict";
+///
var isIt = Math.random() > 0.5;
var c = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 };
var cc = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 };
diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols
index 950cefddab7cf..af1ec93e9fced 100644
--- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols
+++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols
@@ -1,99 +1,100 @@
//// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] ////
=== booleanLiteralsContextuallyTypedFromUnion.tsx ===
+///
interface A { isIt: true; text: string; }
>A : Symbol(A, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 0))
->isIt : Symbol(A.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 13))
->text : Symbol(A.text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 25))
+>isIt : Symbol(A.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 13))
+>text : Symbol(A.text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 25))
interface B { isIt: false; value: number; }
->B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 41))
->isIt : Symbol(B.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 13))
->value : Symbol(B.value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 26))
+>B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 41))
+>isIt : Symbol(B.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 13))
+>value : Symbol(B.value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 26))
type C = A | B;
->C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 43))
+>C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 43))
>A : Symbol(A, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 0))
->B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 41))
+>B : Symbol(B, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 41))
const isIt = Math.random() > 0.5;
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5))
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 };
->c : Symbol(c, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5))
->C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 43))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 21))
->text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 27))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 45))
->value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 51))
+>c : Symbol(c, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 5))
+>C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 43))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 21))
+>text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 27))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 45))
+>value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 51))
const cc: C = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 };
->cc : Symbol(cc, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 5))
->C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 1, 43))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 22))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5))
->text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 34))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 52))
->isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5))
->value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 64))
+>cc : Symbol(cc, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 5))
+>C : Symbol(C, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 2, 43))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 22))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5))
+>text : Symbol(text, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 34))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 52))
+>isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5))
+>value : Symbol(value, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 64))
type ComponentProps =
->ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 78))
+>ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 78))
| {
optionalBool: true;
->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 8, 7))
+>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 9, 7))
mandatoryFn: () => void;
->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 9, 27))
+>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 10, 27))
}
| {
optionalBool: false;
->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 12, 7))
+>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 13, 7))
};
let Funk = (_props: ComponentProps) => Hello
;
->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3))
->_props : Symbol(_props, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 12))
->ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 5, 78))
+>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3))
+>_props : Symbol(_props, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 12))
+>ComponentProps : Symbol(ComponentProps, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 6, 78))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
let Fail1 = () => { }} optionalBool={true} />
->Fail1 : Symbol(Fail1, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 18, 3))
->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3))
->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 18, 23))
->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 18, 47))
-
-let Fail2 = () => { }} optionalBool={true as true} />
->Fail2 : Symbol(Fail2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 3))
->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3))
+>Fail1 : Symbol(Fail1, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 3))
+>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3))
>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 23))
>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 19, 47))
+let Fail2 = () => { }} optionalBool={true as true} />
+>Fail2 : Symbol(Fail2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 3))
+>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3))
+>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 23))
+>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 47))
+
let True = true as true;
->True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 3))
+>True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 3))
let Fail3 = () => { }} optionalBool={True} />
->Fail3 : Symbol(Fail3, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 3))
->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3))
->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 23))
->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 47))
->True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 20, 3))
+>Fail3 : Symbol(Fail3, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 3))
+>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3))
+>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 23))
+>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 47))
+>True : Symbol(True, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 21, 3))
let attrs2 = { optionalBool: true as true, mandatoryFn: () => { } }
->attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 3))
->optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 14))
->mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 42))
+>attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 3))
+>optionalBool : Symbol(optionalBool, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 14))
+>mandatoryFn : Symbol(mandatoryFn, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 42))
let Success = () =>
->Success : Symbol(Success, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 3))
->Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 16, 3))
->attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 22, 3))
+>Success : Symbol(Success, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 24, 3))
+>Funk : Symbol(Funk, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 17, 3))
+>attrs2 : Symbol(attrs2, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 23, 3))
diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types
index 087cc757c2f27..9d2cae17a0c11 100644
--- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types
+++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] ////
=== booleanLiteralsContextuallyTypedFromUnion.tsx ===
+///
interface A { isIt: true; text: string; }
>isIt : true
> : ^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.js b/tests/baselines/reference/checkJsxChildrenProperty1.js
index 90e72ea120cf6..ff4d1a8084bc1 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty1.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -26,6 +28,7 @@ let k2 =
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
function Comp(p) {
diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.symbols b/tests/baselines/reference/checkJsxChildrenProperty1.symbols
index 03f6c72ee088f..fc860bb9ea9cd 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty1.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty1.symbols
@@ -1,69 +1,71 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: string | JSX.Element
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->p : Symbol(p, Decl(file.tsx, 8, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>p : Symbol(p, Decl(file.tsx, 10, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 8, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 10, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// OK
let k = ;
->k : Symbol(k, Decl(file.tsx, 13, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 13, 13))
->b : Symbol(b, Decl(file.tsx, 13, 20))
->children : Symbol(children, Decl(file.tsx, 13, 27))
+>k : Symbol(k, Decl(file.tsx, 15, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 15, 13))
+>b : Symbol(b, Decl(file.tsx, 15, 20))
+>children : Symbol(children, Decl(file.tsx, 15, 27))
let k1 =
->k1 : Symbol(k1, Decl(file.tsx, 14, 3))
+>k1 : Symbol(k1, Decl(file.tsx, 16, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 15, 9))
->b : Symbol(b, Decl(file.tsx, 15, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 17, 9))
+>b : Symbol(b, Decl(file.tsx, 17, 16))
hi hi hi!
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
let k2 =
->k2 : Symbol(k2, Decl(file.tsx, 18, 3))
+>k2 : Symbol(k2, Decl(file.tsx, 20, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 19, 9))
->b : Symbol(b, Decl(file.tsx, 19, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 21, 9))
+>b : Symbol(b, Decl(file.tsx, 21, 16))
hi hi hi!
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.types b/tests/baselines/reference/checkJsxChildrenProperty1.types
index 42eef8075c495..2db988928b72c 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty1.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.js b/tests/baselines/reference/checkJsxChildrenProperty12.js
index 5288eddbe8b90..eb3bfc8c63eef 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty12.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty12.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface ButtonProp {
@@ -36,6 +38,7 @@ class InnerButton extends React.Component {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.symbols b/tests/baselines/reference/checkJsxChildrenProperty12.symbols
index 6d3f833fe7024..1128c1817872a 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty12.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty12.symbols
@@ -1,50 +1,52 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ButtonProp {
->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32))
+>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(ButtonProp.a, Decl(file.tsx, 2, 22))
+>a : Symbol(ButtonProp.a, Decl(file.tsx, 4, 22))
b: string,
->b : Symbol(ButtonProp.b, Decl(file.tsx, 3, 14))
+>b : Symbol(ButtonProp.b, Decl(file.tsx, 5, 14))
children: Button;
->children : Symbol(ButtonProp.children, Decl(file.tsx, 4, 14))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>children : Symbol(ButtonProp.children, Decl(file.tsx, 6, 14))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32))
+>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 55))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 55))
let condition: boolean;
->condition : Symbol(condition, Decl(file.tsx, 10, 5))
+>condition : Symbol(condition, Decl(file.tsx, 12, 5))
if (condition) {
->condition : Symbol(condition, Decl(file.tsx, 10, 5))
+>condition : Symbol(condition, Decl(file.tsx, 12, 5))
return
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(Button, Decl(file.tsx, 6, 1))
+>this : Symbol(Button, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
}
else {
return (
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(Button, Decl(file.tsx, 6, 1))
+>this : Symbol(Button, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
Hello World
@@ -52,27 +54,27 @@ class Button extends React.Component {
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
);
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
}
}
}
interface InnerButtonProp {
->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 20, 1))
+>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 22, 1))
a: number
->a : Symbol(InnerButtonProp.a, Decl(file.tsx, 22, 27))
+>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 24, 27))
}
class InnerButton extends React.Component {
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
>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), Decl(react.d.ts, 161, 66))
->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 20, 1))
+>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 22, 1))
render() {
->render : Symbol(InnerButton.render, Decl(file.tsx, 26, 65))
+>render : Symbol(InnerButton.render, Decl(file.tsx, 28, 65))
return (Hello );
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.types b/tests/baselines/reference/checkJsxChildrenProperty12.types
index 82e70de465e81..08810e4f2782a 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty12.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty12.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt
index 3f1b4539a58d9..98121746a734e 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt
@@ -1,7 +1,9 @@
-file.tsx(12,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten.
+file.tsx(14,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
interface ButtonProp {
diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.js b/tests/baselines/reference/checkJsxChildrenProperty13.js
index 304266b096d0c..477461b0a55ac 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty13.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty13.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface ButtonProp {
@@ -31,6 +33,7 @@ class InnerButton extends React.Component {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.symbols b/tests/baselines/reference/checkJsxChildrenProperty13.symbols
index d79d9df5d7ccc..c073534e9d47f 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty13.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty13.symbols
@@ -1,66 +1,68 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ButtonProp {
->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32))
+>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(ButtonProp.a, Decl(file.tsx, 2, 22))
+>a : Symbol(ButtonProp.a, Decl(file.tsx, 4, 22))
b: string,
->b : Symbol(ButtonProp.b, Decl(file.tsx, 3, 14))
+>b : Symbol(ButtonProp.b, Decl(file.tsx, 5, 14))
children: Button;
->children : Symbol(ButtonProp.children, Decl(file.tsx, 4, 14))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>children : Symbol(ButtonProp.children, Decl(file.tsx, 6, 14))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
->ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32))
+>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 55))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 55))
// Error children are specified twice
return (
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 1))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(Button, Decl(file.tsx, 6, 1))
+>this : Symbol(Button, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->children : Symbol(children, Decl(file.tsx, 11, 44))
+>children : Symbol(children, Decl(file.tsx, 13, 44))
Hello World
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
);
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 1))
}
}
interface InnerButtonProp {
->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 15, 1))
+>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 17, 1))
a: number
->a : Symbol(InnerButtonProp.a, Decl(file.tsx, 17, 27))
+>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 19, 27))
}
class InnerButton extends React.Component {
->InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1))
+>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 1))
>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), Decl(react.d.ts, 161, 66))
->InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 15, 1))
+>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 17, 1))
render() {
->render : Symbol(InnerButton.render, Decl(file.tsx, 21, 65))
+>render : Symbol(InnerButton.render, Decl(file.tsx, 23, 65))
return (Hello );
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.types b/tests/baselines/reference/checkJsxChildrenProperty13.types
index 5a28219181e49..01a48cd8bb23a 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty13.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty13.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
index 0fefce4922a9f..f96e6ff95d086 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
@@ -1,7 +1,9 @@
-file.tsx(42,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided.
+file.tsx(44,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
interface Prop {
diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.js b/tests/baselines/reference/checkJsxChildrenProperty14.js
index ea803d1134c64..d02609fbaf266 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty14.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty14.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -46,6 +48,7 @@ let k5 = <>>
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.symbols b/tests/baselines/reference/checkJsxChildrenProperty14.symbols
index b9990ebaadeb4..4f949d07e00f5 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty14.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty14.symbols
@@ -1,20 +1,22 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: JSX.Element | JSX.Element[];
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
@@ -22,13 +24,13 @@ interface Prop {
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 48))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 48))
return (My Button
)
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -37,8 +39,8 @@ class Button extends React.Component {
}
function AnotherButton(p: any) {
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->p : Symbol(p, Decl(file.tsx, 14, 23))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>p : Symbol(p, Decl(file.tsx, 16, 23))
return Just Another Button ;
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
@@ -46,91 +48,91 @@ function AnotherButton(p: any) {
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// OK
let k1 = <>> ;
->k1 : Symbol(k1, Decl(file.tsx, 23, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 23, 14))
->b : Symbol(b, Decl(file.tsx, 23, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k1 : Symbol(k1, Decl(file.tsx, 25, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 25, 14))
+>b : Symbol(b, Decl(file.tsx, 25, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k2 = <> > ;
->k2 : Symbol(k2, Decl(file.tsx, 24, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 24, 14))
->b : Symbol(b, Decl(file.tsx, 24, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k2 : Symbol(k2, Decl(file.tsx, 26, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 26, 14))
+>b : Symbol(b, Decl(file.tsx, 26, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k3 = <> > ;
->k3 : Symbol(k3, Decl(file.tsx, 25, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 25, 14))
->b : Symbol(b, Decl(file.tsx, 25, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k3 : Symbol(k3, Decl(file.tsx, 27, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 27, 14))
+>b : Symbol(b, Decl(file.tsx, 27, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
interface SingleChildProp {
->SingleChildProp : Symbol(SingleChildProp, Decl(file.tsx, 25, 69))
+>SingleChildProp : Symbol(SingleChildProp, Decl(file.tsx, 27, 69))
a: number,
->a : Symbol(SingleChildProp.a, Decl(file.tsx, 27, 27))
+>a : Symbol(SingleChildProp.a, Decl(file.tsx, 29, 27))
b: string,
->b : Symbol(SingleChildProp.b, Decl(file.tsx, 28, 14))
+>b : Symbol(SingleChildProp.b, Decl(file.tsx, 30, 14))
children: JSX.Element;
->children : Symbol(SingleChildProp.children, Decl(file.tsx, 29, 14))
+>children : Symbol(SingleChildProp.children, Decl(file.tsx, 31, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
}
function SingleChildComp(p: SingleChildProp) {
->SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 31, 1))
->p : Symbol(p, Decl(file.tsx, 33, 25))
->SingleChildProp : Symbol(SingleChildProp, Decl(file.tsx, 25, 69))
+>SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 33, 1))
+>p : Symbol(p, Decl(file.tsx, 35, 25))
+>SingleChildProp : Symbol(SingleChildProp, Decl(file.tsx, 27, 69))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(SingleChildProp.b, Decl(file.tsx, 28, 14))
->p : Symbol(p, Decl(file.tsx, 33, 25))
->b : Symbol(SingleChildProp.b, Decl(file.tsx, 28, 14))
+>p.b : Symbol(SingleChildProp.b, Decl(file.tsx, 30, 14))
+>p : Symbol(p, Decl(file.tsx, 35, 25))
+>b : Symbol(SingleChildProp.b, Decl(file.tsx, 30, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// OK
let k4 = <> > ;
->k4 : Symbol(k4, Decl(file.tsx, 38, 3))
->SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 31, 1))
->a : Symbol(a, Decl(file.tsx, 38, 25))
->b : Symbol(b, Decl(file.tsx, 38, 32))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 31, 1))
+>k4 : Symbol(k4, Decl(file.tsx, 40, 3))
+>SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 33, 1))
+>a : Symbol(a, Decl(file.tsx, 40, 25))
+>b : Symbol(b, Decl(file.tsx, 40, 32))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 33, 1))
// Error
let k5 = <>> ;
->k5 : Symbol(k5, Decl(file.tsx, 41, 3))
->SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 31, 1))
->a : Symbol(a, Decl(file.tsx, 41, 25))
->b : Symbol(b, Decl(file.tsx, 41, 32))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 31, 1))
+>k5 : Symbol(k5, Decl(file.tsx, 43, 3))
+>SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 33, 1))
+>a : Symbol(a, Decl(file.tsx, 43, 25))
+>b : Symbol(b, Decl(file.tsx, 43, 32))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>SingleChildComp : Symbol(SingleChildComp, Decl(file.tsx, 33, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.types b/tests/baselines/reference/checkJsxChildrenProperty14.types
index 462991d4777c3..630c5c5ca489d 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty14.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty14.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt
index bd58dea1368da..9e1d81deb5624 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt
@@ -1,12 +1,14 @@
-file.tsx(10,17): error TS2322: Type '{ children: Element; }' is not assignable to type 'IntrinsicAttributes'.
+file.tsx(12,17): error TS2322: Type '{ children: Element; }' is not assignable to type 'IntrinsicAttributes'.
Property 'children' does not exist on type 'IntrinsicAttributes'.
-file.tsx(11,13): error TS2322: Type '{ children: Element; key: string; }' is not assignable to type 'IntrinsicAttributes'.
+file.tsx(13,13): error TS2322: Type '{ children: Element; key: string; }' is not assignable to type 'IntrinsicAttributes'.
Property 'children' does not exist on type 'IntrinsicAttributes'.
-file.tsx(12,13): error TS2322: Type '{ children: Element[]; key: string; }' is not assignable to type 'IntrinsicAttributes'.
+file.tsx(14,13): error TS2322: Type '{ children: Element[]; key: string; }' is not assignable to type 'IntrinsicAttributes'.
Property 'children' does not exist on type 'IntrinsicAttributes'.
==== file.tsx (3 errors) ====
+ ///
+
import React = require('react');
const Tag = (x: {}) =>
;
diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.js b/tests/baselines/reference/checkJsxChildrenProperty15.js
index 69798d43b296e..d5c2fe11fcdc5 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty15.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty15.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const Tag = (x: {}) =>
;
@@ -17,6 +19,7 @@ const k5 =
;
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var Tag = function (x) { return
; };
diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.symbols b/tests/baselines/reference/checkJsxChildrenProperty15.symbols
index 771d3d7eff87c..0c3de71e88b76 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty15.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty15.symbols
@@ -1,48 +1,50 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const Tag = (x: {}) =>
;
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
->x : Symbol(x, Decl(file.tsx, 2, 13))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
+>x : Symbol(x, Decl(file.tsx, 4, 13))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
// OK
const k1 = ;
->k1 : Symbol(k1, Decl(file.tsx, 5, 5))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
+>k1 : Symbol(k1, Decl(file.tsx, 7, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
const k2 = ;
->k2 : Symbol(k2, Decl(file.tsx, 6, 5))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
+>k2 : Symbol(k2, Decl(file.tsx, 8, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
// Not OK (excess children)
const k3 = } />;
->k3 : Symbol(k3, Decl(file.tsx, 9, 5))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
->children : Symbol(children, Decl(file.tsx, 9, 15))
+>k3 : Symbol(k3, Decl(file.tsx, 11, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
+>children : Symbol(children, Decl(file.tsx, 11, 15))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
const k4 =
;
->k4 : Symbol(k4, Decl(file.tsx, 10, 5))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
->key : Symbol(key, Decl(file.tsx, 10, 15))
+>k4 : Symbol(k4, Decl(file.tsx, 12, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
+>key : Symbol(key, Decl(file.tsx, 12, 15))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
const k5 =
;
->k5 : Symbol(k5, Decl(file.tsx, 11, 5))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
->key : Symbol(key, Decl(file.tsx, 11, 15))
+>k5 : Symbol(k5, Decl(file.tsx, 13, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
+>key : Symbol(key, Decl(file.tsx, 13, 15))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->Tag : Symbol(Tag, Decl(file.tsx, 2, 5))
+>Tag : Symbol(Tag, Decl(file.tsx, 4, 5))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.types b/tests/baselines/reference/checkJsxChildrenProperty15.types
index 1e61ac589ba7d..28236d79b0292 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty15.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty15.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
index 51b0362c90e27..906e96320a1bd 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
@@ -1,12 +1,14 @@
-file.tsx(14,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
-file.tsx(17,11): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten.
-file.tsx(31,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
-file.tsx(37,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
-file.tsx(43,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
-file.tsx(49,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
+file.tsx(16,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
+file.tsx(19,11): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten.
+file.tsx(33,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
+file.tsx(39,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
+file.tsx(45,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
+file.tsx(51,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
==== file.tsx (6 errors) ====
+ ///
+
import React = require('react');
interface Prop {
@@ -23,7 +25,7 @@ file.tsx(49,6): error TS2746: This JSX tag's 'children' prop expects a single ch
let k = ;
~~~~
!!! error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
-!!! related TS2728 file.tsx:6:5: 'children' is declared here.
+!!! related TS2728 file.tsx:8:5: 'children' is declared here.
let k0 =
diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.js b/tests/baselines/reference/checkJsxChildrenProperty2.js
index b609be2a5cc68..83942d3600ed7 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty2.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -57,6 +59,7 @@ let k5 =
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
function Comp(p) {
diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.symbols b/tests/baselines/reference/checkJsxChildrenProperty2.symbols
index 5a97da007b5eb..e3f1f34fa62e2 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty2.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty2.symbols
@@ -1,105 +1,107 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: string | JSX.Element
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->p : Symbol(p, Decl(file.tsx, 8, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>p : Symbol(p, Decl(file.tsx, 10, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 8, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 10, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// Error: missing children
let k = ;
->k : Symbol(k, Decl(file.tsx, 13, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 13, 13))
->b : Symbol(b, Decl(file.tsx, 13, 20))
+>k : Symbol(k, Decl(file.tsx, 15, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 15, 13))
+>b : Symbol(b, Decl(file.tsx, 15, 20))
let k0 =
->k0 : Symbol(k0, Decl(file.tsx, 15, 3))
+>k0 : Symbol(k0, Decl(file.tsx, 17, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 16, 9))
->b : Symbol(b, Decl(file.tsx, 16, 16))
->children : Symbol(children, Decl(file.tsx, 16, 23))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 18, 9))
+>b : Symbol(b, Decl(file.tsx, 18, 16))
+>children : Symbol(children, Decl(file.tsx, 18, 23))
hi hi hi!
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
let o = {
->o : Symbol(o, Decl(file.tsx, 20, 3))
+>o : Symbol(o, Decl(file.tsx, 22, 3))
children:"Random"
->children : Symbol(children, Decl(file.tsx, 20, 9))
+>children : Symbol(children, Decl(file.tsx, 22, 9))
}
let k1 =
->k1 : Symbol(k1, Decl(file.tsx, 23, 3))
+>k1 : Symbol(k1, Decl(file.tsx, 25, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 24, 9))
->b : Symbol(b, Decl(file.tsx, 24, 16))
->o : Symbol(o, Decl(file.tsx, 20, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 26, 9))
+>b : Symbol(b, Decl(file.tsx, 26, 16))
+>o : Symbol(o, Decl(file.tsx, 22, 3))
hi hi hi!
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
// Error: incorrect type
let k2 =
->k2 : Symbol(k2, Decl(file.tsx, 29, 3))
+>k2 : Symbol(k2, Decl(file.tsx, 31, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 30, 9))
->b : Symbol(b, Decl(file.tsx, 30, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 32, 9))
+>b : Symbol(b, Decl(file.tsx, 32, 16))
My Div
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
{(name: string) => My name {name}
}
->name : Symbol(name, Decl(file.tsx, 32, 10))
+>name : Symbol(name, Decl(file.tsx, 34, 10))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->name : Symbol(name, Decl(file.tsx, 32, 10))
+>name : Symbol(name, Decl(file.tsx, 34, 10))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
let k3 =
->k3 : Symbol(k3, Decl(file.tsx, 35, 3))
+>k3 : Symbol(k3, Decl(file.tsx, 37, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 36, 9))
->b : Symbol(b, Decl(file.tsx, 36, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 38, 9))
+>b : Symbol(b, Decl(file.tsx, 38, 16))
My Div
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -107,15 +109,15 @@ let k3 =
{1000000}
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
let k4 =
->k4 : Symbol(k4, Decl(file.tsx, 41, 3))
+>k4 : Symbol(k4, Decl(file.tsx, 43, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 42, 9))
->b : Symbol(b, Decl(file.tsx, 42, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 44, 9))
+>b : Symbol(b, Decl(file.tsx, 44, 16))
My Div
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -123,15 +125,15 @@ let k4 =
hi hi hi!
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
let k5 =
->k5 : Symbol(k5, Decl(file.tsx, 47, 3))
+>k5 : Symbol(k5, Decl(file.tsx, 49, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
->a : Symbol(a, Decl(file.tsx, 48, 9))
->b : Symbol(b, Decl(file.tsx, 48, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
+>a : Symbol(a, Decl(file.tsx, 50, 9))
+>b : Symbol(b, Decl(file.tsx, 50, 16))
My Div
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -142,5 +144,5 @@ let k5 =
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
;
->Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 8, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.types b/tests/baselines/reference/checkJsxChildrenProperty2.types
index 2107c6d54cb31..a9c682366ff57 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty2.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.js b/tests/baselines/reference/checkJsxChildrenProperty3.js
index 6e5d5407baa78..01755367185b6 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty3.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface IUser {
@@ -43,6 +45,7 @@ function UserName1() {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.symbols b/tests/baselines/reference/checkJsxChildrenProperty3.symbols
index 3c5afc6327db6..8b91733f8cb85 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty3.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty3.symbols
@@ -1,50 +1,52 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface IUser {
->IUser : Symbol(IUser, Decl(file.tsx, 0, 32))
+>IUser : Symbol(IUser, Decl(file.tsx, 2, 32))
Name: string;
->Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
+>Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
}
interface IFetchUserProps {
->IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 4, 1))
+>IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 6, 1))
children: (user: IUser) => JSX.Element;
->children : Symbol(IFetchUserProps.children, Decl(file.tsx, 6, 27))
->user : Symbol(user, Decl(file.tsx, 7, 15))
->IUser : Symbol(IUser, Decl(file.tsx, 0, 32))
+>children : Symbol(IFetchUserProps.children, Decl(file.tsx, 8, 27))
+>user : Symbol(user, Decl(file.tsx, 9, 15))
+>IUser : Symbol(IUser, Decl(file.tsx, 2, 32))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
}
class FetchUser extends React.Component {
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>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), Decl(react.d.ts, 161, 66))
->IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 4, 1))
+>IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 6, 1))
render() {
->render : Symbol(FetchUser.render, Decl(file.tsx, 10, 63))
+>render : Symbol(FetchUser.render, Decl(file.tsx, 12, 63))
return this.state
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
->this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>this : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
? this.props.children(this.state.result)
->this.props.children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 174, 20))
+>this.props.children : Symbol(children, Decl(file.tsx, 8, 27), Decl(react.d.ts, 174, 20))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>this : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 174, 20))
+>children : Symbol(children, Decl(file.tsx, 8, 27), Decl(react.d.ts, 174, 20))
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
->this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>this : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
: null;
@@ -53,49 +55,49 @@ class FetchUser extends React.Component {
// Ok
function UserName0() {
->UserName0 : Symbol(UserName0, Decl(file.tsx, 16, 1))
+>UserName0 : Symbol(UserName0, Decl(file.tsx, 18, 1))
return (
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
{ user => (
->user : Symbol(user, Decl(file.tsx, 22, 13))
+>user : Symbol(user, Decl(file.tsx, 24, 13))
{ user.Name }
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
->user.Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
->user : Symbol(user, Decl(file.tsx, 22, 13))
->Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
+>user.Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
+>user : Symbol(user, Decl(file.tsx, 24, 13))
+>Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
) }
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
);
}
function UserName1() {
->UserName1 : Symbol(UserName1, Decl(file.tsx, 27, 1))
+>UserName1 : Symbol(UserName1, Decl(file.tsx, 29, 1))
return (
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
{ user => (
->user : Symbol(user, Decl(file.tsx, 33, 13))
+>user : Symbol(user, Decl(file.tsx, 35, 13))
{ user.Name }
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
->user.Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
->user : Symbol(user, Decl(file.tsx, 33, 13))
->Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
+>user.Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
+>user : Symbol(user, Decl(file.tsx, 35, 13))
+>Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
) }
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
);
}
diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.types b/tests/baselines/reference/checkJsxChildrenProperty3.types
index 687c31920d34c..ec5fac460425d 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty3.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt
index 523bfb49a270b..c258e4319f669 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt
@@ -1,9 +1,11 @@
-file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'?
-file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'.
-file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'.
+file.tsx(26,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'?
+file.tsx(38,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'.
+file.tsx(41,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'.
==== file.tsx (3 errors) ====
+ ///
+
import React = require('react');
interface IUser {
@@ -30,7 +32,7 @@ file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable
{ user.NAme }
~~~~
!!! error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'?
-!!! related TS2728 file.tsx:4:5: 'Name' is declared here.
+!!! related TS2728 file.tsx:6:5: 'Name' is declared here.
) }
);
@@ -49,7 +51,7 @@ file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable
) }
~~~~~~~~~~~~~
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'.
-!!! related TS6212 file.tsx:36:15: Did you mean to call this expression?
+!!! related TS6212 file.tsx:38:15: Did you mean to call this expression?
{ user => (
~~~~~~~~~
{ user.Name }
@@ -57,7 +59,7 @@ file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable
) }
~~~~~~~~~~~~~
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'.
-!!! related TS6212 file.tsx:39:15: Did you mean to call this expression?
+!!! related TS6212 file.tsx:41:15: Did you mean to call this expression?
);
}
\ No newline at end of file
diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.js b/tests/baselines/reference/checkJsxChildrenProperty4.js
index 1c11fbdb15b27..2291cfaac562b 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty4.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty4.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface IUser {
@@ -48,6 +50,7 @@ function UserName1() {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.symbols b/tests/baselines/reference/checkJsxChildrenProperty4.symbols
index 271b41b652e27..8da8d9b79a94f 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty4.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty4.symbols
@@ -1,50 +1,52 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface IUser {
->IUser : Symbol(IUser, Decl(file.tsx, 0, 32))
+>IUser : Symbol(IUser, Decl(file.tsx, 2, 32))
Name: string;
->Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
+>Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
}
interface IFetchUserProps {
->IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 4, 1))
+>IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 6, 1))
children: (user: IUser) => JSX.Element;
->children : Symbol(IFetchUserProps.children, Decl(file.tsx, 6, 27))
->user : Symbol(user, Decl(file.tsx, 7, 15))
->IUser : Symbol(IUser, Decl(file.tsx, 0, 32))
+>children : Symbol(IFetchUserProps.children, Decl(file.tsx, 8, 27))
+>user : Symbol(user, Decl(file.tsx, 9, 15))
+>IUser : Symbol(IUser, Decl(file.tsx, 2, 32))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
}
class FetchUser extends React.Component {
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>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), Decl(react.d.ts, 161, 66))
->IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 4, 1))
+>IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 6, 1))
render() {
->render : Symbol(FetchUser.render, Decl(file.tsx, 10, 63))
+>render : Symbol(FetchUser.render, Decl(file.tsx, 12, 63))
return this.state
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
->this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>this : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
? this.props.children(this.state.result)
->this.props.children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 174, 20))
+>this.props.children : Symbol(children, Decl(file.tsx, 8, 27), Decl(react.d.ts, 174, 20))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>this : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 174, 20))
+>children : Symbol(children, Decl(file.tsx, 8, 27), Decl(react.d.ts, 174, 20))
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
->this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>this : Symbol(FetchUser, Decl(file.tsx, 10, 1))
>state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
: null;
@@ -53,60 +55,60 @@ class FetchUser extends React.Component {
// Error
function UserName() {
->UserName : Symbol(UserName, Decl(file.tsx, 16, 1))
+>UserName : Symbol(UserName, Decl(file.tsx, 18, 1))
return (
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
{ user => (
->user : Symbol(user, Decl(file.tsx, 22, 13))
+>user : Symbol(user, Decl(file.tsx, 24, 13))
{ user.NAme }
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
->user : Symbol(user, Decl(file.tsx, 22, 13))
+>user : Symbol(user, Decl(file.tsx, 24, 13))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
) }
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
);
}
function UserName1() {
->UserName1 : Symbol(UserName1, Decl(file.tsx, 27, 1))
+>UserName1 : Symbol(UserName1, Decl(file.tsx, 29, 1))
return (
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
{ user => (
->user : Symbol(user, Decl(file.tsx, 35, 13))
+>user : Symbol(user, Decl(file.tsx, 37, 13))
{ user.Name }
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
->user.Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
->user : Symbol(user, Decl(file.tsx, 35, 13))
->Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
+>user.Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
+>user : Symbol(user, Decl(file.tsx, 37, 13))
+>Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
) }
{ user => (
->user : Symbol(user, Decl(file.tsx, 38, 13))
+>user : Symbol(user, Decl(file.tsx, 40, 13))
{ user.Name }
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
->user.Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
->user : Symbol(user, Decl(file.tsx, 38, 13))
->Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
+>user.Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
+>user : Symbol(user, Decl(file.tsx, 40, 13))
+>Name : Symbol(IUser.Name, Decl(file.tsx, 4, 17))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
) }
->FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
+>FetchUser : Symbol(FetchUser, Decl(file.tsx, 10, 1))
);
}
diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.types b/tests/baselines/reference/checkJsxChildrenProperty4.types
index d08a39c798765..2881a1a0d6712 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty4.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty4.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt
index a33a925ab34e8..de66a879fd698 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt
@@ -1,9 +1,11 @@
-file.tsx(20,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
-file.tsx(25,9): error TS2740: Type 'ReactElement' is missing the following properties from type 'Button': render, setState, forceUpdate, state, and 2 more.
-file.tsx(29,10): error TS2740: Type 'typeof Button' is missing the following properties from type 'Button': render, setState, forceUpdate, props, and 3 more.
+file.tsx(22,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
+file.tsx(27,9): error TS2740: Type 'ReactElement' is missing the following properties from type 'Button': render, setState, forceUpdate, state, and 2 more.
+file.tsx(31,10): error TS2740: Type 'typeof Button' is missing the following properties from type 'Button': render, setState, forceUpdate, props, and 3 more.
==== file.tsx (3 errors) ====
+ ///
+
import React = require('react');
interface Prop {
@@ -26,7 +28,7 @@ file.tsx(29,10): error TS2740: Type 'typeof Button' is missing the following pro
let k = ;
~~~~
!!! error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
-!!! related TS2728 file.tsx:6:5: 'children' is declared here.
+!!! related TS2728 file.tsx:8:5: 'children' is declared here.
// Error: JSX.element is not the same as JSX.ElementClass
let k1 =
@@ -34,12 +36,12 @@ file.tsx(29,10): error TS2740: Type 'typeof Button' is missing the following pro
~~~~~~~~~~
!!! error TS2740: Type 'ReactElement' is missing the following properties from type 'Button': render, setState, forceUpdate, state, and 2 more.
-!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & Prop'
+!!! related TS6500 file.tsx:8:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & Prop'
;
let k2 =
{Button}
~~~~~~
!!! error TS2740: Type 'typeof Button' is missing the following properties from type 'Button': render, setState, forceUpdate, props, and 3 more.
-!!! related TS6213 file.tsx:29:10: Did you mean to use 'new' with this expression?
+!!! related TS6213 file.tsx:31:10: Did you mean to use 'new' with this expression?
;
\ No newline at end of file
diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.js b/tests/baselines/reference/checkJsxChildrenProperty5.js
index ab267092251f2..ec7e361699748 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty5.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty5.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -34,6 +36,7 @@ let k2 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.symbols b/tests/baselines/reference/checkJsxChildrenProperty5.symbols
index fcfbb7bdcf21c..3e02396998f0c 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty5.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty5.symbols
@@ -1,31 +1,33 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: Button;
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 48))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 48))
return (My Button
)
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -34,51 +36,51 @@ class Button extends React.Component {
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 12, 1))
->p : Symbol(p, Decl(file.tsx, 14, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 14, 1))
+>p : Symbol(p, Decl(file.tsx, 16, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 14, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 16, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// Error: no children specified
let k = ;
->k : Symbol(k, Decl(file.tsx, 19, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 12, 1))
->a : Symbol(a, Decl(file.tsx, 19, 13))
->b : Symbol(b, Decl(file.tsx, 19, 20))
+>k : Symbol(k, Decl(file.tsx, 21, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 14, 1))
+>a : Symbol(a, Decl(file.tsx, 21, 13))
+>b : Symbol(b, Decl(file.tsx, 21, 20))
// Error: JSX.element is not the same as JSX.ElementClass
let k1 =
->k1 : Symbol(k1, Decl(file.tsx, 22, 3))
+>k1 : Symbol(k1, Decl(file.tsx, 24, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 12, 1))
->a : Symbol(a, Decl(file.tsx, 23, 9))
->b : Symbol(b, Decl(file.tsx, 23, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 14, 1))
+>a : Symbol(a, Decl(file.tsx, 25, 9))
+>b : Symbol(b, Decl(file.tsx, 25, 16))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
;
->Comp : Symbol(Comp, Decl(file.tsx, 12, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 14, 1))
let k2 =
->k2 : Symbol(k2, Decl(file.tsx, 26, 3))
+>k2 : Symbol(k2, Decl(file.tsx, 28, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 12, 1))
->a : Symbol(a, Decl(file.tsx, 27, 9))
->b : Symbol(b, Decl(file.tsx, 27, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 14, 1))
+>a : Symbol(a, Decl(file.tsx, 29, 9))
+>b : Symbol(b, Decl(file.tsx, 29, 16))
{Button}
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
;
->Comp : Symbol(Comp, Decl(file.tsx, 12, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 14, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.types b/tests/baselines/reference/checkJsxChildrenProperty5.types
index e6548450acaf4..37eb5aed18409 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty5.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty5.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty6.js b/tests/baselines/reference/checkJsxChildrenProperty6.js
index 2acd307d3ec36..b1f6ca6320aaa 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty6.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty6.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -47,6 +49,7 @@ let k4 = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty6.symbols b/tests/baselines/reference/checkJsxChildrenProperty6.symbols
index 61d2c033b781a..ea50abb1a721c 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty6.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty6.symbols
@@ -1,20 +1,22 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: JSX.Element | JSX.Element[];
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
@@ -22,13 +24,13 @@ interface Prop {
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 48))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 48))
return (My Button
)
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -37,8 +39,8 @@ class Button extends React.Component {
}
function AnotherButton(p: any) {
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->p : Symbol(p, Decl(file.tsx, 14, 23))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>p : Symbol(p, Decl(file.tsx, 16, 23))
return Just Another Button ;
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
@@ -46,73 +48,73 @@ function AnotherButton(p: any) {
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// Ok
let k1 =
->k1 : Symbol(k1, Decl(file.tsx, 23, 3))
+>k1 : Symbol(k1, Decl(file.tsx, 25, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 24, 9))
->b : Symbol(b, Decl(file.tsx, 24, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 26, 9))
+>b : Symbol(b, Decl(file.tsx, 26, 16))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
;
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k2 =
->k2 : Symbol(k2, Decl(file.tsx, 29, 3))
+>k2 : Symbol(k2, Decl(file.tsx, 31, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 30, 9))
->b : Symbol(b, Decl(file.tsx, 30, 16))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 32, 9))
+>b : Symbol(b, Decl(file.tsx, 32, 16))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
;
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k3 =
->k3 : Symbol(k3, Decl(file.tsx, 38, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 38, 14))
->b : Symbol(b, Decl(file.tsx, 38, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>k3 : Symbol(k3, Decl(file.tsx, 40, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 40, 14))
+>b : Symbol(b, Decl(file.tsx, 40, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
;
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k4 = ;
->k4 : Symbol(k4, Decl(file.tsx, 42, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 42, 14))
->b : Symbol(b, Decl(file.tsx, 42, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k4 : Symbol(k4, Decl(file.tsx, 44, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 44, 14))
+>b : Symbol(b, Decl(file.tsx, 44, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty6.types b/tests/baselines/reference/checkJsxChildrenProperty6.types
index ce5c43d4bdc95..2be18c9fc2072 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty6.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty6.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt
index c593701198647..93ff80855c869 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt
+++ b/tests/baselines/reference/checkJsxChildrenProperty7.errors.txt
@@ -1,9 +1,11 @@
-file.tsx(24,40): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
-file.tsx(26,22): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
-file.tsx(27,30): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
+file.tsx(26,40): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
+file.tsx(28,22): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
+file.tsx(29,30): error TS2747: 'Comp' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element | Element[]'.
==== file.tsx (3 errors) ====
+ ///
+
import React = require('react');
interface Prop {
diff --git a/tests/baselines/reference/checkJsxChildrenProperty7.js b/tests/baselines/reference/checkJsxChildrenProperty7.js
index ffecaeb8e9e19..7f8913f3a4490 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty7.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty7.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -32,6 +34,7 @@ let k3 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty7.symbols b/tests/baselines/reference/checkJsxChildrenProperty7.symbols
index cb4ddac3fd8fd..aa6654eacb232 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty7.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty7.symbols
@@ -1,20 +1,22 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: JSX.Element | JSX.Element[];
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
@@ -22,13 +24,13 @@ interface Prop {
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 48))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 48))
return (My Button
)
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -37,8 +39,8 @@ class Button extends React.Component {
}
function AnotherButton(p: any) {
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->p : Symbol(p, Decl(file.tsx, 14, 23))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>p : Symbol(p, Decl(file.tsx, 16, 23))
return Just Another Button ;
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
@@ -46,47 +48,47 @@ function AnotherButton(p: any) {
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// Error: whitespaces matters
let k1 = ;
->k1 : Symbol(k1, Decl(file.tsx, 23, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 23, 14))
->b : Symbol(b, Decl(file.tsx, 23, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k1 : Symbol(k1, Decl(file.tsx, 25, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 25, 14))
+>b : Symbol(b, Decl(file.tsx, 25, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k2 =
->k2 : Symbol(k2, Decl(file.tsx, 24, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 24, 14))
->b : Symbol(b, Decl(file.tsx, 24, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>k2 : Symbol(k2, Decl(file.tsx, 26, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 26, 14))
+>b : Symbol(b, Decl(file.tsx, 26, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
;
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k3 =
->k3 : Symbol(k3, Decl(file.tsx, 26, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 26, 14))
->b : Symbol(b, Decl(file.tsx, 26, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>k3 : Symbol(k3, Decl(file.tsx, 28, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 28, 14))
+>b : Symbol(b, Decl(file.tsx, 28, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
;
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty7.types b/tests/baselines/reference/checkJsxChildrenProperty7.types
index fed71f80cf95c..565d8513fb066 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty7.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty7.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty8.js b/tests/baselines/reference/checkJsxChildrenProperty8.js
index 9241afeba1eb4..a66deaa7bfc90 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty8.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty8.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -33,6 +35,7 @@ let k4 = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/checkJsxChildrenProperty8.symbols b/tests/baselines/reference/checkJsxChildrenProperty8.symbols
index f0296b3c06bd6..4bb208727db69 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty8.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty8.symbols
@@ -1,20 +1,22 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string,
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
children: string | JSX.Element | (string | JSX.Element)[];
->children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
+>children : Symbol(Prop.children, Decl(file.tsx, 6, 14))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
@@ -22,13 +24,13 @@ interface Prop {
}
class Button extends React.Component {
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(Button.render, Decl(file.tsx, 8, 48))
+>render : Symbol(Button.render, Decl(file.tsx, 10, 48))
return (My Button
)
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -37,8 +39,8 @@ class Button extends React.Component {
}
function AnotherButton(p: any) {
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->p : Symbol(p, Decl(file.tsx, 14, 23))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>p : Symbol(p, Decl(file.tsx, 16, 23))
return Just Another Button ;
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
@@ -46,55 +48,55 @@ function AnotherButton(p: any) {
}
function Comp(p: Prop) {
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
return {p.b}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
->p : Symbol(p, Decl(file.tsx, 18, 14))
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>p.b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
+>p : Symbol(p, Decl(file.tsx, 20, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
// OK
let k1 = ;
->k1 : Symbol(k1, Decl(file.tsx, 23, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 23, 14))
->b : Symbol(b, Decl(file.tsx, 23, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k1 : Symbol(k1, Decl(file.tsx, 25, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 25, 14))
+>b : Symbol(b, Decl(file.tsx, 25, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k2 =
->k2 : Symbol(k2, Decl(file.tsx, 24, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 24, 14))
->b : Symbol(b, Decl(file.tsx, 24, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>k2 : Symbol(k2, Decl(file.tsx, 26, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 26, 14))
+>b : Symbol(b, Decl(file.tsx, 26, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
;
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k3 =
->k3 : Symbol(k3, Decl(file.tsx, 26, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 26, 14))
->b : Symbol(b, Decl(file.tsx, 26, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
+>k3 : Symbol(k3, Decl(file.tsx, 28, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 28, 14))
+>b : Symbol(b, Decl(file.tsx, 28, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
;
->AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 12, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>AnotherButton : Symbol(AnotherButton, Decl(file.tsx, 14, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
let k4 = ;
->k4 : Symbol(k4, Decl(file.tsx, 28, 3))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
->a : Symbol(a, Decl(file.tsx, 28, 14))
->b : Symbol(b, Decl(file.tsx, 28, 21))
->Button : Symbol(Button, Decl(file.tsx, 6, 1))
->Comp : Symbol(Comp, Decl(file.tsx, 16, 1))
+>k4 : Symbol(k4, Decl(file.tsx, 30, 3))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
+>a : Symbol(a, Decl(file.tsx, 30, 14))
+>b : Symbol(b, Decl(file.tsx, 30, 21))
+>Button : Symbol(Button, Decl(file.tsx, 8, 1))
+>Comp : Symbol(Comp, Decl(file.tsx, 18, 1))
diff --git a/tests/baselines/reference/checkJsxChildrenProperty8.types b/tests/baselines/reference/checkJsxChildrenProperty8.types
index a0ad4905882ab..80b6bfad4e568 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty8.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty8.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxChildrenProperty9.js b/tests/baselines/reference/checkJsxChildrenProperty9.js
index 6753b2c47b67b..d05f2f3df20cf 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty9.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty9.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
// OK
@@ -10,6 +12,7 @@ let k3 = {1} {"That is a number"}
;
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
// OK
diff --git a/tests/baselines/reference/checkJsxChildrenProperty9.symbols b/tests/baselines/reference/checkJsxChildrenProperty9.symbols
index bcdb7b70c1aea..c6c8e9eeac928 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty9.symbols
+++ b/tests/baselines/reference/checkJsxChildrenProperty9.symbols
@@ -1,12 +1,14 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
// OK
let k1 =
Hello world
;
->k1 : Symbol(k1, Decl(file.tsx, 3, 3))
+>k1 : Symbol(k1, Decl(file.tsx, 5, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
@@ -15,18 +17,18 @@ let k1 =
Hello world ;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
let k2 =
Hello {(user: any) => {user.name} };
->k2 : Symbol(k2, Decl(file.tsx, 4, 3))
+>k2 : Symbol(k2, Decl(file.tsx, 6, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
->user : Symbol(user, Decl(file.tsx, 4, 34))
+>user : Symbol(user, Decl(file.tsx, 6, 34))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
->user : Symbol(user, Decl(file.tsx, 4, 34))
+>user : Symbol(user, Decl(file.tsx, 6, 34))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
let k3 = {1} {"That is a number"}
;
->k3 : Symbol(k3, Decl(file.tsx, 5, 3))
+>k3 : Symbol(k3, Decl(file.tsx, 7, 3))
>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/checkJsxChildrenProperty9.types b/tests/baselines/reference/checkJsxChildrenProperty9.types
index c82cb04bf2341..85c297d0e666d 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty9.types
+++ b/tests/baselines/reference/checkJsxChildrenProperty9.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt
index 52b519f32939a..7b7808b7d2291 100644
--- a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt
+++ b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.errors.txt
@@ -1,9 +1,10 @@
-file.tsx(13,54): error TS2322: Type '(a: { x: string; }) => string' is not assignable to type '((a: { x: string; }) => string) & ((cur: { x: string; }) => { x: string; })'.
+file.tsx(14,54): error TS2322: Type '(a: { x: string; }) => string' is not assignable to type '((a: { x: string; }) => string) & ((cur: { x: string; }) => { x: string; })'.
Type '(a: { x: string; }) => string' is not assignable to type '(cur: { x: string; }) => { x: string; }'.
Type 'string' is not assignable to type '{ x: string; }'.
==== file.tsx (1 errors) ====
+ ///
import * as React from "react";
interface BaseProps {
initialValues: T;
@@ -21,4 +22,4 @@ file.tsx(13,54): error TS2322: Type '(a: { x: string; }) => string' is not assig
!!! error TS2322: Type '(a: { x: string; }) => string' is not assignable to type '((a: { x: string; }) => string) & ((cur: { x: string; }) => { x: string; })'.
!!! error TS2322: Type '(a: { x: string; }) => string' is not assignable to type '(cur: { x: string; }) => { x: string; }'.
!!! error TS2322: Type 'string' is not assignable to type '{ x: string; }'.
-!!! related TS6500 file.tsx:13:54: The expected type comes from property 'nextValues' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes string; }, { x: string; }>> & { initialValues: { x: string; }; nextValues: (a: { x: string; }) => string; } & BaseProps<{ x: string; }> & { children?: ReactNode; }'
\ No newline at end of file
+!!! related TS6500 file.tsx:14:54: The expected type comes from property 'nextValues' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes string; }, { x: string; }>> & { initialValues: { x: string; }; nextValues: (a: { x: string; }) => string; } & BaseProps<{ x: string; }> & { children?: ReactNode; }'
\ No newline at end of file
diff --git a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js
index e6bbf28d39b9d..56445009fa2ef 100644
--- a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js
+++ b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js
@@ -1,6 +1,7 @@
//// [tests/cases/conformance/jsx/checkJsxGenericTagHasCorrectInferences.tsx] ////
//// [file.tsx]
+///
import * as React from "react";
interface BaseProps {
initialValues: T;
@@ -51,6 +52,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
+///
var React = __importStar(require("react"));
var a = ; // No error
var b = ; // No error - Values should be reinstantiated with `number` (since `object` is a default, not a constraint)
diff --git a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.symbols b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.symbols
index 86f1b99ea6d4e..39cd745009d0f 100644
--- a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.symbols
+++ b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.symbols
@@ -1,76 +1,77 @@
//// [tests/cases/conformance/jsx/checkJsxGenericTagHasCorrectInferences.tsx] ////
=== file.tsx ===
+///
import * as React from "react";
->React : Symbol(React, Decl(file.tsx, 0, 6))
+>React : Symbol(React, Decl(file.tsx, 1, 6))
interface BaseProps {
->BaseProps : Symbol(BaseProps, Decl(file.tsx, 0, 31))
->T : Symbol(T, Decl(file.tsx, 1, 20))
+>BaseProps : Symbol(BaseProps, Decl(file.tsx, 1, 31))
+>T : Symbol(T, Decl(file.tsx, 2, 20))
initialValues: T;
->initialValues : Symbol(BaseProps.initialValues, Decl(file.tsx, 1, 24))
->T : Symbol(T, Decl(file.tsx, 1, 20))
+>initialValues : Symbol(BaseProps.initialValues, Decl(file.tsx, 2, 24))
+>T : Symbol(T, Decl(file.tsx, 2, 20))
nextValues: (cur: T) => T;
->nextValues : Symbol(BaseProps.nextValues, Decl(file.tsx, 2, 19))
->cur : Symbol(cur, Decl(file.tsx, 3, 15))
->T : Symbol(T, Decl(file.tsx, 1, 20))
->T : Symbol(T, Decl(file.tsx, 1, 20))
+>nextValues : Symbol(BaseProps.nextValues, Decl(file.tsx, 3, 19))
+>cur : Symbol(cur, Decl(file.tsx, 4, 15))
+>T : Symbol(T, Decl(file.tsx, 2, 20))
+>T : Symbol(T, Decl(file.tsx, 2, 20))
}
declare class GenericComponent extends React.Component, {}> {
->GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 4, 1))
->Props : Symbol(Props, Decl(file.tsx, 5, 31))
->Values : Symbol(Values, Decl(file.tsx, 5, 42))
+>GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 5, 1))
+>Props : Symbol(Props, Decl(file.tsx, 6, 31))
+>Values : Symbol(Values, Decl(file.tsx, 6, 42))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
->React : Symbol(React, Decl(file.tsx, 0, 6))
+>React : Symbol(React, Decl(file.tsx, 1, 6))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
->Props : Symbol(Props, Decl(file.tsx, 5, 31))
->BaseProps : Symbol(BaseProps, Decl(file.tsx, 0, 31))
->Values : Symbol(Values, Decl(file.tsx, 5, 42))
+>Props : Symbol(Props, Decl(file.tsx, 6, 31))
+>BaseProps : Symbol(BaseProps, Decl(file.tsx, 1, 31))
+>Values : Symbol(Values, Decl(file.tsx, 6, 42))
iv: Values;
->iv : Symbol(GenericComponent.iv, Decl(file.tsx, 5, 116))
->Values : Symbol(Values, Decl(file.tsx, 5, 42))
+>iv : Symbol(GenericComponent.iv, Decl(file.tsx, 6, 116))
+>Values : Symbol(Values, Decl(file.tsx, 6, 42))
}
let a = a} />; // No error
->a : Symbol(a, Decl(file.tsx, 9, 3))
->GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 4, 1))
->initialValues : Symbol(initialValues, Decl(file.tsx, 9, 25))
->x : Symbol(x, Decl(file.tsx, 9, 42))
->nextValues : Symbol(nextValues, Decl(file.tsx, 9, 52))
->a : Symbol(a, Decl(file.tsx, 9, 65))
->a : Symbol(a, Decl(file.tsx, 9, 65))
-
-let b = a} />; // No error - Values should be reinstantiated with `number` (since `object` is a default, not a constraint)
->b : Symbol(b, Decl(file.tsx, 10, 3))
->GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 4, 1))
+>a : Symbol(a, Decl(file.tsx, 10, 3))
+>GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 5, 1))
>initialValues : Symbol(initialValues, Decl(file.tsx, 10, 25))
->nextValues : Symbol(nextValues, Decl(file.tsx, 10, 44))
->a : Symbol(a, Decl(file.tsx, 10, 57))
->a : Symbol(a, Decl(file.tsx, 10, 57))
+>x : Symbol(x, Decl(file.tsx, 10, 42))
+>nextValues : Symbol(nextValues, Decl(file.tsx, 10, 52))
+>a : Symbol(a, Decl(file.tsx, 10, 65))
+>a : Symbol(a, Decl(file.tsx, 10, 65))
-let c = ({ x: a.x })} />; // No Error
->c : Symbol(c, Decl(file.tsx, 11, 3))
->GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 4, 1))
+let b = a} />; // No error - Values should be reinstantiated with `number` (since `object` is a default, not a constraint)
+>b : Symbol(b, Decl(file.tsx, 11, 3))
+>GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 5, 1))
>initialValues : Symbol(initialValues, Decl(file.tsx, 11, 25))
->x : Symbol(x, Decl(file.tsx, 11, 42))
->nextValues : Symbol(nextValues, Decl(file.tsx, 11, 52))
->a : Symbol(a, Decl(file.tsx, 11, 65))
->x : Symbol(x, Decl(file.tsx, 11, 72))
->a.x : Symbol(x, Decl(file.tsx, 11, 42))
->a : Symbol(a, Decl(file.tsx, 11, 65))
->x : Symbol(x, Decl(file.tsx, 11, 42))
+>nextValues : Symbol(nextValues, Decl(file.tsx, 11, 44))
+>a : Symbol(a, Decl(file.tsx, 11, 57))
+>a : Symbol(a, Decl(file.tsx, 11, 57))
-let d = a.x} />; // Error - `string` is not assignable to `{x: string}`
->d : Symbol(d, Decl(file.tsx, 12, 3))
->GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 4, 1))
+let c = ({ x: a.x })} />; // No Error
+>c : Symbol(c, Decl(file.tsx, 12, 3))
+>GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 5, 1))
>initialValues : Symbol(initialValues, Decl(file.tsx, 12, 25))
>x : Symbol(x, Decl(file.tsx, 12, 42))
>nextValues : Symbol(nextValues, Decl(file.tsx, 12, 52))
>a : Symbol(a, Decl(file.tsx, 12, 65))
+>x : Symbol(x, Decl(file.tsx, 12, 72))
>a.x : Symbol(x, Decl(file.tsx, 12, 42))
>a : Symbol(a, Decl(file.tsx, 12, 65))
>x : Symbol(x, Decl(file.tsx, 12, 42))
+let d = a.x} />; // Error - `string` is not assignable to `{x: string}`
+>d : Symbol(d, Decl(file.tsx, 13, 3))
+>GenericComponent : Symbol(GenericComponent, Decl(file.tsx, 5, 1))
+>initialValues : Symbol(initialValues, Decl(file.tsx, 13, 25))
+>x : Symbol(x, Decl(file.tsx, 13, 42))
+>nextValues : Symbol(nextValues, Decl(file.tsx, 13, 52))
+>a : Symbol(a, Decl(file.tsx, 13, 65))
+>a.x : Symbol(x, Decl(file.tsx, 13, 42))
+>a : Symbol(a, Decl(file.tsx, 13, 65))
+>x : Symbol(x, Decl(file.tsx, 13, 42))
+
diff --git a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.types b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.types
index 519b58df460c1..332aff90081a5 100644
--- a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.types
+++ b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.types
@@ -1,6 +1,7 @@
//// [tests/cases/conformance/jsx/checkJsxGenericTagHasCorrectInferences.tsx] ////
=== file.tsx ===
+///
import * as React from "react";
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/commentEmittingInPreserveJsx1.js b/tests/baselines/reference/commentEmittingInPreserveJsx1.js
index 70b9f00eb3f8f..51d19427646a2 100644
--- a/tests/baselines/reference/commentEmittingInPreserveJsx1.js
+++ b/tests/baselines/reference/commentEmittingInPreserveJsx1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
@@ -34,6 +36,7 @@ import React = require('react');
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
diff --git a/tests/baselines/reference/commentEmittingInPreserveJsx1.symbols b/tests/baselines/reference/commentEmittingInPreserveJsx1.symbols
index 403c1fa4b893e..95b9f32fdbed6 100644
--- a/tests/baselines/reference/commentEmittingInPreserveJsx1.symbols
+++ b/tests/baselines/reference/commentEmittingInPreserveJsx1.symbols
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
diff --git a/tests/baselines/reference/commentEmittingInPreserveJsx1.types b/tests/baselines/reference/commentEmittingInPreserveJsx1.types
index b993270d54d38..d4f2698eb24ab 100644
--- a/tests/baselines/reference/commentEmittingInPreserveJsx1.types
+++ b/tests/baselines/reference/commentEmittingInPreserveJsx1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
index fa606b616e89c..1e772a07b3bc7 100644
--- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
+++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
@@ -1,38 +1,40 @@
-file.tsx(29,56): error TS2769: No overload matches this call.
+file.tsx(31,56): error TS2769: No overload matches this call.
Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error.
Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'.
Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error.
Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
-file.tsx(30,13): error TS2769: No overload matches this call.
+file.tsx(32,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error.
Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'.
Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error.
Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
-file.tsx(31,43): error TS2769: No overload matches this call.
+file.tsx(33,43): error TS2769: No overload matches this call.
Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error.
Type '{ extra: true; goTo: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'.
Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error.
Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
-file.tsx(32,13): error TS2769: No overload matches this call.
+file.tsx(34,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error.
Type '{ goTo: string; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'goTo' does not exist on type 'IntrinsicAttributes & ButtonProps'.
Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error.
Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
-file.tsx(35,57): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
+file.tsx(37,57): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'.
-file.tsx(38,44): error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
+file.tsx(40,44): error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
==== file.tsx (6 errors) ====
+ ///
+
import React = require('react')
declare function log(...args: any[]): void;
diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js
index 99e9a39734182..52d48d8a71e63 100644
--- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js
+++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function log(...args: any[]): void;
@@ -43,6 +45,7 @@ const d1 =
; // goTo has type "home" |
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.MainButton = MainButton;
exports.NoOverload = NoOverload;
diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.symbols b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.symbols
index a9ae1b83ab99f..21ec52b71aa29 100644
--- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.symbols
+++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.symbols
@@ -1,138 +1,140 @@
//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function log(...args: any[]): void;
->log : Symbol(log, Decl(file.tsx, 0, 31))
->args : Symbol(args, Decl(file.tsx, 2, 21))
+>log : Symbol(log, Decl(file.tsx, 2, 31))
+>args : Symbol(args, Decl(file.tsx, 4, 21))
export interface ClickableProps {
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
children?: string;
->children : Symbol(ClickableProps.children, Decl(file.tsx, 4, 33))
+>children : Symbol(ClickableProps.children, Decl(file.tsx, 6, 33))
className?: string;
->className : Symbol(ClickableProps.className, Decl(file.tsx, 5, 22))
+>className : Symbol(ClickableProps.className, Decl(file.tsx, 7, 22))
}
export interface ButtonProps extends ClickableProps {
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
onClick: (k: "left" | "right") => void;
->onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 9, 53))
->k : Symbol(k, Decl(file.tsx, 10, 14))
+>onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 11, 53))
+>k : Symbol(k, Decl(file.tsx, 12, 14))
}
export interface LinkProps extends ClickableProps {
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
goTo: "home" | "contact";
->goTo : Symbol(LinkProps.goTo, Decl(file.tsx, 13, 51))
+>goTo : Symbol(LinkProps.goTo, Decl(file.tsx, 15, 51))
}
export function MainButton(buttonProps: ButtonProps): JSX.Element;
->MainButton : Symbol(MainButton, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->buttonProps : Symbol(buttonProps, Decl(file.tsx, 17, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>buttonProps : Symbol(buttonProps, Decl(file.tsx, 19, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
>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, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->linkProps : Symbol(linkProps, Decl(file.tsx, 18, 27))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 20, 27))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
>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): JSX.Element {
->MainButton : Symbol(MainButton, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->props : Symbol(props, Decl(file.tsx, 19, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>props : Symbol(props, Decl(file.tsx, 21, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
>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, 20, 9))
->props : Symbol(props, Decl(file.tsx, 19, 27))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 22, 9))
+>props : Symbol(props, Decl(file.tsx, 21, 27))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
if(linkProps.goTo) {
->linkProps.goTo : Symbol(LinkProps.goTo, Decl(file.tsx, 13, 51))
->linkProps : Symbol(linkProps, Decl(file.tsx, 20, 9))
->goTo : Symbol(LinkProps.goTo, Decl(file.tsx, 13, 51))
+>linkProps.goTo : Symbol(LinkProps.goTo, Decl(file.tsx, 15, 51))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 22, 9))
+>goTo : Symbol(LinkProps.goTo, Decl(file.tsx, 15, 51))
return this._buildMainLink(props);
->props : Symbol(props, Decl(file.tsx, 19, 27))
+>props : Symbol(props, Decl(file.tsx, 21, 27))
}
return this._buildMainButton(props);
->props : Symbol(props, Decl(file.tsx, 19, 27))
+>props : Symbol(props, Decl(file.tsx, 21, 27))
}
const b0 =
{log(k)}}} extra />; // k has type "left" | "right"
->b0 : Symbol(b0, Decl(file.tsx, 28, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->onClick : Symbol(onClick, Decl(file.tsx, 28, 28))
->k : Symbol(k, Decl(file.tsx, 28, 38))
->log : Symbol(log, Decl(file.tsx, 0, 31))
->k : Symbol(k, Decl(file.tsx, 28, 38))
->extra : Symbol(extra, Decl(file.tsx, 28, 54))
+>b0 : Symbol(b0, Decl(file.tsx, 30, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>onClick : Symbol(onClick, Decl(file.tsx, 30, 28))
+>k : Symbol(k, Decl(file.tsx, 30, 38))
+>log : Symbol(log, Decl(file.tsx, 2, 31))
+>k : Symbol(k, Decl(file.tsx, 30, 38))
+>extra : Symbol(extra, Decl(file.tsx, 30, 54))
const b2 = {log(k)}} extra />; // k has type "left" | "right"
->b2 : Symbol(b2, Decl(file.tsx, 29, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->onClick : Symbol(onClick, Decl(file.tsx, 29, 22))
->k : Symbol(k, Decl(file.tsx, 29, 33))
->log : Symbol(log, Decl(file.tsx, 0, 31))
->k : Symbol(k, Decl(file.tsx, 29, 33))
->extra : Symbol(extra, Decl(file.tsx, 29, 46))
+>b2 : Symbol(b2, Decl(file.tsx, 31, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>onClick : Symbol(onClick, Decl(file.tsx, 31, 22))
+>k : Symbol(k, Decl(file.tsx, 31, 33))
+>log : Symbol(log, Decl(file.tsx, 2, 31))
+>k : Symbol(k, Decl(file.tsx, 31, 33))
+>extra : Symbol(extra, Decl(file.tsx, 31, 46))
const b3 = ; // goTo has type"home" | "contact"
->b3 : Symbol(b3, Decl(file.tsx, 30, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->goTo : Symbol(goTo, Decl(file.tsx, 30, 28))
->extra : Symbol(extra, Decl(file.tsx, 30, 41))
+>b3 : Symbol(b3, Decl(file.tsx, 32, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>goTo : Symbol(goTo, Decl(file.tsx, 32, 28))
+>extra : Symbol(extra, Decl(file.tsx, 32, 41))
const b4 = ; // goTo has type "home" | "contact"
->b4 : Symbol(b4, Decl(file.tsx, 31, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 66), Decl(file.tsx, 18, 62))
->goTo : Symbol(goTo, Decl(file.tsx, 31, 22))
->extra : Symbol(extra, Decl(file.tsx, 31, 34))
+>b4 : Symbol(b4, Decl(file.tsx, 33, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 66), Decl(file.tsx, 20, 62))
+>goTo : Symbol(goTo, Decl(file.tsx, 33, 22))
+>extra : Symbol(extra, Decl(file.tsx, 33, 34))
export function NoOverload(buttonProps: ButtonProps): JSX.Element { return undefined }
->NoOverload : Symbol(NoOverload, Decl(file.tsx, 31, 44))
->buttonProps : Symbol(buttonProps, Decl(file.tsx, 33, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
+>NoOverload : Symbol(NoOverload, Decl(file.tsx, 33, 44))
+>buttonProps : Symbol(buttonProps, Decl(file.tsx, 35, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
>undefined : Symbol(undefined)
const c1 = {log(k)}}} extra />; // k has type any
->c1 : Symbol(c1, Decl(file.tsx, 34, 5))
->NoOverload : Symbol(NoOverload, Decl(file.tsx, 31, 44))
->onClick : Symbol(onClick, Decl(file.tsx, 34, 29))
->k : Symbol(k, Decl(file.tsx, 34, 39))
->log : Symbol(log, Decl(file.tsx, 0, 31))
->k : Symbol(k, Decl(file.tsx, 34, 39))
->extra : Symbol(extra, Decl(file.tsx, 34, 55))
+>c1 : Symbol(c1, Decl(file.tsx, 36, 5))
+>NoOverload : Symbol(NoOverload, Decl(file.tsx, 33, 44))
+>onClick : Symbol(onClick, Decl(file.tsx, 36, 29))
+>k : Symbol(k, Decl(file.tsx, 36, 39))
+>log : Symbol(log, Decl(file.tsx, 2, 31))
+>k : Symbol(k, Decl(file.tsx, 36, 39))
+>extra : Symbol(extra, Decl(file.tsx, 36, 55))
export function NoOverload1(linkProps: LinkProps): JSX.Element { return undefined }
->NoOverload1 : Symbol(NoOverload1, Decl(file.tsx, 34, 65))
->linkProps : Symbol(linkProps, Decl(file.tsx, 36, 28))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>NoOverload1 : Symbol(NoOverload1, Decl(file.tsx, 36, 65))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 38, 28))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
>undefined : Symbol(undefined)
const d1 = ; // goTo has type "home" | "contact"
->d1 : Symbol(d1, Decl(file.tsx, 37, 5))
->NoOverload1 : Symbol(NoOverload1, Decl(file.tsx, 34, 65))
->goTo : Symbol(goTo, Decl(file.tsx, 37, 29))
->extra : Symbol(extra, Decl(file.tsx, 37, 42))
+>d1 : Symbol(d1, Decl(file.tsx, 39, 5))
+>NoOverload1 : Symbol(NoOverload1, Decl(file.tsx, 36, 65))
+>goTo : Symbol(goTo, Decl(file.tsx, 39, 29))
+>extra : Symbol(extra, Decl(file.tsx, 39, 42))
diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types
index df32286aab66b..82fa667abe5e8 100644
--- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types
+++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences1.js b/tests/baselines/reference/correctlyMarkAliasAsReferences1.js
index 7816881f4a2ae..51c7058201f97 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences1.js
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences1.js
@@ -4,6 +4,7 @@
declare module "classnames";
//// [0.tsx]
+///
///
import * as cx from 'classnames';
import * as React from "react";
@@ -15,6 +16,7 @@ let k =
//// [0.js]
+///
///
import * as cx from 'classnames';
import * as React from "react";
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols
index b709736f12eeb..6ac4eba237188 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences1.symbols
@@ -1,26 +1,27 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
import * as React from "react";
->React : Symbol(React, Decl(0.tsx, 2, 6))
+>React : Symbol(React, Decl(0.tsx, 3, 6))
let buttonProps; // any
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
let k =
->k : Symbol(k, Decl(0.tsx, 5, 3))
+>k : Symbol(k, Decl(0.tsx, 6, 3))
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->className : Symbol(className, Decl(0.tsx, 6, 17))
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
->class2 : Symbol(class2, Decl(0.tsx, 6, 43))
+>className : Symbol(className, Decl(0.tsx, 7, 17))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
+>class2 : Symbol(class2, Decl(0.tsx, 7, 43))
;
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences1.types b/tests/baselines/reference/correctlyMarkAliasAsReferences1.types
index e21077fcfc11f..fff6b6515427f 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences1.types
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences1.types
@@ -1,6 +1,7 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
>cx : any
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.js b/tests/baselines/reference/correctlyMarkAliasAsReferences2.js
index 7af59b017a8ee..8124cf26d8984 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.js
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.js
@@ -4,6 +4,7 @@
declare module "classnames";
//// [0.tsx]
+///
///
import * as cx from 'classnames';
import * as React from "react";
@@ -15,6 +16,7 @@ let k =
//// [0.js]
+///
///
import * as cx from 'classnames';
import * as React from "react";
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols
index 24850513fcdc2..ad9ac37f42141 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols
@@ -1,27 +1,28 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
import * as React from "react";
->React : Symbol(React, Decl(0.tsx, 2, 6))
+>React : Symbol(React, Decl(0.tsx, 3, 6))
let buttonProps : {[attributeName: string]: ''}
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
->attributeName : Symbol(attributeName, Decl(0.tsx, 4, 20))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
+>attributeName : Symbol(attributeName, Decl(0.tsx, 5, 20))
let k =
->k : Symbol(k, Decl(0.tsx, 5, 3))
+>k : Symbol(k, Decl(0.tsx, 6, 3))
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->className : Symbol(className, Decl(0.tsx, 6, 17))
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
->class2 : Symbol(class2, Decl(0.tsx, 6, 43))
+>className : Symbol(className, Decl(0.tsx, 7, 17))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
+>class2 : Symbol(class2, Decl(0.tsx, 7, 43))
;
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.types b/tests/baselines/reference/correctlyMarkAliasAsReferences2.types
index da7806339a7be..4eb31046db991 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.types
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.types
@@ -1,6 +1,7 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
>cx : any
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt
index 47a8158859ea4..6eb67cbc99bd7 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt
@@ -1,7 +1,8 @@
-0.tsx(6,21): error TS2698: Spread types may only be created from object types.
+0.tsx(7,21): error TS2698: Spread types may only be created from object types.
==== 0.tsx (1 errors) ====
+ ///
///
import * as cx from 'classnames';
import * as React from "react";
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.js b/tests/baselines/reference/correctlyMarkAliasAsReferences3.js
index 166e29d56dbb9..1e1accca25f75 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.js
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.js
@@ -4,6 +4,7 @@
declare module "classnames";
//// [0.tsx]
+///
///
import * as cx from 'classnames';
import * as React from "react";
@@ -15,6 +16,7 @@ let k =
//// [0.js]
+///
///
import * as cx from 'classnames';
import * as React from "react";
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols
index 35fdd60bdd447..0113490738bae 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols
@@ -1,26 +1,27 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
import * as React from "react";
->React : Symbol(React, Decl(0.tsx, 2, 6))
+>React : Symbol(React, Decl(0.tsx, 3, 6))
let buttonProps;
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
let k =
->k : Symbol(k, Decl(0.tsx, 5, 3))
+>k : Symbol(k, Decl(0.tsx, 6, 3))
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->className : Symbol(className, Decl(0.tsx, 6, 17))
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
->class2 : Symbol(class2, Decl(0.tsx, 6, 43))
+>className : Symbol(className, Decl(0.tsx, 7, 17))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
+>class2 : Symbol(class2, Decl(0.tsx, 7, 43))
;
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.types b/tests/baselines/reference/correctlyMarkAliasAsReferences3.types
index 639409a9e3e7e..c1ef9ec38d157 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.types
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.types
@@ -1,6 +1,7 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
>cx : any
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences4.js b/tests/baselines/reference/correctlyMarkAliasAsReferences4.js
index 631d06cc5b362..5ece7ba7a1ae0 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences4.js
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences4.js
@@ -4,6 +4,7 @@
declare module "classnames";
//// [0.tsx]
+///
///
import * as cx from 'classnames';
import * as React from "react";
@@ -12,6 +13,7 @@ let buttonProps : {[attributeName: string]: ''}
let k = ;
//// [0.js]
+///
///
import * as cx from 'classnames';
import * as React from "react";
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols
index c56a152b383f2..6480e01dd1c8c 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols
@@ -1,24 +1,25 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
import * as React from "react";
->React : Symbol(React, Decl(0.tsx, 2, 6))
+>React : Symbol(React, Decl(0.tsx, 3, 6))
let buttonProps : {[attributeName: string]: ''}
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
->attributeName : Symbol(attributeName, Decl(0.tsx, 4, 20))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
+>attributeName : Symbol(attributeName, Decl(0.tsx, 5, 20))
let k = ;
->k : Symbol(k, Decl(0.tsx, 5, 3))
+>k : Symbol(k, Decl(0.tsx, 6, 3))
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
->buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
->className : Symbol(className, Decl(0.tsx, 5, 32))
->cx : Symbol(cx, Decl(0.tsx, 1, 6))
->class2 : Symbol(class2, Decl(0.tsx, 5, 58))
+>buttonProps : Symbol(buttonProps, Decl(0.tsx, 5, 3))
+>className : Symbol(className, Decl(0.tsx, 6, 32))
+>cx : Symbol(cx, Decl(0.tsx, 2, 6))
+>class2 : Symbol(class2, Decl(0.tsx, 6, 58))
=== declaration.d.ts ===
declare module "classnames";
diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences4.types b/tests/baselines/reference/correctlyMarkAliasAsReferences4.types
index 474ed236af2a1..03651fba46104 100644
--- a/tests/baselines/reference/correctlyMarkAliasAsReferences4.types
+++ b/tests/baselines/reference/correctlyMarkAliasAsReferences4.types
@@ -1,6 +1,7 @@
//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx] ////
=== 0.tsx ===
+///
///
import * as cx from 'classnames';
>cx : any
diff --git a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt
index dc6dce045ded2..07d3951e980af 100644
--- a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt
+++ b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.errors.txt
@@ -1,24 +1,14 @@
-file.jsx(1,18): error TS18042: 'Prop' is a type and cannot be imported in JavaScript files. Use 'import("./component").Prop' in a JSDoc type annotation.
-file.jsx(4,9): error TS2657: JSX expressions must have one parent element.
-file.jsx(4,16): error TS1003: Identifier expected.
-file.jsx(4,17): error TS2693: 'Prop' only refers to a type, but is being used as a value here.
-file.jsx(4,17): error TS17008: JSX element 'Prop' has no corresponding closing tag.
-file.jsx(4,38): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
-file.jsx(5,1): error TS1005: '' expected.
+file.jsx(2,18): error TS18042: 'Prop' is a type and cannot be imported in JavaScript files. Use 'import("./component").Prop' in a JSDoc type annotation.
+file.jsx(5,9): error TS2657: JSX expressions must have one parent element.
+file.jsx(5,16): error TS1003: Identifier expected.
+file.jsx(5,17): error TS2693: 'Prop' only refers to a type, but is being used as a value here.
+file.jsx(5,17): error TS17008: JSX element 'Prop' has no corresponding closing tag.
+file.jsx(5,38): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
+file.jsx(6,1): error TS1005: '' expected.
-==== component.d.ts (0 errors) ====
- import * as React from "react";
- export declare class MyComp extends React.Component
{
- internalProp: P;
- }
-
- export interface Prop {
- a: number,
- b: string
- }
-
==== file.jsx (7 errors) ====
+ ///
import { MyComp, Prop } from "./component";
~~~~
!!! error TS18042: 'Prop' is a type and cannot be imported in JavaScript files. Use 'import("./component").Prop' in a JSDoc type annotation.
@@ -38,4 +28,15 @@ file.jsx(5,1): error TS1005: '' expected.
!!! error TS2657: JSX expressions must have one parent element.
-!!! error TS1005: '' expected.
\ No newline at end of file
+!!! error TS1005: '' expected.
+==== component.d.ts (0 errors) ====
+ import * as React from "react";
+ export declare class MyComp
extends React.Component
{
+ internalProp: P;
+ }
+
+ export interface Prop {
+ a: number,
+ b: string
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.js b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.js
index 15e2270ab7206..729378118fe66 100644
--- a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.js
+++ b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.js
@@ -12,6 +12,7 @@ export interface Prop {
}
//// [file.jsx]
+///
import { MyComp, Prop } from "./component";
import * as React from "react";
@@ -54,6 +55,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
+///
var component_1 = require("./component");
var React = __importStar(require("react"));
var x = , a={10} b="hi" />; // error, no type arguments in js
diff --git a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.symbols b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.symbols
index a21ff874bb561..ebbbdcf570e56 100644
--- a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.symbols
+++ b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.symbols
@@ -1,5 +1,18 @@
//// [tests/cases/conformance/jsx/jsxCheckJsxNoTypeArgumentsAllowed.tsx] ////
+=== file.jsx ===
+///
+import { MyComp, Prop } from "./component";
+>MyComp : Symbol(MyComp, Decl(file.jsx, 1, 8))
+>Prop : Symbol(Prop, Decl(file.jsx, 1, 16))
+
+import * as React from "react";
+>React : Symbol(React, Decl(file.jsx, 2, 6))
+
+let x = a={10} b="hi" />; // error, no type arguments in js
+>x : Symbol(x, Decl(file.jsx, 4, 3))
+>MyComp : Symbol(MyComp, Decl(file.jsx, 1, 8))
+
=== component.d.ts ===
import * as React from "react";
>React : Symbol(React, Decl(component.d.ts, 0, 6))
@@ -27,15 +40,3 @@ export interface Prop {
>b : Symbol(Prop.b, Decl(component.d.ts, 6, 14))
}
-=== file.jsx ===
-import { MyComp, Prop } from "./component";
->MyComp : Symbol(MyComp, Decl(file.jsx, 0, 8))
->Prop : Symbol(Prop, Decl(file.jsx, 0, 16))
-
-import * as React from "react";
->React : Symbol(React, Decl(file.jsx, 1, 6))
-
-let x = a={10} b="hi" />; // error, no type arguments in js
->x : Symbol(x, Decl(file.jsx, 3, 3))
->MyComp : Symbol(MyComp, Decl(file.jsx, 0, 8))
-
diff --git a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.types b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.types
index 16375b8f6c33b..07d3c84c95052 100644
--- a/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.types
+++ b/tests/baselines/reference/jsxCheckJsxNoTypeArgumentsAllowed.types
@@ -1,36 +1,7 @@
//// [tests/cases/conformance/jsx/jsxCheckJsxNoTypeArgumentsAllowed.tsx] ////
-=== component.d.ts ===
-import * as React from "react";
->React : typeof React
-> : ^^^^^^^^^^^^
-
-export declare class MyComp extends React.Component
{
->MyComp : MyComp
-> : ^^^^^^^^^
->React.Component : React.Component
-> : ^^^^^^^^^^^^^^^^^^^^^^
->React : typeof React
-> : ^^^^^^^^^^^^
->Component : typeof React.Component
-> : ^^^^^^^^^^^^^^^^^^^^^^
-
- internalProp: P;
->internalProp : P
-> : ^
-}
-
-export interface Prop {
- a: number,
->a : number
-> : ^^^^^^
-
- b: string
->b : string
-> : ^^^^^^
-}
-
=== file.jsx ===
+///
import { MyComp, Prop } from "./component";
>MyComp : typeof MyComp
> : ^^^^^^^^^^^^^
@@ -60,3 +31,33 @@ let x = a={10} b="hi" />; // error, no type arguments in js
> : any
> : ^^^
+=== component.d.ts ===
+import * as React from "react";
+>React : typeof React
+> : ^^^^^^^^^^^^
+
+export declare class MyComp extends React.Component
{
+>MyComp : MyComp
+> : ^^^^^^^^^
+>React.Component : React.Component
+> : ^^^^^^^^^^^^^^^^^^^^^^
+>React : typeof React
+> : ^^^^^^^^^^^^
+>Component : typeof React.Component
+> : ^^^^^^^^^^^^^^^^^^^^^^
+
+ internalProp: P;
+>internalProp : P
+> : ^
+}
+
+export interface Prop {
+ a: number,
+>a : number
+> : ^^^^^^
+
+ b: string
+>b : string
+> : ^^^^^^
+}
+
diff --git a/tests/baselines/reference/jsxHasLiteralType.js b/tests/baselines/reference/jsxHasLiteralType.js
index 5064fa100c36e..e97e1042938d9 100644
--- a/tests/baselines/reference/jsxHasLiteralType.js
+++ b/tests/baselines/reference/jsxHasLiteralType.js
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/jsxHasLiteralType.tsx] ////
//// [jsxHasLiteralType.tsx]
+///
import * as React from "react";
interface Props {
@@ -61,6 +62,7 @@ var __importStar = (this && this.__importStar) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
+///
var React = __importStar(require("react"));
var MyComponent = /** @class */ (function (_super) {
__extends(MyComponent, _super);
diff --git a/tests/baselines/reference/jsxHasLiteralType.symbols b/tests/baselines/reference/jsxHasLiteralType.symbols
index b256ef84ccdf8..9120d2e6d5ac0 100644
--- a/tests/baselines/reference/jsxHasLiteralType.symbols
+++ b/tests/baselines/reference/jsxHasLiteralType.symbols
@@ -1,27 +1,28 @@
//// [tests/cases/compiler/jsxHasLiteralType.tsx] ////
=== jsxHasLiteralType.tsx ===
+///
import * as React from "react";
->React : Symbol(React, Decl(jsxHasLiteralType.tsx, 0, 6))
+>React : Symbol(React, Decl(jsxHasLiteralType.tsx, 1, 6))
interface Props {
->Props : Symbol(Props, Decl(jsxHasLiteralType.tsx, 0, 31))
+>Props : Symbol(Props, Decl(jsxHasLiteralType.tsx, 1, 31))
x?: "a" | "b";
->x : Symbol(Props.x, Decl(jsxHasLiteralType.tsx, 2, 17))
+>x : Symbol(Props.x, Decl(jsxHasLiteralType.tsx, 3, 17))
}
class MyComponent
extends React.Component
{}
->MyComponent : Symbol(MyComponent, Decl(jsxHasLiteralType.tsx, 4, 1))
->P : Symbol(P, Decl(jsxHasLiteralType.tsx, 5, 18))
->Props : Symbol(Props, Decl(jsxHasLiteralType.tsx, 0, 31))
->Props : Symbol(Props, Decl(jsxHasLiteralType.tsx, 0, 31))
+>MyComponent : Symbol(MyComponent, Decl(jsxHasLiteralType.tsx, 5, 1))
+>P : Symbol(P, Decl(jsxHasLiteralType.tsx, 6, 18))
+>Props : Symbol(Props, Decl(jsxHasLiteralType.tsx, 1, 31))
+>Props : Symbol(Props, Decl(jsxHasLiteralType.tsx, 1, 31))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
->React : Symbol(React, Decl(jsxHasLiteralType.tsx, 0, 6))
+>React : Symbol(React, Decl(jsxHasLiteralType.tsx, 1, 6))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
->P : Symbol(P, Decl(jsxHasLiteralType.tsx, 5, 18))
+>P : Symbol(P, Decl(jsxHasLiteralType.tsx, 6, 18))
const m =
->m : Symbol(m, Decl(jsxHasLiteralType.tsx, 6, 5))
->MyComponent : Symbol(MyComponent, Decl(jsxHasLiteralType.tsx, 4, 1))
->x : Symbol(x, Decl(jsxHasLiteralType.tsx, 6, 22))
+>m : Symbol(m, Decl(jsxHasLiteralType.tsx, 7, 5))
+>MyComponent : Symbol(MyComponent, Decl(jsxHasLiteralType.tsx, 5, 1))
+>x : Symbol(x, Decl(jsxHasLiteralType.tsx, 7, 22))
diff --git a/tests/baselines/reference/jsxHasLiteralType.types b/tests/baselines/reference/jsxHasLiteralType.types
index 95bb296037931..8ac39d8b9d063 100644
--- a/tests/baselines/reference/jsxHasLiteralType.types
+++ b/tests/baselines/reference/jsxHasLiteralType.types
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/jsxHasLiteralType.tsx] ////
=== jsxHasLiteralType.tsx ===
+///
import * as React from "react";
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.js b/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.js
index 79c020420f6b5..d85ed0294d4a2 100644
--- a/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.js
+++ b/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.js
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/jsxInferenceProducesLiteralAsExpected.tsx] ////
//// [jsxInferenceProducesLiteralAsExpected.tsx]
+///
import React = require("react");
type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T];
class TestObject {
@@ -21,6 +22,7 @@ const el2 = model={model} foo="c" />;
//// [jsxInferenceProducesLiteralAsExpected.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+///
var React = require("react");
var TestObject = /** @class */ (function () {
function TestObject() {
diff --git a/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.symbols b/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.symbols
index 880e73c8bd482..75f6c2201f961 100644
--- a/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.symbols
+++ b/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.symbols
@@ -1,68 +1,69 @@
//// [tests/cases/compiler/jsxInferenceProducesLiteralAsExpected.tsx] ////
=== jsxInferenceProducesLiteralAsExpected.tsx ===
+///
import React = require("react");
>React : Symbol(React, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 0, 0))
type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T];
->FunctionPropertyNames : Symbol(FunctionPropertyNames, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 0, 32))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27))
->K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 35))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27))
->K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 35))
+>FunctionPropertyNames : Symbol(FunctionPropertyNames, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 32))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 27))
+>K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 35))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 27))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 27))
+>K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 35))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
->K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 35))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27))
+>K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 35))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 27))
class TestObject {
->TestObject : Symbol(TestObject, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 95))
+>TestObject : Symbol(TestObject, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 95))
a: string = '';
->a : Symbol(TestObject.a, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 18))
+>a : Symbol(TestObject.a, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 3, 18))
b: number = 1;
->b : Symbol(TestObject.b, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 3, 19))
+>b : Symbol(TestObject.b, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 4, 19))
c: () => void = () => { };
->c : Symbol(TestObject.c, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 4, 18))
+>c : Symbol(TestObject.c, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 5, 18))
}
interface TestProps {
->TestProps : Symbol(TestProps, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 6, 1))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 7, 20))
+>TestProps : Symbol(TestProps, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 7, 1))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 8, 20))
model: T;
->model : Symbol(TestProps.model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 7, 24))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 7, 20))
+>model : Symbol(TestProps.model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 8, 24))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 8, 20))
foo: FunctionPropertyNames;
->foo : Symbol(TestProps.foo, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 8, 13))
->FunctionPropertyNames : Symbol(FunctionPropertyNames, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 0, 32))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 7, 20))
+>foo : Symbol(TestProps.foo, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 9, 13))
+>FunctionPropertyNames : Symbol(FunctionPropertyNames, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 32))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 8, 20))
}
function Test(props: TestProps) { return <>>; }
->Test : Symbol(Test, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 10, 1))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 11, 14))
->props : Symbol(props, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 11, 17))
->TestProps : Symbol(TestProps, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 6, 1))
->T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 11, 14))
+>Test : Symbol(Test, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 11, 1))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 12, 14))
+>props : Symbol(props, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 12, 17))
+>TestProps : Symbol(TestProps, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 7, 1))
+>T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 12, 14))
const model = new TestObject();
->model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 12, 5))
->TestObject : Symbol(TestObject, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 95))
+>model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 13, 5))
+>TestObject : Symbol(TestObject, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 95))
const el1 = ;
->el1 : Symbol(el1, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 14, 5))
->Test : Symbol(Test, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 10, 1))
->model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 14, 17))
->model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 12, 5))
->foo : Symbol(foo, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 14, 31))
+>el1 : Symbol(el1, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 15, 5))
+>Test : Symbol(Test, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 11, 1))
+>model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 15, 17))
+>model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 13, 5))
+>foo : Symbol(foo, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 15, 31))
const el2 = model={model} foo="c" />;
->el2 : Symbol(el2, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 15, 5))
->Test : Symbol(Test, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 10, 1))
->TestObject : Symbol(TestObject, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 95))
->model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 15, 29))
->model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 12, 5))
->foo : Symbol(foo, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 15, 43))
+>el2 : Symbol(el2, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 16, 5))
+>Test : Symbol(Test, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 11, 1))
+>TestObject : Symbol(TestObject, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 2, 95))
+>model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 16, 29))
+>model : Symbol(model, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 13, 5))
+>foo : Symbol(foo, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 16, 43))
diff --git a/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.types b/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.types
index 7e9cee1af46d6..4d52024be8476 100644
--- a/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.types
+++ b/tests/baselines/reference/jsxInferenceProducesLiteralAsExpected.types
@@ -6,6 +6,7 @@ Type Count: 5,000
Instantiation count: 10,000
=== jsxInferenceProducesLiteralAsExpected.tsx ===
+///
import React = require("react");
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.js b/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.js
index bd05bb83527d5..39815241efe2c 100644
--- a/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.js
+++ b/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.js
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/jsxSpreadFirstUnionNoErrors.tsx] ////
//// [jsxSpreadFirstUnionNoErrors.tsx]
+///
import React from "react";
type InfoProps =
@@ -35,6 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
+///
var react_1 = __importDefault(require("react"));
var Info = function (props) {
return props.status === "hidden"
diff --git a/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.symbols b/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.symbols
index a3b544c01280e..2ab54bb34c95e 100644
--- a/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.symbols
+++ b/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.symbols
@@ -1,56 +1,57 @@
//// [tests/cases/compiler/jsxSpreadFirstUnionNoErrors.tsx] ////
=== jsxSpreadFirstUnionNoErrors.tsx ===
+///
import React from "react";
->React : Symbol(React, Decl(jsxSpreadFirstUnionNoErrors.tsx, 0, 6))
+>React : Symbol(React, Decl(jsxSpreadFirstUnionNoErrors.tsx, 1, 6))
type InfoProps =
->InfoProps : Symbol(InfoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 0, 26))
+>InfoProps : Symbol(InfoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 1, 26))
| { status: "hidden" }
->status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 3, 3))
+>status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 3))
| { status: "visible"; content: string };
->status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 3))
->content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 22))
+>status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 5, 3))
+>content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 5, 22))
const Info = (props: InfoProps) =>
->Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 5))
->props : Symbol(props, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 14))
->InfoProps : Symbol(InfoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 0, 26))
+>Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 5))
+>props : Symbol(props, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 14))
+>InfoProps : Symbol(InfoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 1, 26))
props.status === "hidden"
->props.status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 3, 3), Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 3))
->props : Symbol(props, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 14))
->status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 3, 3), Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 3))
+>props.status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 3), Decl(jsxSpreadFirstUnionNoErrors.tsx, 5, 3))
+>props : Symbol(props, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 14))
+>status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 3), Decl(jsxSpreadFirstUnionNoErrors.tsx, 5, 3))
?
>noscript : Symbol(JSX.IntrinsicElements.noscript, Decl(react.d.ts, 2439, 42))
: {props.content}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->props.content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 22))
->props : Symbol(props, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 14))
->content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 4, 22))
+>props.content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 5, 22))
+>props : Symbol(props, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 14))
+>content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 5, 22))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
const a = ;
->a : Symbol(a, Decl(jsxSpreadFirstUnionNoErrors.tsx, 11, 5))
->Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 5))
->status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 11, 15))
+>a : Symbol(a, Decl(jsxSpreadFirstUnionNoErrors.tsx, 12, 5))
+>Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 5))
+>status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 12, 15))
const b = ;
->b : Symbol(b, Decl(jsxSpreadFirstUnionNoErrors.tsx, 12, 5))
->Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 5))
->status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 12, 15))
->content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 12, 32))
+>b : Symbol(b, Decl(jsxSpreadFirstUnionNoErrors.tsx, 13, 5))
+>Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 5))
+>status : Symbol(status, Decl(jsxSpreadFirstUnionNoErrors.tsx, 13, 15))
+>content : Symbol(content, Decl(jsxSpreadFirstUnionNoErrors.tsx, 13, 32))
declare const infoProps: InfoProps;
->infoProps : Symbol(infoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 13, 13))
->InfoProps : Symbol(InfoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 0, 26))
+>infoProps : Symbol(infoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 14, 13))
+>InfoProps : Symbol(InfoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 1, 26))
const c = ;
->c : Symbol(c, Decl(jsxSpreadFirstUnionNoErrors.tsx, 15, 5))
->Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 6, 5))
->infoProps : Symbol(infoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 13, 13))
+>c : Symbol(c, Decl(jsxSpreadFirstUnionNoErrors.tsx, 16, 5))
+>Info : Symbol(Info, Decl(jsxSpreadFirstUnionNoErrors.tsx, 7, 5))
+>infoProps : Symbol(infoProps, Decl(jsxSpreadFirstUnionNoErrors.tsx, 14, 13))
diff --git a/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.types b/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.types
index a9d71339a915a..d1dcbe94d125b 100644
--- a/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.types
+++ b/tests/baselines/reference/jsxSpreadFirstUnionNoErrors.types
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/jsxSpreadFirstUnionNoErrors.tsx] ////
=== jsxSpreadFirstUnionNoErrors.tsx ===
+///
import React from "react";
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.errors.txt b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.errors.txt
index 60fd97512fc1e..bd3023f2bfb2a 100644
--- a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.errors.txt
+++ b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.errors.txt
@@ -1,13 +1,15 @@
-file.tsx(19,17): error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-file.tsx(20,17): error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-file.tsx(20,23): error TS2783: 'b' is specified more than once, so this usage will be overwritten.
file.tsx(21,17): error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-file.tsx(21,23): error TS2783: 'd' is specified more than once, so this usage will be overwritten.
file.tsx(22,17): error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-file.tsx(22,23): error TS2783: 'd' is specified more than once, so this usage will be overwritten.
+file.tsx(22,23): error TS2783: 'b' is specified more than once, so this usage will be overwritten.
+file.tsx(23,17): error TS2783: 'a' is specified more than once, so this usage will be overwritten.
+file.tsx(23,23): error TS2783: 'd' is specified more than once, so this usage will be overwritten.
+file.tsx(24,17): error TS2783: 'a' is specified more than once, so this usage will be overwritten.
+file.tsx(24,23): error TS2783: 'd' is specified more than once, so this usage will be overwritten.
==== file.tsx (7 errors) ====
+ ///
+
import React = require('react');
interface Props {
@@ -29,26 +31,26 @@ file.tsx(22,23): error TS2783: 'd' is specified more than once, so this usage wi
const b1 = ;
~~~~~
!!! error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:19:23: This spread always overwrites this property.
+!!! related TS2785 file.tsx:21:23: This spread always overwrites this property.
const b2 = ;
~~~~~
!!! error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:20:29: This spread always overwrites this property.
+!!! related TS2785 file.tsx:22:29: This spread always overwrites this property.
~~~~~
!!! error TS2783: 'b' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:20:29: This spread always overwrites this property.
+!!! related TS2785 file.tsx:22:29: This spread always overwrites this property.
const b3 = ;
~~~~~
!!! error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:21:29: This spread always overwrites this property.
+!!! related TS2785 file.tsx:23:29: This spread always overwrites this property.
~~~~~
!!! error TS2783: 'd' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:21:40: This spread always overwrites this property.
+!!! related TS2785 file.tsx:23:40: This spread always overwrites this property.
const b4 = ;
~~~~~
!!! error TS2783: 'a' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:22:29: This spread always overwrites this property.
+!!! related TS2785 file.tsx:24:29: This spread always overwrites this property.
~~~~~
!!! error TS2783: 'd' is specified more than once, so this usage will be overwritten.
-!!! related TS2785 file.tsx:22:40: This spread always overwrites this property.
+!!! related TS2785 file.tsx:24:40: This spread always overwrites this property.
\ No newline at end of file
diff --git a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.js b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.js
index 53f1e7e81490b..b9015558c4872 100644
--- a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.js
+++ b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/jsxSpreadOverwritesAttributeStrict.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Props {
@@ -27,6 +29,7 @@ const b4 = ;
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var props = { a: 1, b: 1 };
diff --git a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.symbols b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.symbols
index cda29325de1d0..7a12af99e7947 100644
--- a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.symbols
+++ b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.symbols
@@ -1,88 +1,90 @@
//// [tests/cases/conformance/jsx/jsxSpreadOverwritesAttributeStrict.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Props {
->Props : Symbol(Props, Decl(file.tsx, 0, 32))
+>Props : Symbol(Props, Decl(file.tsx, 2, 32))
a: number;
->a : Symbol(Props.a, Decl(file.tsx, 2, 17))
+>a : Symbol(Props.a, Decl(file.tsx, 4, 17))
b: number;
->b : Symbol(Props.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Props.b, Decl(file.tsx, 5, 14))
c?: number;
->c : Symbol(Props.c, Decl(file.tsx, 4, 14))
+>c : Symbol(Props.c, Decl(file.tsx, 6, 14))
d?: number;
->d : Symbol(Props.d, Decl(file.tsx, 5, 15))
+>d : Symbol(Props.d, Decl(file.tsx, 7, 15))
}
const props: Props = { a: 1, b: 1 };
->props : Symbol(props, Decl(file.tsx, 10, 5))
->Props : Symbol(Props, Decl(file.tsx, 0, 32))
->a : Symbol(a, Decl(file.tsx, 10, 22))
->b : Symbol(b, Decl(file.tsx, 10, 28))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>Props : Symbol(Props, Decl(file.tsx, 2, 32))
+>a : Symbol(a, Decl(file.tsx, 12, 22))
+>b : Symbol(b, Decl(file.tsx, 12, 28))
const Foo = (props: Props) => { props.a }
;
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->props : Symbol(props, Decl(file.tsx, 11, 13))
->Props : Symbol(Props, Decl(file.tsx, 0, 32))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>props : Symbol(props, Decl(file.tsx, 13, 13))
+>Props : Symbol(Props, Decl(file.tsx, 2, 32))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->props.a : Symbol(Props.a, Decl(file.tsx, 2, 17))
->props : Symbol(props, Decl(file.tsx, 11, 13))
->a : Symbol(Props.a, Decl(file.tsx, 2, 17))
+>props.a : Symbol(Props.a, Decl(file.tsx, 4, 17))
+>props : Symbol(props, Decl(file.tsx, 13, 13))
+>a : Symbol(Props.a, Decl(file.tsx, 4, 17))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
// ok
const a1 = ;
->a1 : Symbol(a1, Decl(file.tsx, 14, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->props : Symbol(props, Decl(file.tsx, 10, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
+>a1 : Symbol(a1, Decl(file.tsx, 16, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const a2 = ;
->a2 : Symbol(a2, Decl(file.tsx, 15, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->d : Symbol(d, Decl(file.tsx, 15, 15))
->props : Symbol(props, Decl(file.tsx, 10, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
+>a2 : Symbol(a2, Decl(file.tsx, 17, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>d : Symbol(d, Decl(file.tsx, 17, 15))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
// error
const b1 = ;
->b1 : Symbol(b1, Decl(file.tsx, 18, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->a : Symbol(a, Decl(file.tsx, 18, 15))
->props : Symbol(props, Decl(file.tsx, 10, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
+>b1 : Symbol(b1, Decl(file.tsx, 20, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>a : Symbol(a, Decl(file.tsx, 20, 15))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const b2 = ;
->b2 : Symbol(b2, Decl(file.tsx, 19, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->a : Symbol(a, Decl(file.tsx, 19, 15))
->b : Symbol(b, Decl(file.tsx, 19, 21))
->props : Symbol(props, Decl(file.tsx, 10, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
+>b2 : Symbol(b2, Decl(file.tsx, 21, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>a : Symbol(a, Decl(file.tsx, 21, 15))
+>b : Symbol(b, Decl(file.tsx, 21, 21))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const b3 = ;
->b3 : Symbol(b3, Decl(file.tsx, 20, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->a : Symbol(a, Decl(file.tsx, 20, 15))
->d : Symbol(d, Decl(file.tsx, 20, 21))
->props : Symbol(props, Decl(file.tsx, 10, 5))
->d : Symbol(d, Decl(file.tsx, 20, 44))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
+>b3 : Symbol(b3, Decl(file.tsx, 22, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>a : Symbol(a, Decl(file.tsx, 22, 15))
+>d : Symbol(d, Decl(file.tsx, 22, 21))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>d : Symbol(d, Decl(file.tsx, 22, 44))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
const b4 = ;
->b4 : Symbol(b4, Decl(file.tsx, 21, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
->a : Symbol(a, Decl(file.tsx, 21, 15))
->d : Symbol(d, Decl(file.tsx, 21, 21))
->props : Symbol(props, Decl(file.tsx, 10, 5))
->a : Symbol(a, Decl(file.tsx, 21, 44))
->d : Symbol(d, Decl(file.tsx, 21, 50))
->Foo : Symbol(Foo, Decl(file.tsx, 11, 5))
+>b4 : Symbol(b4, Decl(file.tsx, 23, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
+>a : Symbol(a, Decl(file.tsx, 23, 15))
+>d : Symbol(d, Decl(file.tsx, 23, 21))
+>props : Symbol(props, Decl(file.tsx, 12, 5))
+>a : Symbol(a, Decl(file.tsx, 23, 44))
+>d : Symbol(d, Decl(file.tsx, 23, 50))
+>Foo : Symbol(Foo, Decl(file.tsx, 13, 5))
diff --git a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.types b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.types
index 83782a6cae16e..5d7582a281234 100644
--- a/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.types
+++ b/tests/baselines/reference/jsxSpreadOverwritesAttributeStrict.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/jsxSpreadOverwritesAttributeStrict.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/multiline.errors.txt b/tests/baselines/reference/multiline.errors.txt
index a1f21e41de003..04822263fd4bf 100644
--- a/tests/baselines/reference/multiline.errors.txt
+++ b/tests/baselines/reference/multiline.errors.txt
@@ -1,25 +1,8 @@
-a.ts(12,1): error TS2578: Unused '@ts-expect-error' directive.
-b.tsx(32,1): error TS2578: Unused '@ts-expect-error' directive.
+b.tsx(33,1): error TS2578: Unused '@ts-expect-error' directive.
-==== a.ts (1 errors) ====
- export const texts: string[] = [];
-
- /**
- @ts-ignore */
- texts.push(100);
-
- /**
- @ts-expect-error */
- texts.push(100);
-
- /**
- @ts-expect-error */
- ~~~~~~~~~~~~~~~~~~~~
-!!! error TS2578: Unused '@ts-expect-error' directive.
- texts.push("100");
-
==== b.tsx (1 errors) ====
+ ///
import * as React from "react";
export function MyComponent(props: { foo: string }) {
@@ -57,4 +40,19 @@ b.tsx(32,1): error TS2578: Unused '@ts-expect-error' directive.
);
+
+==== a.ts (0 errors) ====
+ export const texts: string[] = [];
+
+ /**
+ @ts-ignore */
+ texts.push(100);
+
+ /**
+ @ts-expect-error */
+ texts.push(100);
+
+ /**
+ @ts-expect-error */
+ texts.push("100");
\ No newline at end of file
diff --git a/tests/baselines/reference/multiline.js b/tests/baselines/reference/multiline.js
index d829ebd85287f..6023fb5538184 100644
--- a/tests/baselines/reference/multiline.js
+++ b/tests/baselines/reference/multiline.js
@@ -16,6 +16,7 @@ texts.push(100);
texts.push("100");
//// [b.tsx]
+///
import * as React from "react";
export function MyComponent(props: { foo: string }) {
@@ -53,20 +54,6 @@ let x = (
);
-//// [a.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.texts = void 0;
-exports.texts = [];
-/**
- @ts-ignore */
-exports.texts.push(100);
-/**
- @ts-expect-error */
-exports.texts.push(100);
-/**
- @ts-expect-error */
-exports.texts.push("100");
//// [b.js]
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -104,6 +91,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.MyComponent = MyComponent;
+///
var React = __importStar(require("react"));
function MyComponent(props) {
return React.createElement("div", null);
diff --git a/tests/baselines/reference/multiline.symbols b/tests/baselines/reference/multiline.symbols
index 1377c6d90085f..cfaae631c4f2a 100644
--- a/tests/baselines/reference/multiline.symbols
+++ b/tests/baselines/reference/multiline.symbols
@@ -1,45 +1,21 @@
//// [tests/cases/conformance/directives/multiline.tsx] ////
-=== a.ts ===
-export const texts: string[] = [];
->texts : Symbol(texts, Decl(a.ts, 0, 12))
-
-/**
- @ts-ignore */
-texts.push(100);
->texts.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
->texts : Symbol(texts, Decl(a.ts, 0, 12))
->push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
-
-/**
- @ts-expect-error */
-texts.push(100);
->texts.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
->texts : Symbol(texts, Decl(a.ts, 0, 12))
->push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
-
-/**
- @ts-expect-error */
-texts.push("100");
->texts.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
->texts : Symbol(texts, Decl(a.ts, 0, 12))
->push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
-
=== b.tsx ===
+///
import * as React from "react";
->React : Symbol(React, Decl(b.tsx, 0, 6))
+>React : Symbol(React, Decl(b.tsx, 1, 6))
export function MyComponent(props: { foo: string }) {
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->props : Symbol(props, Decl(b.tsx, 2, 28))
->foo : Symbol(foo, Decl(b.tsx, 2, 36))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>props : Symbol(props, Decl(b.tsx, 3, 28))
+>foo : Symbol(foo, Decl(b.tsx, 3, 36))
return
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
let x = (
->x : Symbol(x, Decl(b.tsx, 6, 3))
+>x : Symbol(x, Decl(b.tsx, 7, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -47,42 +23,42 @@ let x = (
{/*
@ts-ignore */}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 10, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 11, 16))
{/*@ts-ignore*/}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 13, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 14, 16))
{/*
@ts-expect-error */}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 17, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 18, 16))
{/*
// @ts-expect-error */}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 21, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 22, 16))
{/*
* @ts-expect-error */}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 25, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 26, 16))
{/*@ts-expect-error*/}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 28, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 29, 16))
{/*
@ts-expect-error */}
->MyComponent : Symbol(MyComponent, Decl(b.tsx, 0, 31))
->foo : Symbol(foo, Decl(b.tsx, 32, 16))
+>MyComponent : Symbol(MyComponent, Decl(b.tsx, 1, 31))
+>foo : Symbol(foo, Decl(b.tsx, 33, 16))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
diff --git a/tests/baselines/reference/multiline.types b/tests/baselines/reference/multiline.types
index faa866b1c280b..fdad5badfeb58 100644
--- a/tests/baselines/reference/multiline.types
+++ b/tests/baselines/reference/multiline.types
@@ -5,56 +5,8 @@ Assignability cache: 1,000
Type Count: 5,000
Instantiation count: 10,000
-=== a.ts ===
-export const texts: string[] = [];
->texts : string[]
-> : ^^^^^^^^
->[] : undefined[]
-> : ^^^^^^^^^^^
-
-/**
- @ts-ignore */
-texts.push(100);
->texts.push(100) : number
-> : ^^^^^^
->texts.push : (...items: string[]) => number
-> : ^^^^ ^^^^^^^^^^^^^^^
->texts : string[]
-> : ^^^^^^^^
->push : (...items: string[]) => number
-> : ^^^^ ^^^^^^^^^^^^^^^
->100 : 100
-> : ^^^
-
-/**
- @ts-expect-error */
-texts.push(100);
->texts.push(100) : number
-> : ^^^^^^
->texts.push : (...items: string[]) => number
-> : ^^^^ ^^^^^^^^^^^^^^^
->texts : string[]
-> : ^^^^^^^^
->push : (...items: string[]) => number
-> : ^^^^ ^^^^^^^^^^^^^^^
->100 : 100
-> : ^^^
-
-/**
- @ts-expect-error */
-texts.push("100");
->texts.push("100") : number
-> : ^^^^^^
->texts.push : (...items: string[]) => number
-> : ^^^^ ^^^^^^^^^^^^^^^
->texts : string[]
-> : ^^^^^^^^
->push : (...items: string[]) => number
-> : ^^^^ ^^^^^^^^^^^^^^^
->"100" : "100"
-> : ^^^^^
-
=== b.tsx ===
+///
import * as React from "react";
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxAttributeResolution15.errors.txt b/tests/baselines/reference/tsxAttributeResolution15.errors.txt
index b6da011b0d550..776fee47d10d3 100644
--- a/tests/baselines/reference/tsxAttributeResolution15.errors.txt
+++ b/tests/baselines/reference/tsxAttributeResolution15.errors.txt
@@ -1,9 +1,11 @@
-file.tsx(11,21): error TS2322: Type '{ prop1: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes
& { children?: ReactNode; }'.
+file.tsx(13,21): error TS2322: Type '{ prop1: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
-file.tsx(14,39): error TS2532: Object is possibly 'undefined'.
+file.tsx(16,39): error TS2532: Object is possibly 'undefined'.
==== file.tsx (2 errors) ====
+ ///
+
import React = require('react');
class BigGreeter extends React.Component<{ }, {}> {
diff --git a/tests/baselines/reference/tsxAttributeResolution15.js b/tests/baselines/reference/tsxAttributeResolution15.js
index 2a61a4690fe5d..0d8aa0b34fb46 100644
--- a/tests/baselines/reference/tsxAttributeResolution15.js
+++ b/tests/baselines/reference/tsxAttributeResolution15.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxAttributeResolution15.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
class BigGreeter extends React.Component<{ }, {}> {
@@ -19,6 +21,7 @@ let c =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxAttributeResolution15.symbols b/tests/baselines/reference/tsxAttributeResolution15.symbols
index 6430db70431e5..598b9ca29d962 100644
--- a/tests/baselines/reference/tsxAttributeResolution15.symbols
+++ b/tests/baselines/reference/tsxAttributeResolution15.symbols
@@ -1,42 +1,44 @@
//// [tests/cases/conformance/jsx/tsxAttributeResolution15.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
class BigGreeter extends React.Component<{ }, {}> {
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 2, 32))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(BigGreeter.render, Decl(file.tsx, 2, 51))
+>render : Symbol(BigGreeter.render, Decl(file.tsx, 4, 51))
return Default hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
greeting: string;
->greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 5, 5))
+>greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 7, 5))
}
// Error
let a =
->a : Symbol(a, Decl(file.tsx, 10, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
->prop1 : Symbol(prop1, Decl(file.tsx, 10, 19))
+>a : Symbol(a, Decl(file.tsx, 12, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 2, 32))
+>prop1 : Symbol(prop1, Decl(file.tsx, 12, 19))
// OK
let b = { this.textInput = input; }} />
->b : Symbol(b, Decl(file.tsx, 13, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
->ref : Symbol(ref, Decl(file.tsx, 13, 19))
->input : Symbol(input, Decl(file.tsx, 13, 26))
->input : Symbol(input, Decl(file.tsx, 13, 26))
+>b : Symbol(b, Decl(file.tsx, 15, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 2, 32))
+>ref : Symbol(ref, Decl(file.tsx, 15, 19))
+>input : Symbol(input, Decl(file.tsx, 15, 26))
+>input : Symbol(input, Decl(file.tsx, 15, 26))
let c =
->c : Symbol(c, Decl(file.tsx, 14, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 0, 32))
->data-extra : Symbol(data-extra, Decl(file.tsx, 14, 19))
+>c : Symbol(c, Decl(file.tsx, 16, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 2, 32))
+>data-extra : Symbol(data-extra, Decl(file.tsx, 16, 19))
diff --git a/tests/baselines/reference/tsxAttributeResolution15.types b/tests/baselines/reference/tsxAttributeResolution15.types
index 8d56963ea39b4..8cd713c95f37c 100644
--- a/tests/baselines/reference/tsxAttributeResolution15.types
+++ b/tests/baselines/reference/tsxAttributeResolution15.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxAttributeResolution15.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxAttributeResolution16.js b/tests/baselines/reference/tsxAttributeResolution16.js
index 6c350dbe3c944..219173b873c7d 100644
--- a/tests/baselines/reference/tsxAttributeResolution16.js
+++ b/tests/baselines/reference/tsxAttributeResolution16.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxAttributeResolution16.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Address {
@@ -28,6 +30,7 @@ let a =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxAttributeResolution16.symbols b/tests/baselines/reference/tsxAttributeResolution16.symbols
index 656ebf568527d..7da8a05236bc5 100644
--- a/tests/baselines/reference/tsxAttributeResolution16.symbols
+++ b/tests/baselines/reference/tsxAttributeResolution16.symbols
@@ -1,58 +1,60 @@
//// [tests/cases/conformance/jsx/tsxAttributeResolution16.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Address {
->Address : Symbol(Address, Decl(file.tsx, 0, 32))
+>Address : Symbol(Address, Decl(file.tsx, 2, 32))
street: string;
->street : Symbol(Address.street, Decl(file.tsx, 2, 19))
+>street : Symbol(Address.street, Decl(file.tsx, 4, 19))
country: string;
->country : Symbol(Address.country, Decl(file.tsx, 3, 17))
+>country : Symbol(Address.country, Decl(file.tsx, 5, 17))
}
interface CanadianAddress extends Address {
->CanadianAddress : Symbol(CanadianAddress, Decl(file.tsx, 5, 1))
->Address : Symbol(Address, Decl(file.tsx, 0, 32))
+>CanadianAddress : Symbol(CanadianAddress, Decl(file.tsx, 7, 1))
+>Address : Symbol(Address, Decl(file.tsx, 2, 32))
postalCode: string;
->postalCode : Symbol(CanadianAddress.postalCode, Decl(file.tsx, 7, 43))
+>postalCode : Symbol(CanadianAddress.postalCode, Decl(file.tsx, 9, 43))
}
interface AmericanAddress extends Address {
->AmericanAddress : Symbol(AmericanAddress, Decl(file.tsx, 9, 1))
->Address : Symbol(Address, Decl(file.tsx, 0, 32))
+>AmericanAddress : Symbol(AmericanAddress, Decl(file.tsx, 11, 1))
+>Address : Symbol(Address, Decl(file.tsx, 2, 32))
zipCode: string;
->zipCode : Symbol(AmericanAddress.zipCode, Decl(file.tsx, 11, 43))
+>zipCode : Symbol(AmericanAddress.zipCode, Decl(file.tsx, 13, 43))
}
type Properties = CanadianAddress | AmericanAddress;
->Properties : Symbol(Properties, Decl(file.tsx, 13, 1))
->CanadianAddress : Symbol(CanadianAddress, Decl(file.tsx, 5, 1))
->AmericanAddress : Symbol(AmericanAddress, Decl(file.tsx, 9, 1))
+>Properties : Symbol(Properties, Decl(file.tsx, 15, 1))
+>CanadianAddress : Symbol(CanadianAddress, Decl(file.tsx, 7, 1))
+>AmericanAddress : Symbol(AmericanAddress, Decl(file.tsx, 11, 1))
export class AddressComp extends React.Component {
->AddressComp : Symbol(AddressComp, Decl(file.tsx, 15, 52))
+>AddressComp : Symbol(AddressComp, Decl(file.tsx, 17, 52))
>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), Decl(react.d.ts, 161, 66))
->Properties : Symbol(Properties, Decl(file.tsx, 13, 1))
+>Properties : Symbol(Properties, Decl(file.tsx, 15, 1))
public render() {
->render : Symbol(AddressComp.render, Decl(file.tsx, 17, 68))
+>render : Symbol(AddressComp.render, Decl(file.tsx, 19, 68))
return null;
}
}
let a =
->a : Symbol(a, Decl(file.tsx, 23, 3))
->AddressComp : Symbol(AddressComp, Decl(file.tsx, 15, 52))
->postalCode : Symbol(postalCode, Decl(file.tsx, 23, 20))
->street : Symbol(street, Decl(file.tsx, 23, 41))
->country : Symbol(country, Decl(file.tsx, 23, 60))
+>a : Symbol(a, Decl(file.tsx, 25, 3))
+>AddressComp : Symbol(AddressComp, Decl(file.tsx, 17, 52))
+>postalCode : Symbol(postalCode, Decl(file.tsx, 25, 20))
+>street : Symbol(street, Decl(file.tsx, 25, 41))
+>country : Symbol(country, Decl(file.tsx, 25, 60))
diff --git a/tests/baselines/reference/tsxAttributeResolution16.types b/tests/baselines/reference/tsxAttributeResolution16.types
index 8c80744a26ba7..95774ce462ee9 100644
--- a/tests/baselines/reference/tsxAttributeResolution16.types
+++ b/tests/baselines/reference/tsxAttributeResolution16.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxAttributeResolution16.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.errors.txt b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.errors.txt
index fc2e988955272..fbc3431e48b3d 100644
--- a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.errors.txt
+++ b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.errors.txt
@@ -2,6 +2,7 @@ file1.tsx(5,5): error TS2322: Type 'number' is not assignable to type 'string'.
==== my-component.tsx (0 errors) ====
+ ///
import * as React from 'react'
interface MyProps {
@@ -25,6 +26,6 @@ file1.tsx(5,5): error TS2322: Type 'number' is not assignable to type 'string'.
value: 42
~~~~~
!!! error TS2322: Type 'number' is not assignable to type 'string'.
-!!! related TS6500 my-component.tsx:9:5: The expected type comes from property 'value' which is declared here on type 'MyInnerProps'
+!!! related TS6500 my-component.tsx:10:5: The expected type comes from property 'value' which is declared here on type 'MyInnerProps'
}} />;
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.js b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.js
index 8e85e0774682e..df7de29dd41ed 100644
--- a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.js
+++ b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.js
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/tsxDeepAttributeAssignabilityError.tsx] ////
//// [my-component.tsx]
+///
import * as React from 'react'
interface MyProps {
@@ -62,6 +63,7 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.MyComponent = MyComponent;
+///
var React = __importStar(require("react"));
function MyComponent(_props) {
return React.createElement("span", null, "my component");
diff --git a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.symbols b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.symbols
index a7789e9860467..309cddf833895 100644
--- a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.symbols
+++ b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.symbols
@@ -1,31 +1,32 @@
//// [tests/cases/compiler/tsxDeepAttributeAssignabilityError.tsx] ////
=== my-component.tsx ===
+///
import * as React from 'react'
->React : Symbol(React, Decl(my-component.tsx, 0, 6))
+>React : Symbol(React, Decl(my-component.tsx, 1, 6))
interface MyProps {
->MyProps : Symbol(MyProps, Decl(my-component.tsx, 0, 30))
+>MyProps : Symbol(MyProps, Decl(my-component.tsx, 1, 30))
x: string;
->x : Symbol(MyProps.x, Decl(my-component.tsx, 2, 19))
+>x : Symbol(MyProps.x, Decl(my-component.tsx, 3, 19))
y: MyInnerProps;
->y : Symbol(MyProps.y, Decl(my-component.tsx, 3, 14))
->MyInnerProps : Symbol(MyInnerProps, Decl(my-component.tsx, 5, 1))
+>y : Symbol(MyProps.y, Decl(my-component.tsx, 4, 14))
+>MyInnerProps : Symbol(MyInnerProps, Decl(my-component.tsx, 6, 1))
}
interface MyInnerProps {
->MyInnerProps : Symbol(MyInnerProps, Decl(my-component.tsx, 5, 1))
+>MyInnerProps : Symbol(MyInnerProps, Decl(my-component.tsx, 6, 1))
value: string;
->value : Symbol(MyInnerProps.value, Decl(my-component.tsx, 7, 24))
+>value : Symbol(MyInnerProps.value, Decl(my-component.tsx, 8, 24))
}
export function MyComponent(_props: MyProps) {
->MyComponent : Symbol(MyComponent, Decl(my-component.tsx, 9, 1))
->_props : Symbol(_props, Decl(my-component.tsx, 11, 28))
->MyProps : Symbol(MyProps, Decl(my-component.tsx, 0, 30))
+>MyComponent : Symbol(MyComponent, Decl(my-component.tsx, 10, 1))
+>_props : Symbol(_props, Decl(my-component.tsx, 12, 28))
+>MyProps : Symbol(MyProps, Decl(my-component.tsx, 1, 30))
return my component ;
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
diff --git a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.types b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.types
index 8c9d75160e1d2..f87a127c04759 100644
--- a/tests/baselines/reference/tsxDeepAttributeAssignabilityError.types
+++ b/tests/baselines/reference/tsxDeepAttributeAssignabilityError.types
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/tsxDeepAttributeAssignabilityError.tsx] ////
=== my-component.tsx ===
+///
import * as React from 'react'
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution1.js b/tests/baselines/reference/tsxDefaultAttributesResolution1.js
index 7bcc1f4d5ed28..c590ca9425cb5 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution1.js
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -17,6 +19,7 @@ let p = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution1.symbols b/tests/baselines/reference/tsxDefaultAttributesResolution1.symbols
index 271de82559ee3..18f8ac1bfe77b 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution1.symbols
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution1.symbols
@@ -1,24 +1,26 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
x: boolean;
->x : Symbol(Prop.x, Decl(file.tsx, 2, 16))
+>x : Symbol(Prop.x, Decl(file.tsx, 4, 16))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 6, 1))
>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), Decl(react.d.ts, 161, 66))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 5, 50))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 50))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -28,7 +30,7 @@ class Poisoned extends React.Component {
// OK
let p = ;
->p : Symbol(p, Decl(file.tsx, 12, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
->x : Symbol(x, Decl(file.tsx, 12, 17))
+>p : Symbol(p, Decl(file.tsx, 14, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 6, 1))
+>x : Symbol(x, Decl(file.tsx, 14, 17))
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution1.types b/tests/baselines/reference/tsxDefaultAttributesResolution1.types
index 134f6979a25d8..0bc31f5a7455c 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution1.types
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution2.js b/tests/baselines/reference/tsxDefaultAttributesResolution2.js
index ba1b8768f1bd7..723f8783e74f2 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution2.js
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -17,6 +19,7 @@ let p = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution2.symbols b/tests/baselines/reference/tsxDefaultAttributesResolution2.symbols
index 41b948ce2dca3..e58172f76fec4 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution2.symbols
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution2.symbols
@@ -1,24 +1,26 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
x: true;
->x : Symbol(Prop.x, Decl(file.tsx, 2, 16))
+>x : Symbol(Prop.x, Decl(file.tsx, 4, 16))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 6, 1))
>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), Decl(react.d.ts, 161, 66))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 5, 50))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 50))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -28,7 +30,7 @@ class Poisoned extends React.Component {
// OK
let p = ;
->p : Symbol(p, Decl(file.tsx, 12, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
->x : Symbol(x, Decl(file.tsx, 12, 17))
+>p : Symbol(p, Decl(file.tsx, 14, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 6, 1))
+>x : Symbol(x, Decl(file.tsx, 14, 17))
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution2.types b/tests/baselines/reference/tsxDefaultAttributesResolution2.types
index bd3d999685b89..15a18c8a6d083 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution2.types
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt b/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt
index 71e18a1ba82b5..41a69a803ed09 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.errors.txt
@@ -1,7 +1,9 @@
-file.tsx(13,19): error TS2322: Type 'true' is not assignable to type 'false'.
+file.tsx(15,19): error TS2322: Type 'true' is not assignable to type 'false'.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
interface Prop {
@@ -17,4 +19,4 @@ file.tsx(13,19): error TS2322: Type 'true' is not assignable to type 'false'.
let p = ;
~
!!! error TS2322: Type 'true' is not assignable to type 'false'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Prop & { children?: ReactNode; }'
\ No newline at end of file
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Prop & { children?: ReactNode; }'
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.js b/tests/baselines/reference/tsxDefaultAttributesResolution3.js
index eb05b9d023aa9..49e27dca8d237 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution3.js
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -17,6 +19,7 @@ let p = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.symbols b/tests/baselines/reference/tsxDefaultAttributesResolution3.symbols
index 618c54c7a94d1..6e295fe1709b5 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution3.symbols
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.symbols
@@ -1,24 +1,26 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
x: false;
->x : Symbol(Prop.x, Decl(file.tsx, 2, 16))
+>x : Symbol(Prop.x, Decl(file.tsx, 4, 16))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 6, 1))
>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), Decl(react.d.ts, 161, 66))
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 5, 50))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 50))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -28,7 +30,7 @@ class Poisoned extends React.Component {
// Error
let p = ;
->p : Symbol(p, Decl(file.tsx, 12, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
->x : Symbol(x, Decl(file.tsx, 12, 17))
+>p : Symbol(p, Decl(file.tsx, 14, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 6, 1))
+>x : Symbol(x, Decl(file.tsx, 14, 17))
diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.types b/tests/baselines/reference/tsxDefaultAttributesResolution3.types
index 7ded4a8bb5ff0..6af0d52eea627 100644
--- a/tests/baselines/reference/tsxDefaultAttributesResolution3.types
+++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxFragmentChildrenCheck.js b/tests/baselines/reference/tsxFragmentChildrenCheck.js
index e54241f514295..a8a047ce6481d 100644
--- a/tests/baselines/reference/tsxFragmentChildrenCheck.js
+++ b/tests/baselines/reference/tsxFragmentChildrenCheck.js
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/tsxFragmentChildrenCheck.ts] ////
//// [my-component.tsx]
+///
declare var React: any;
export function MyComponent(props: any) {
@@ -32,6 +33,7 @@ export default RenderString
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MyComponent = MyComponent;
+///
function MyComponent(props) {
return React.createElement("span", null, "my component");
}
diff --git a/tests/baselines/reference/tsxFragmentChildrenCheck.symbols b/tests/baselines/reference/tsxFragmentChildrenCheck.symbols
index 563cce0b17167..20391ffcc9d0d 100644
--- a/tests/baselines/reference/tsxFragmentChildrenCheck.symbols
+++ b/tests/baselines/reference/tsxFragmentChildrenCheck.symbols
@@ -1,12 +1,13 @@
//// [tests/cases/compiler/tsxFragmentChildrenCheck.ts] ////
=== my-component.tsx ===
+///
declare var React: any;
->React : Symbol(React, Decl(my-component.tsx, 0, 11))
+>React : Symbol(React, Decl(my-component.tsx, 1, 11))
export function MyComponent(props: any) {
->MyComponent : Symbol(MyComponent, Decl(my-component.tsx, 0, 23))
->props : Symbol(props, Decl(my-component.tsx, 2, 28))
+>MyComponent : Symbol(MyComponent, Decl(my-component.tsx, 1, 23))
+>props : Symbol(props, Decl(my-component.tsx, 3, 28))
return my component ;
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
diff --git a/tests/baselines/reference/tsxFragmentChildrenCheck.types b/tests/baselines/reference/tsxFragmentChildrenCheck.types
index 6f79111fba099..08e5f2b3e98ef 100644
--- a/tests/baselines/reference/tsxFragmentChildrenCheck.types
+++ b/tests/baselines/reference/tsxFragmentChildrenCheck.types
@@ -1,6 +1,7 @@
//// [tests/cases/compiler/tsxFragmentChildrenCheck.ts] ////
=== my-component.tsx ===
+///
declare var React: any;
>React : any
diff --git a/tests/baselines/reference/tsxGenericAttributesType1.js b/tests/baselines/reference/tsxGenericAttributesType1.js
index c6b87260c1b14..b43c456575039 100644
--- a/tests/baselines/reference/tsxGenericAttributesType1.js
+++ b/tests/baselines/reference/tsxGenericAttributesType1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const decorator = function (Component: React.StatelessComponent): React.StatelessComponent {
@@ -17,6 +19,7 @@ const decorator3 = function (
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var decorator = function (Component) {
diff --git a/tests/baselines/reference/tsxGenericAttributesType1.symbols b/tests/baselines/reference/tsxGenericAttributesType1.symbols
index a4eb90ca2aa24..64aa6ece94fd8 100644
--- a/tests/baselines/reference/tsxGenericAttributesType1.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType1.symbols
@@ -1,68 +1,70 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const decorator = function (Component: React.StatelessComponent): React.StatelessComponent {
->decorator : Symbol(decorator, Decl(file.tsx, 2, 5))
->T : Symbol(T, Decl(file.tsx, 2, 28))
->Component : Symbol(Component, Decl(file.tsx, 2, 31))
+>decorator : Symbol(decorator, Decl(file.tsx, 4, 5))
+>T : Symbol(T, Decl(file.tsx, 4, 28))
+>Component : Symbol(Component, Decl(file.tsx, 4, 31))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 2, 28))
+>T : Symbol(T, Decl(file.tsx, 4, 28))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 2, 28))
+>T : Symbol(T, Decl(file.tsx, 4, 28))
return (props) =>
->props : Symbol(props, Decl(file.tsx, 3, 12))
->Component : Symbol(Component, Decl(file.tsx, 2, 31))
->props : Symbol(props, Decl(file.tsx, 3, 12))
->Component : Symbol(Component, Decl(file.tsx, 2, 31))
+>props : Symbol(props, Decl(file.tsx, 5, 12))
+>Component : Symbol(Component, Decl(file.tsx, 4, 31))
+>props : Symbol(props, Decl(file.tsx, 5, 12))
+>Component : Symbol(Component, Decl(file.tsx, 4, 31))
};
const decorator2 = function (Component: React.StatelessComponent): React.StatelessComponent {
->decorator2 : Symbol(decorator2, Decl(file.tsx, 6, 5))
->T : Symbol(T, Decl(file.tsx, 6, 29))
->x : Symbol(x, Decl(file.tsx, 6, 40))
->Component : Symbol(Component, Decl(file.tsx, 6, 54))
+>decorator2 : Symbol(decorator2, Decl(file.tsx, 8, 5))
+>T : Symbol(T, Decl(file.tsx, 8, 29))
+>x : Symbol(x, Decl(file.tsx, 8, 40))
+>Component : Symbol(Component, Decl(file.tsx, 8, 54))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 6, 29))
+>T : Symbol(T, Decl(file.tsx, 8, 29))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 6, 29))
+>T : Symbol(T, Decl(file.tsx, 8, 29))
return (props) =>
->props : Symbol(props, Decl(file.tsx, 7, 12))
->Component : Symbol(Component, Decl(file.tsx, 6, 54))
->props : Symbol(props, Decl(file.tsx, 7, 12))
->x : Symbol(x, Decl(file.tsx, 7, 43))
->Component : Symbol(Component, Decl(file.tsx, 6, 54))
+>props : Symbol(props, Decl(file.tsx, 9, 12))
+>Component : Symbol(Component, Decl(file.tsx, 8, 54))
+>props : Symbol(props, Decl(file.tsx, 9, 12))
+>x : Symbol(x, Decl(file.tsx, 9, 43))
+>Component : Symbol(Component, Decl(file.tsx, 8, 54))
};
const decorator3 = function (Component: React.StatelessComponent): React.StatelessComponent {
->decorator3 : Symbol(decorator3, Decl(file.tsx, 10, 5))
->T : Symbol(T, Decl(file.tsx, 10, 29))
->x : Symbol(x, Decl(file.tsx, 10, 40))
->U : Symbol(U, Decl(file.tsx, 10, 53))
->x : Symbol(x, Decl(file.tsx, 10, 65))
->Component : Symbol(Component, Decl(file.tsx, 10, 80))
+>decorator3 : Symbol(decorator3, Decl(file.tsx, 12, 5))
+>T : Symbol(T, Decl(file.tsx, 12, 29))
+>x : Symbol(x, Decl(file.tsx, 12, 40))
+>U : Symbol(U, Decl(file.tsx, 12, 53))
+>x : Symbol(x, Decl(file.tsx, 12, 65))
+>Component : Symbol(Component, Decl(file.tsx, 12, 80))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 10, 29))
+>T : Symbol(T, Decl(file.tsx, 12, 29))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 10, 29))
+>T : Symbol(T, Decl(file.tsx, 12, 29))
return (props) =>
->props : Symbol(props, Decl(file.tsx, 11, 12))
->Component : Symbol(Component, Decl(file.tsx, 10, 80))
->x : Symbol(x, Decl(file.tsx, 11, 32))
->props : Symbol(props, Decl(file.tsx, 11, 12))
->Component : Symbol(Component, Decl(file.tsx, 10, 80))
+>props : Symbol(props, Decl(file.tsx, 13, 12))
+>Component : Symbol(Component, Decl(file.tsx, 12, 80))
+>x : Symbol(x, Decl(file.tsx, 13, 32))
+>props : Symbol(props, Decl(file.tsx, 13, 12))
+>Component : Symbol(Component, Decl(file.tsx, 12, 80))
};
diff --git a/tests/baselines/reference/tsxGenericAttributesType1.types b/tests/baselines/reference/tsxGenericAttributesType1.types
index 5dbdb330b6346..586a0057d53a9 100644
--- a/tests/baselines/reference/tsxGenericAttributesType1.types
+++ b/tests/baselines/reference/tsxGenericAttributesType1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType2.js b/tests/baselines/reference/tsxGenericAttributesType2.js
index 9378020d24573..88d2db8fbaa12 100644
--- a/tests/baselines/reference/tsxGenericAttributesType2.js
+++ b/tests/baselines/reference/tsxGenericAttributesType2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const decorator4 = function (Component: React.StatelessComponent): React.StatelessComponent {
@@ -9,6 +11,7 @@ const decorator4 = function (Component: React.Stateless
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var decorator4 = function (Component) {
diff --git a/tests/baselines/reference/tsxGenericAttributesType2.symbols b/tests/baselines/reference/tsxGenericAttributesType2.symbols
index bffdca678c6df..c53c4a61e7f50 100644
--- a/tests/baselines/reference/tsxGenericAttributesType2.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType2.symbols
@@ -1,26 +1,28 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const decorator4 = function (Component: React.StatelessComponent): React.StatelessComponent {
->decorator4 : Symbol(decorator4, Decl(file.tsx, 2, 5))
->T : Symbol(T, Decl(file.tsx, 2, 29))
->x : Symbol(x, Decl(file.tsx, 2, 40))
->Component : Symbol(Component, Decl(file.tsx, 2, 54))
+>decorator4 : Symbol(decorator4, Decl(file.tsx, 4, 5))
+>T : Symbol(T, Decl(file.tsx, 4, 29))
+>x : Symbol(x, Decl(file.tsx, 4, 40))
+>Component : Symbol(Component, Decl(file.tsx, 4, 54))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 2, 29))
+>T : Symbol(T, Decl(file.tsx, 4, 29))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->T : Symbol(T, Decl(file.tsx, 2, 29))
+>T : Symbol(T, Decl(file.tsx, 4, 29))
return (props) =>
->props : Symbol(props, Decl(file.tsx, 3, 12))
->Component : Symbol(Component, Decl(file.tsx, 2, 54))
->props : Symbol(props, Decl(file.tsx, 3, 12))
->y : Symbol(y, Decl(file.tsx, 3, 43))
->Component : Symbol(Component, Decl(file.tsx, 2, 54))
+>props : Symbol(props, Decl(file.tsx, 5, 12))
+>Component : Symbol(Component, Decl(file.tsx, 4, 54))
+>props : Symbol(props, Decl(file.tsx, 5, 12))
+>y : Symbol(y, Decl(file.tsx, 5, 43))
+>Component : Symbol(Component, Decl(file.tsx, 4, 54))
};
diff --git a/tests/baselines/reference/tsxGenericAttributesType2.types b/tests/baselines/reference/tsxGenericAttributesType2.types
index 7561217f00582..3e54063a3624c 100644
--- a/tests/baselines/reference/tsxGenericAttributesType2.types
+++ b/tests/baselines/reference/tsxGenericAttributesType2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType3.js b/tests/baselines/reference/tsxGenericAttributesType3.js
index f2232eba8209d..5f8965e1bc637 100644
--- a/tests/baselines/reference/tsxGenericAttributesType3.js
+++ b/tests/baselines/reference/tsxGenericAttributesType3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
class B1 extends React.Component {
@@ -16,6 +18,7 @@ class B extends React.Component {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxGenericAttributesType3.symbols b/tests/baselines/reference/tsxGenericAttributesType3.symbols
index f0d30777c4cbe..3e2e9d0d8e8f2 100644
--- a/tests/baselines/reference/tsxGenericAttributesType3.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType3.symbols
@@ -1,21 +1,23 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
class B1 extends React.Component {
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
->T : Symbol(T, Decl(file.tsx, 2, 9))
->x : Symbol(x, Decl(file.tsx, 2, 20))
->x : Symbol(x, Decl(file.tsx, 2, 36))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
+>x : Symbol(x, Decl(file.tsx, 4, 20))
+>x : Symbol(x, Decl(file.tsx, 4, 36))
>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), Decl(react.d.ts, 161, 66))
->T : Symbol(T, Decl(file.tsx, 2, 9))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
render() {
->render : Symbol(B1.render, Decl(file.tsx, 2, 82))
+>render : Symbol(B1.render, Decl(file.tsx, 4, 82))
return hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -23,21 +25,21 @@ class B1 extends React.Component
}
}
class B extends React.Component {
->B : Symbol(B, Decl(file.tsx, 6, 1))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>B : Symbol(B, Decl(file.tsx, 8, 1))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
>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), Decl(react.d.ts, 161, 66))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
render() {
->render : Symbol(B.render, Decl(file.tsx, 7, 43))
+>render : Symbol(B.render, Decl(file.tsx, 9, 43))
return ;
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(B, Decl(file.tsx, 6, 1))
+>this : Symbol(B, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->x : Symbol(x, Decl(file.tsx, 9, 34))
+>x : Symbol(x, Decl(file.tsx, 11, 34))
}
}
diff --git a/tests/baselines/reference/tsxGenericAttributesType3.types b/tests/baselines/reference/tsxGenericAttributesType3.types
index 1454a26907ceb..3399a76bcfbdf 100644
--- a/tests/baselines/reference/tsxGenericAttributesType3.types
+++ b/tests/baselines/reference/tsxGenericAttributesType3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType4.js b/tests/baselines/reference/tsxGenericAttributesType4.js
index bf51d7bfcda65..d6e9be6283c29 100644
--- a/tests/baselines/reference/tsxGenericAttributesType4.js
+++ b/tests/baselines/reference/tsxGenericAttributesType4.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
class B1 extends React.Component {
@@ -16,6 +18,7 @@ class B extends React.Component {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxGenericAttributesType4.symbols b/tests/baselines/reference/tsxGenericAttributesType4.symbols
index d48fa5df69a73..fe00e689ba589 100644
--- a/tests/baselines/reference/tsxGenericAttributesType4.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType4.symbols
@@ -1,20 +1,22 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
class B1 extends React.Component {
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
->T : Symbol(T, Decl(file.tsx, 2, 9))
->x : Symbol(x, Decl(file.tsx, 2, 20))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
+>x : Symbol(x, Decl(file.tsx, 4, 20))
>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), Decl(react.d.ts, 161, 66))
->T : Symbol(T, Decl(file.tsx, 2, 9))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
render() {
->render : Symbol(B1.render, Decl(file.tsx, 2, 66))
+>render : Symbol(B1.render, Decl(file.tsx, 4, 66))
return hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -22,21 +24,21 @@ class B1 extends React.Component {
}
}
class B extends React.Component {
->B : Symbol(B, Decl(file.tsx, 6, 1))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>B : Symbol(B, Decl(file.tsx, 8, 1))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
>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), Decl(react.d.ts, 161, 66))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
render() {
->render : Symbol(B.render, Decl(file.tsx, 7, 43))
+>render : Symbol(B.render, Decl(file.tsx, 9, 43))
return ;
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol(B, Decl(file.tsx, 6, 1))
+>this : Symbol(B, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->x : Symbol(x, Decl(file.tsx, 9, 34))
+>x : Symbol(x, Decl(file.tsx, 11, 34))
}
}
diff --git a/tests/baselines/reference/tsxGenericAttributesType4.types b/tests/baselines/reference/tsxGenericAttributesType4.types
index 8e036e07cb916..4fcf64a9c36f3 100644
--- a/tests/baselines/reference/tsxGenericAttributesType4.types
+++ b/tests/baselines/reference/tsxGenericAttributesType4.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType5.js b/tests/baselines/reference/tsxGenericAttributesType5.js
index 67e6d8e05088a..242b00ac67ae5 100644
--- a/tests/baselines/reference/tsxGenericAttributesType5.js
+++ b/tests/baselines/reference/tsxGenericAttributesType5.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
class B1 extends React.Component {
@@ -17,6 +19,7 @@ class B extends React.Component {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxGenericAttributesType5.symbols b/tests/baselines/reference/tsxGenericAttributesType5.symbols
index d0e55b6662f1b..4d0a66642afdc 100644
--- a/tests/baselines/reference/tsxGenericAttributesType5.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType5.symbols
@@ -1,20 +1,22 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
class B1 extends React.Component {
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
->T : Symbol(T, Decl(file.tsx, 2, 9))
->x : Symbol(x, Decl(file.tsx, 2, 20))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
+>x : Symbol(x, Decl(file.tsx, 4, 20))
>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), Decl(react.d.ts, 161, 66))
->T : Symbol(T, Decl(file.tsx, 2, 9))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
render() {
->render : Symbol(B1.render, Decl(file.tsx, 2, 66))
+>render : Symbol(B1.render, Decl(file.tsx, 4, 66))
return hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -22,25 +24,25 @@ class B1 extends React.Component {
}
}
class B extends React.Component {
->B : Symbol(B, Decl(file.tsx, 6, 1))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>B : Symbol(B, Decl(file.tsx, 8, 1))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
>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), Decl(react.d.ts, 161, 66))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
props: U;
->props : Symbol(B.props, Decl(file.tsx, 7, 43))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>props : Symbol(B.props, Decl(file.tsx, 9, 43))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
render() {
->render : Symbol(B.render, Decl(file.tsx, 8, 13))
+>render : Symbol(B.render, Decl(file.tsx, 10, 13))
return ;
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
->this.props : Symbol(B.props, Decl(file.tsx, 7, 43))
->this : Symbol(B, Decl(file.tsx, 6, 1))
->props : Symbol(B.props, Decl(file.tsx, 7, 43))
->x : Symbol(x, Decl(file.tsx, 10, 34))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
+>this.props : Symbol(B.props, Decl(file.tsx, 9, 43))
+>this : Symbol(B, Decl(file.tsx, 8, 1))
+>props : Symbol(B.props, Decl(file.tsx, 9, 43))
+>x : Symbol(x, Decl(file.tsx, 12, 34))
}
}
diff --git a/tests/baselines/reference/tsxGenericAttributesType5.types b/tests/baselines/reference/tsxGenericAttributesType5.types
index afc5fb0fe273b..0e64cca2184f0 100644
--- a/tests/baselines/reference/tsxGenericAttributesType5.types
+++ b/tests/baselines/reference/tsxGenericAttributesType5.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType6.js b/tests/baselines/reference/tsxGenericAttributesType6.js
index 4d9a909b87c7e..0109230e20b70 100644
--- a/tests/baselines/reference/tsxGenericAttributesType6.js
+++ b/tests/baselines/reference/tsxGenericAttributesType6.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
class B1 extends React.Component {
@@ -17,6 +19,7 @@ class B extends React.Component {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxGenericAttributesType6.symbols b/tests/baselines/reference/tsxGenericAttributesType6.symbols
index a403caec38fce..f1171b510b708 100644
--- a/tests/baselines/reference/tsxGenericAttributesType6.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType6.symbols
@@ -1,21 +1,23 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
class B1 extends React.Component {
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
->T : Symbol(T, Decl(file.tsx, 2, 9))
->x : Symbol(x, Decl(file.tsx, 2, 20))
->x : Symbol(x, Decl(file.tsx, 2, 36))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
+>x : Symbol(x, Decl(file.tsx, 4, 20))
+>x : Symbol(x, Decl(file.tsx, 4, 36))
>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), Decl(react.d.ts, 161, 66))
->T : Symbol(T, Decl(file.tsx, 2, 9))
+>T : Symbol(T, Decl(file.tsx, 4, 9))
render() {
->render : Symbol(B1.render, Decl(file.tsx, 2, 82))
+>render : Symbol(B1.render, Decl(file.tsx, 4, 82))
return hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -23,25 +25,25 @@ class B1 extends React.Component
}
}
class B extends React.Component {
->B : Symbol(B, Decl(file.tsx, 6, 1))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>B : Symbol(B, Decl(file.tsx, 8, 1))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
>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), Decl(react.d.ts, 161, 66))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
props: U;
->props : Symbol(B.props, Decl(file.tsx, 7, 43))
->U : Symbol(U, Decl(file.tsx, 7, 8))
+>props : Symbol(B.props, Decl(file.tsx, 9, 43))
+>U : Symbol(U, Decl(file.tsx, 9, 8))
render() {
->render : Symbol(B.render, Decl(file.tsx, 8, 13))
+>render : Symbol(B.render, Decl(file.tsx, 10, 13))
return ;
->B1 : Symbol(B1, Decl(file.tsx, 0, 32))
->this.props : Symbol(B.props, Decl(file.tsx, 7, 43))
->this : Symbol(B, Decl(file.tsx, 6, 1))
->props : Symbol(B.props, Decl(file.tsx, 7, 43))
->x : Symbol(x, Decl(file.tsx, 10, 34))
+>B1 : Symbol(B1, Decl(file.tsx, 2, 32))
+>this.props : Symbol(B.props, Decl(file.tsx, 9, 43))
+>this : Symbol(B, Decl(file.tsx, 8, 1))
+>props : Symbol(B.props, Decl(file.tsx, 9, 43))
+>x : Symbol(x, Decl(file.tsx, 12, 34))
}
}
diff --git a/tests/baselines/reference/tsxGenericAttributesType6.types b/tests/baselines/reference/tsxGenericAttributesType6.types
index 08eecd3c339ac..debed756c5297 100644
--- a/tests/baselines/reference/tsxGenericAttributesType6.types
+++ b/tests/baselines/reference/tsxGenericAttributesType6.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType7.js b/tests/baselines/reference/tsxGenericAttributesType7.js
index fdc394fbce913..c216038f5bb58 100644
--- a/tests/baselines/reference/tsxGenericAttributesType7.js
+++ b/tests/baselines/reference/tsxGenericAttributesType7.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
declare function Component(props: T) : JSX.Element;
@@ -14,6 +16,7 @@ const decorator1 = function (props: U) {
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var decorator = function (props) {
diff --git a/tests/baselines/reference/tsxGenericAttributesType7.symbols b/tests/baselines/reference/tsxGenericAttributesType7.symbols
index 23bde3baf23ce..491fd285bcae6 100644
--- a/tests/baselines/reference/tsxGenericAttributesType7.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType7.symbols
@@ -1,37 +1,39 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function Component(props: T) : JSX.Element;
->Component : Symbol(Component, Decl(file.tsx, 0, 32))
->T : Symbol(T, Decl(file.tsx, 2, 27))
->props : Symbol(props, Decl(file.tsx, 2, 30))
->T : Symbol(T, Decl(file.tsx, 2, 27))
+>Component : Symbol(Component, Decl(file.tsx, 2, 32))
+>T : Symbol(T, Decl(file.tsx, 4, 27))
+>props : Symbol(props, Decl(file.tsx, 4, 30))
+>T : Symbol(T, Decl(file.tsx, 4, 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))
->U : Symbol(U, Decl(file.tsx, 3, 28))
->props : Symbol(props, Decl(file.tsx, 3, 31))
->U : Symbol(U, Decl(file.tsx, 3, 28))
+>decorator : Symbol(decorator, Decl(file.tsx, 5, 5))
+>U : Symbol(U, Decl(file.tsx, 5, 28))
+>props : Symbol(props, Decl(file.tsx, 5, 31))
+>U : Symbol(U, Decl(file.tsx, 5, 28))
return ;
->Component : Symbol(Component, Decl(file.tsx, 0, 32))
->props : Symbol(props, Decl(file.tsx, 3, 31))
+>Component : Symbol(Component, Decl(file.tsx, 2, 32))
+>props : Symbol(props, Decl(file.tsx, 5, 31))
}
const decorator1 = function (props: U) {
->decorator1 : Symbol(decorator1, Decl(file.tsx, 7, 5))
->U : Symbol(U, Decl(file.tsx, 7, 29))
->x : Symbol(x, Decl(file.tsx, 7, 40))
->props : Symbol(props, Decl(file.tsx, 7, 52))
->U : Symbol(U, Decl(file.tsx, 7, 29))
+>decorator1 : Symbol(decorator1, Decl(file.tsx, 9, 5))
+>U : Symbol(U, Decl(file.tsx, 9, 29))
+>x : Symbol(x, Decl(file.tsx, 9, 40))
+>props : Symbol(props, Decl(file.tsx, 9, 52))
+>U : Symbol(U, Decl(file.tsx, 9, 29))
return ;
->Component : Symbol(Component, Decl(file.tsx, 0, 32))
->props : Symbol(props, Decl(file.tsx, 7, 52))
->x : Symbol(x, Decl(file.tsx, 8, 32))
+>Component : Symbol(Component, Decl(file.tsx, 2, 32))
+>props : Symbol(props, Decl(file.tsx, 9, 52))
+>x : Symbol(x, Decl(file.tsx, 10, 32))
}
diff --git a/tests/baselines/reference/tsxGenericAttributesType7.types b/tests/baselines/reference/tsxGenericAttributesType7.types
index 2b3f07619b249..6fd5ccbddc975 100644
--- a/tests/baselines/reference/tsxGenericAttributesType7.types
+++ b/tests/baselines/reference/tsxGenericAttributesType7.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType8.js b/tests/baselines/reference/tsxGenericAttributesType8.js
index 54f511b01d0dd..221766f37b560 100644
--- a/tests/baselines/reference/tsxGenericAttributesType8.js
+++ b/tests/baselines/reference/tsxGenericAttributesType8.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
declare function Component(props: T) : JSX.Element;
@@ -14,6 +16,7 @@ const decorator1 = function (props: U) {
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var decorator = function (props) {
diff --git a/tests/baselines/reference/tsxGenericAttributesType8.symbols b/tests/baselines/reference/tsxGenericAttributesType8.symbols
index 8c64bc45626b8..fa8f6855bf820 100644
--- a/tests/baselines/reference/tsxGenericAttributesType8.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType8.symbols
@@ -1,36 +1,38 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function Component(props: T) : JSX.Element;
->Component : Symbol(Component, Decl(file.tsx, 0, 32))
->T : Symbol(T, Decl(file.tsx, 2, 27))
->props : Symbol(props, Decl(file.tsx, 2, 30))
->T : Symbol(T, Decl(file.tsx, 2, 27))
+>Component : Symbol(Component, Decl(file.tsx, 2, 32))
+>T : Symbol(T, Decl(file.tsx, 4, 27))
+>props : Symbol(props, Decl(file.tsx, 4, 30))
+>T : Symbol(T, Decl(file.tsx, 4, 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))
->U : Symbol(U, Decl(file.tsx, 3, 28))
->props : Symbol(props, Decl(file.tsx, 3, 31))
->U : Symbol(U, Decl(file.tsx, 3, 28))
+>decorator : Symbol(decorator, Decl(file.tsx, 5, 5))
+>U : Symbol(U, Decl(file.tsx, 5, 28))
+>props : Symbol(props, Decl(file.tsx, 5, 31))
+>U : Symbol(U, Decl(file.tsx, 5, 28))
return ;
->Component : Symbol(Component, Decl(file.tsx, 0, 32))
->props : Symbol(props, Decl(file.tsx, 3, 31))
+>Component : Symbol(Component, Decl(file.tsx, 2, 32))
+>props : Symbol(props, Decl(file.tsx, 5, 31))
}
const decorator1 = function (props: U) {
->decorator1 : Symbol(decorator1, Decl(file.tsx, 7, 5))
->U : Symbol(U, Decl(file.tsx, 7, 29))
->x : Symbol(x, Decl(file.tsx, 7, 40))
->props : Symbol(props, Decl(file.tsx, 7, 52))
->U : Symbol(U, Decl(file.tsx, 7, 29))
+>decorator1 : Symbol(decorator1, Decl(file.tsx, 9, 5))
+>U : Symbol(U, Decl(file.tsx, 9, 29))
+>x : Symbol(x, Decl(file.tsx, 9, 40))
+>props : Symbol(props, Decl(file.tsx, 9, 52))
+>U : Symbol(U, Decl(file.tsx, 9, 29))
return ;
->Component : Symbol(Component, Decl(file.tsx, 0, 32))
->props : Symbol(props, Decl(file.tsx, 7, 52))
+>Component : Symbol(Component, Decl(file.tsx, 2, 32))
+>props : Symbol(props, Decl(file.tsx, 9, 52))
}
diff --git a/tests/baselines/reference/tsxGenericAttributesType8.types b/tests/baselines/reference/tsxGenericAttributesType8.types
index 5ac3eefd19be8..475aa907881fa 100644
--- a/tests/baselines/reference/tsxGenericAttributesType8.types
+++ b/tests/baselines/reference/tsxGenericAttributesType8.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxGenericAttributesType9.js b/tests/baselines/reference/tsxGenericAttributesType9.js
index 5d94e6f103b5d..41ac56528c077 100644
--- a/tests/baselines/reference/tsxGenericAttributesType9.js
+++ b/tests/baselines/reference/tsxGenericAttributesType9.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
export function makeP (Ctor: React.ComponentClass
) {
@@ -17,6 +19,7 @@ export function makeP
(Ctor: React.ComponentClass
) {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxGenericAttributesType9.symbols b/tests/baselines/reference/tsxGenericAttributesType9.symbols
index 3e5a887d294dc..87bbf5a5a83bf 100644
--- a/tests/baselines/reference/tsxGenericAttributesType9.symbols
+++ b/tests/baselines/reference/tsxGenericAttributesType9.symbols
@@ -1,33 +1,35 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
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))
+>makeP : Symbol(makeP, Decl(file.tsx, 2, 32))
+>P : Symbol(P, Decl(file.tsx, 4, 22))
+>Ctor : Symbol(Ctor, Decl(file.tsx, 4, 25))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 205, 5))
->P : Symbol(P, Decl(file.tsx, 2, 22))
+>P : Symbol(P, Decl(file.tsx, 4, 22))
return class extends React.PureComponent
{
>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, 180, 5))
->P : Symbol(P, Decl(file.tsx, 2, 22))
+>P : Symbol(P, Decl(file.tsx, 4, 22))
public render(): JSX.Element {
->render : Symbol((Anonymous class).render, Decl(file.tsx, 3, 52))
+>render : Symbol((Anonymous class).render, Decl(file.tsx, 5, 52))
>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))
+>Ctor : Symbol(Ctor, Decl(file.tsx, 4, 25))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
->this : Symbol((Anonymous class), Decl(file.tsx, 3, 7))
+>this : Symbol((Anonymous class), Decl(file.tsx, 5, 7))
>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 44b6dd3720218..f0833d28c5d86 100644
--- a/tests/baselines/reference/tsxGenericAttributesType9.types
+++ b/tests/baselines/reference/tsxGenericAttributesType9.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.js b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.js
index 130b9c8410481..2aba365e5dd88 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.js
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -16,6 +18,7 @@ let x =
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var x = ;
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols
index 67f98e827f1c0..79988b40f67bf 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.symbols
@@ -1,36 +1,38 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
}
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))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
>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), Decl(react.d.ts, 161, 66))
->P : Symbol(P, Decl(file.tsx, 7, 21))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
internalProp: P;
->internalProp : Symbol(MyComp.internalProp, Decl(file.tsx, 7, 63))
->P : Symbol(P, Decl(file.tsx, 7, 21))
+>internalProp : Symbol(MyComp.internalProp, Decl(file.tsx, 9, 63))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
}
let x =
->x : Symbol(x, Decl(file.tsx, 11, 3))
->MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
->a : Symbol(a, Decl(file.tsx, 11, 15))
->b : Symbol(b, Decl(file.tsx, 11, 22))
+>x : Symbol(x, Decl(file.tsx, 13, 3))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>a : Symbol(a, Decl(file.tsx, 13, 15))
+>b : Symbol(b, Decl(file.tsx, 13, 22))
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.types b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.types
index d68d864afe651..666d6a054677a 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.types
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.js b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.js
index ec7a124d701ff..2a55f84d76dae 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.js
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -17,6 +19,7 @@ let x1 =
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var x = ;
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.symbols b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.symbols
index 0b74d243ae821..900c08d38793d 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.symbols
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.symbols
@@ -1,39 +1,41 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
}
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))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
>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), Decl(react.d.ts, 161, 66))
->P : Symbol(P, Decl(file.tsx, 7, 21))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
internalProp: P;
->internalProp : Symbol(MyComp.internalProp, Decl(file.tsx, 7, 63))
->P : Symbol(P, Decl(file.tsx, 7, 21))
+>internalProp : Symbol(MyComp.internalProp, Decl(file.tsx, 9, 63))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
}
let x =
->x : Symbol(x, Decl(file.tsx, 11, 3))
->MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
+>x : Symbol(x, Decl(file.tsx, 13, 3))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
let x1 =
->x1 : Symbol(x1, Decl(file.tsx, 12, 3))
->MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
->a : Symbol(a, Decl(file.tsx, 12, 16))
+>x1 : Symbol(x1, Decl(file.tsx, 14, 3))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>a : Symbol(a, Decl(file.tsx, 14, 16))
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.types b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.types
index ac7d47d92f2b5..63ac8acbba1dc 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.types
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
index 6b64e564ce6d1..54f82ec391b7e 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt
@@ -1,8 +1,10 @@
-file.tsx(13,11): error TS2739: Type '{}' is missing the following properties from type 'Prop': a, b
-file.tsx(19,18): error TS2322: Type 'string' is not assignable to type 'number'.
+file.tsx(15,11): error TS2739: Type '{}' is missing the following properties from type 'Prop': a, b
+file.tsx(21,18): error TS2322: Type 'string' is not assignable to type 'number'.
==== file.tsx (2 errors) ====
+ ///
+
import React = require('react');
interface Prop {
@@ -26,4 +28,4 @@ file.tsx(19,18): error TS2322: Type 'string' is not assignable to type 'number'.
let x2 =
~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'a' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Prop & { children?: ReactNode; }'
\ No newline at end of file
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'a' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Prop & { children?: ReactNode; }'
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.js b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.js
index ddcae6321975b..3bbe469e13d5d 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.js
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface Prop {
@@ -23,6 +25,7 @@ let x2 =
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
// Error
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.symbols b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.symbols
index 1c159baae58f2..1f0cd7e6a93f8 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.symbols
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.symbols
@@ -1,48 +1,50 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
a: number,
->a : Symbol(Prop.a, Decl(file.tsx, 2, 16))
+>a : Symbol(Prop.a, Decl(file.tsx, 4, 16))
b: string
->b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
+>b : Symbol(Prop.b, Decl(file.tsx, 5, 14))
}
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))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
+>Prop : Symbol(Prop, Decl(file.tsx, 2, 32))
>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), Decl(react.d.ts, 161, 66))
->P : Symbol(P, Decl(file.tsx, 7, 21))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
internalProp: P;
->internalProp : Symbol(MyComp.internalProp, Decl(file.tsx, 7, 69))
->P : Symbol(P, Decl(file.tsx, 7, 21))
+>internalProp : Symbol(MyComp.internalProp, Decl(file.tsx, 9, 69))
+>P : Symbol(P, Decl(file.tsx, 9, 21))
}
// Error
let x1 =
->x1 : Symbol(x1, Decl(file.tsx, 12, 3))
->MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
+>x1 : Symbol(x1, Decl(file.tsx, 14, 3))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
// OK
let x =
->x : Symbol(x, Decl(file.tsx, 15, 3))
->MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
->a : Symbol(a, Decl(file.tsx, 15, 15))
->b : Symbol(b, Decl(file.tsx, 15, 22))
+>x : Symbol(x, Decl(file.tsx, 17, 3))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>a : Symbol(a, Decl(file.tsx, 17, 15))
+>b : Symbol(b, Decl(file.tsx, 17, 22))
// Error
let x2 =
->x2 : Symbol(x2, Decl(file.tsx, 18, 3))
->MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
->a : Symbol(a, Decl(file.tsx, 18, 16))
+>x2 : Symbol(x2, Decl(file.tsx, 20, 3))
+>MyComp : Symbol(MyComp, Decl(file.tsx, 7, 1))
+>a : Symbol(a, Decl(file.tsx, 20, 16))
diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.types b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.types
index 4b4deb85c7dd5..6632dd17d1426 100644
--- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.types
+++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.js b/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.js
index 97ec3b5aa6f46..843697dac4592 100644
--- a/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.js
+++ b/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.js
@@ -18,6 +18,7 @@ declare module 'a' {
}
//// [foo.tsx]
+///
import { Test } from 'a';
const Foo = (
);
diff --git a/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.symbols b/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.symbols
index 903b04eac6c1e..a13e0c998f8fa 100644
--- a/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.symbols
+++ b/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.symbols
@@ -1,5 +1,15 @@
//// [tests/cases/compiler/tsxResolveExternalModuleExportsTypes.ts] ////
+=== foo.tsx ===
+///
+import { Test } from 'a';
+>Test : Symbol(Test, Decl(foo.tsx, 1, 8))
+
+const Foo = ( );
+>Foo : Symbol(Foo, Decl(foo.tsx, 2, 5))
+>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
+>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
+
=== /node_modules/@types/a/index.d.ts ===
declare var a: a.Foo;
>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23))
@@ -33,12 +43,3 @@ declare module 'a' {
}
}
-=== foo.tsx ===
-import { Test } from 'a';
->Test : Symbol(Test, Decl(foo.tsx, 0, 8))
-
-const Foo = ( );
->Foo : Symbol(Foo, Decl(foo.tsx, 1, 5))
->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
-
diff --git a/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.types b/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.types
index ca2c5e47d5aad..851203a8c9f32 100644
--- a/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.types
+++ b/tests/baselines/reference/tsxResolveExternalModuleExportsTypes.types
@@ -5,6 +5,24 @@ Assignability cache: 1,000
Type Count: 5,000
Instantiation count: 10,000
+=== foo.tsx ===
+///
+import { Test } from 'a';
+>Test : null
+> : ^^^^
+
+const Foo = ( );
+>Foo : JSX.Element
+> : ^^^^^^^^^^^
+>( ) : JSX.Element
+> : ^^^^^^^^^^^
+> : JSX.Element
+> : ^^^^^^^^^^^
+>h1 : any
+> : ^^^
+>h1 : any
+> : ^^^
+
=== /node_modules/@types/a/index.d.ts ===
declare var a: a.Foo;
>a : import("/node_modules/@types/a/index.d.ts").Foo
@@ -37,20 +55,3 @@ declare module 'a' {
}
}
-=== foo.tsx ===
-import { Test } from 'a';
->Test : null
-> : ^^^^
-
-const Foo = ( );
->Foo : JSX.Element
-> : ^^^^^^^^^^^
->( ) : JSX.Element
-> : ^^^^^^^^^^^
-> : JSX.Element
-> : ^^^^^^^^^^^
->h1 : any
-> : ^^^
->h1 : any
-> : ^^^
-
diff --git a/tests/baselines/reference/tsxSfcReturnNull.errors.txt b/tests/baselines/reference/tsxSfcReturnNull.errors.txt
index 028a9f04c0c5a..ae911c6de8eab 100644
--- a/tests/baselines/reference/tsxSfcReturnNull.errors.txt
+++ b/tests/baselines/reference/tsxSfcReturnNull.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react');
const Foo = (props: any) => null;
diff --git a/tests/baselines/reference/tsxSfcReturnNull.js b/tests/baselines/reference/tsxSfcReturnNull.js
index 32730a958a2ec..843acb41675ca 100644
--- a/tests/baselines/reference/tsxSfcReturnNull.js
+++ b/tests/baselines/reference/tsxSfcReturnNull.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnNull.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const Foo = (props: any) => null;
@@ -13,6 +15,7 @@ const foo = ;
const G = ;
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxSfcReturnNull.symbols b/tests/baselines/reference/tsxSfcReturnNull.symbols
index 81906e68281d8..67872d09dcad9 100644
--- a/tests/baselines/reference/tsxSfcReturnNull.symbols
+++ b/tests/baselines/reference/tsxSfcReturnNull.symbols
@@ -1,26 +1,28 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnNull.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const Foo = (props: any) => null;
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
->props : Symbol(props, Decl(file.tsx, 2, 13))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
+>props : Symbol(props, Decl(file.tsx, 4, 13))
function Greet(x: {name?: string}) {
->Greet : Symbol(Greet, Decl(file.tsx, 2, 33))
->x : Symbol(x, Decl(file.tsx, 4, 15))
->name : Symbol(name, Decl(file.tsx, 4, 19))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 33))
+>x : Symbol(x, Decl(file.tsx, 6, 15))
+>name : Symbol(name, Decl(file.tsx, 6, 19))
return null;
}
const foo = ;
->foo : Symbol(foo, Decl(file.tsx, 8, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
+>foo : Symbol(foo, Decl(file.tsx, 10, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
const G = ;
->G : Symbol(G, Decl(file.tsx, 9, 5))
->Greet : Symbol(Greet, Decl(file.tsx, 2, 33))
+>G : Symbol(G, Decl(file.tsx, 11, 5))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 33))
diff --git a/tests/baselines/reference/tsxSfcReturnNull.types b/tests/baselines/reference/tsxSfcReturnNull.types
index d5019a32d4f2e..70ae79118b4f7 100644
--- a/tests/baselines/reference/tsxSfcReturnNull.types
+++ b/tests/baselines/reference/tsxSfcReturnNull.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnNull.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.errors.txt b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.errors.txt
index 028a9f04c0c5a..ae911c6de8eab 100644
--- a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.errors.txt
+++ b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react');
const Foo = (props: any) => null;
diff --git a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js
index 0d7c1a06e66f3..b6adb3fc9ed3e 100644
--- a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js
+++ b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnNullStrictNullChecks.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const Foo = (props: any) => null;
@@ -13,6 +15,7 @@ const foo = ;
const G = ;
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.symbols b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.symbols
index 1f9852f77d64b..824e15c88a8ac 100644
--- a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.symbols
+++ b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.symbols
@@ -1,26 +1,28 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnNullStrictNullChecks.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const Foo = (props: any) => null;
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
->props : Symbol(props, Decl(file.tsx, 2, 13))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
+>props : Symbol(props, Decl(file.tsx, 4, 13))
function Greet(x: {name?: string}) {
->Greet : Symbol(Greet, Decl(file.tsx, 2, 33))
->x : Symbol(x, Decl(file.tsx, 4, 15))
->name : Symbol(name, Decl(file.tsx, 4, 19))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 33))
+>x : Symbol(x, Decl(file.tsx, 6, 15))
+>name : Symbol(name, Decl(file.tsx, 6, 19))
return null;
}
const foo = ;
->foo : Symbol(foo, Decl(file.tsx, 8, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
+>foo : Symbol(foo, Decl(file.tsx, 10, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
const G = ;
->G : Symbol(G, Decl(file.tsx, 9, 5))
->Greet : Symbol(Greet, Decl(file.tsx, 2, 33))
+>G : Symbol(G, Decl(file.tsx, 11, 5))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 33))
diff --git a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types
index 810d031011a76..91bf14d3898b8 100644
--- a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types
+++ b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnNullStrictNullChecks.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.errors.txt b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.errors.txt
index 5826a14fcd667..1730c72a885a5 100644
--- a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.errors.txt
+++ b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.errors.txt
@@ -1,10 +1,12 @@
-file.tsx(9,14): error TS2786: 'Foo' cannot be used as a JSX component.
+file.tsx(11,14): error TS2786: 'Foo' cannot be used as a JSX component.
Its return type 'undefined' is not a valid JSX element.
-file.tsx(10,12): error TS2786: 'Greet' cannot be used as a JSX component.
+file.tsx(12,12): error TS2786: 'Greet' cannot be used as a JSX component.
Its return type 'undefined' is not a valid JSX element.
==== file.tsx (2 errors) ====
+ ///
+
import React = require('react');
const Foo = (props: any) => undefined;
diff --git a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js
index 575c0bc7229e3..978cda214500d 100644
--- a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js
+++ b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnUndefinedStrictNullChecks.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const Foo = (props: any) => undefined;
@@ -14,6 +16,7 @@ const G = ;
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var Foo = function (props) { return undefined; };
diff --git a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.symbols b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.symbols
index 91d7762217104..f77e020703359 100644
--- a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.symbols
+++ b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.symbols
@@ -1,18 +1,20 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnUndefinedStrictNullChecks.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const Foo = (props: any) => undefined;
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
->props : Symbol(props, Decl(file.tsx, 2, 13))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
+>props : Symbol(props, Decl(file.tsx, 4, 13))
>undefined : Symbol(undefined)
function Greet(x: {name?: string}) {
->Greet : Symbol(Greet, Decl(file.tsx, 2, 38))
->x : Symbol(x, Decl(file.tsx, 3, 15))
->name : Symbol(name, Decl(file.tsx, 3, 19))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 38))
+>x : Symbol(x, Decl(file.tsx, 5, 15))
+>name : Symbol(name, Decl(file.tsx, 5, 19))
return undefined;
>undefined : Symbol(undefined)
@@ -20,10 +22,10 @@ function Greet(x: {name?: string}) {
// Error
const foo = ;
->foo : Symbol(foo, Decl(file.tsx, 8, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
+>foo : Symbol(foo, Decl(file.tsx, 10, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
const G = ;
->G : Symbol(G, Decl(file.tsx, 9, 5))
->Greet : Symbol(Greet, Decl(file.tsx, 2, 38))
+>G : Symbol(G, Decl(file.tsx, 11, 5))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 38))
diff --git a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types
index 1775cb845457b..e4a8da3a3a2c3 100644
--- a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types
+++ b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSfcReturnUndefinedStrictNullChecks.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution1.js b/tests/baselines/reference/tsxSpreadAttributesResolution1.js
index f623ffbb380f9..b6bce1c6bd262 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution1.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
class Poisoned extends React.Component<{}, {}> {
@@ -18,6 +20,7 @@ let y = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
index d216d3de00746..33ac26b83975f 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution1.symbols
@@ -1,17 +1,19 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
class Poisoned extends React.Component<{}, {}> {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 0, 32))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 2, 32))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 2, 48))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 4, 48))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -20,15 +22,15 @@ class Poisoned extends React.Component<{}, {}> {
}
const obj = {};
->obj : Symbol(obj, Decl(file.tsx, 8, 5))
+>obj : Symbol(obj, Decl(file.tsx, 10, 5))
// OK
let p = ;
->p : Symbol(p, Decl(file.tsx, 11, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 0, 32))
->obj : Symbol(obj, Decl(file.tsx, 8, 5))
+>p : Symbol(p, Decl(file.tsx, 13, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 2, 32))
+>obj : Symbol(obj, Decl(file.tsx, 10, 5))
let y = ;
->y : Symbol(y, Decl(file.tsx, 12, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 0, 32))
+>y : Symbol(y, Decl(file.tsx, 14, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 2, 32))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution1.types b/tests/baselines/reference/tsxSpreadAttributesResolution1.types
index 9e8b1f677acc9..c7cc40821e0a3 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution1.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution10.errors.txt
index c6bf7020ab844..2068dfacf2c04 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution10.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.errors.txt
@@ -1,10 +1,12 @@
-file.tsx(19,23): error TS2322: Type '3' is not assignable to type '2'.
-file.tsx(20,25): error TS2322: Type 'string' is not assignable to type '2'.
-file.tsx(21,25): error TS2322: Type '3' is not assignable to type '2'.
-file.tsx(22,15): error TS2322: Type 'true' is not assignable to type '2'.
+file.tsx(21,23): error TS2322: Type '3' is not assignable to type '2'.
+file.tsx(22,25): error TS2322: Type 'string' is not assignable to type '2'.
+file.tsx(23,25): error TS2322: Type '3' is not assignable to type '2'.
+file.tsx(24,15): error TS2322: Type 'true' is not assignable to type '2'.
==== file.tsx (4 errors) ====
+ ///
+
import React = require('react');
interface OptionProp {
@@ -26,17 +28,17 @@ file.tsx(22,15): error TS2322: Type 'true' is not assignable to type '2'.
let y = ;
~
!!! error TS2322: Type '3' is not assignable to type '2'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
let y1 = ;
~
!!! error TS2322: Type 'string' is not assignable to type '2'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
let y2 = ;
~
!!! error TS2322: Type '3' is not assignable to type '2'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
let y3 = ;
~
!!! error TS2322: Type 'true' is not assignable to type '2'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & OptionProp & { children?: ReactNode; }'
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.js b/tests/baselines/reference/tsxSpreadAttributesResolution10.js
index 4a2d54524c214..aa01852476b13 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution10.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface OptionProp {
@@ -27,6 +29,7 @@ let y3 = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution10.symbols
index b7a4f465da2ef..4bb191f1ffad5 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution10.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.symbols
@@ -1,25 +1,27 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface OptionProp {
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
x?: 2
->x : Symbol(OptionProp.x, Decl(file.tsx, 2, 22))
+>x : Symbol(OptionProp.x, Decl(file.tsx, 4, 22))
}
class Opt extends React.Component {
->Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
+>Opt : Symbol(Opt, Decl(file.tsx, 6, 1))
>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), Decl(react.d.ts, 161, 66))
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Opt.render, Decl(file.tsx, 6, 51))
+>render : Symbol(Opt.render, Decl(file.tsx, 8, 51))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -28,38 +30,38 @@ class Opt extends React.Component {
}
const obj: OptionProp = {};
->obj : Symbol(obj, Decl(file.tsx, 12, 5))
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>obj : Symbol(obj, Decl(file.tsx, 14, 5))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
const obj1: OptionProp = {
->obj1 : Symbol(obj1, Decl(file.tsx, 13, 5))
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>obj1 : Symbol(obj1, Decl(file.tsx, 15, 5))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
x: 2
->x : Symbol(x, Decl(file.tsx, 13, 26))
+>x : Symbol(x, Decl(file.tsx, 15, 26))
}
// Error
let y = ;
->y : Symbol(y, Decl(file.tsx, 18, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
->obj : Symbol(obj, Decl(file.tsx, 12, 5))
->x : Symbol(x, Decl(file.tsx, 18, 21))
+>y : Symbol(y, Decl(file.tsx, 20, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 6, 1))
+>obj : Symbol(obj, Decl(file.tsx, 14, 5))
+>x : Symbol(x, Decl(file.tsx, 20, 21))
let y1 = ;
->y1 : Symbol(y1, Decl(file.tsx, 19, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
->obj1 : Symbol(obj1, Decl(file.tsx, 13, 5))
->x : Symbol(x, Decl(file.tsx, 19, 23))
+>y1 : Symbol(y1, Decl(file.tsx, 21, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 6, 1))
+>obj1 : Symbol(obj1, Decl(file.tsx, 15, 5))
+>x : Symbol(x, Decl(file.tsx, 21, 23))
let y2 = ;
->y2 : Symbol(y2, Decl(file.tsx, 20, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
->obj1 : Symbol(obj1, Decl(file.tsx, 13, 5))
->x : Symbol(x, Decl(file.tsx, 20, 23))
+>y2 : Symbol(y2, Decl(file.tsx, 22, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 6, 1))
+>obj1 : Symbol(obj1, Decl(file.tsx, 15, 5))
+>x : Symbol(x, Decl(file.tsx, 22, 23))
let y3 = ;
->y3 : Symbol(y3, Decl(file.tsx, 21, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 4, 1))
->x : Symbol(x, Decl(file.tsx, 21, 13))
+>y3 : Symbol(y3, Decl(file.tsx, 23, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 6, 1))
+>x : Symbol(x, Decl(file.tsx, 23, 13))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.types b/tests/baselines/reference/tsxSpreadAttributesResolution10.types
index 63b45232ee158..728dd147d3d14 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution10.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.js b/tests/baselines/reference/tsxSpreadAttributesResolution11.js
index 917a5124b344d..7331b0128fa12 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution11.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const obj = {};
@@ -35,6 +37,7 @@ let x5 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols
index b63cf8ff25225..5d32f6797bcb9 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.symbols
@@ -1,53 +1,55 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const obj = {};
->obj : Symbol(obj, Decl(file.tsx, 2, 5))
+>obj : Symbol(obj, Decl(file.tsx, 4, 5))
const obj1: { x: 2 } = {
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->x : Symbol(x, Decl(file.tsx, 3, 13))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>x : Symbol(x, Decl(file.tsx, 5, 13))
x: 2
->x : Symbol(x, Decl(file.tsx, 3, 24))
+>x : Symbol(x, Decl(file.tsx, 5, 24))
}
const obj3: {y: true, overwrite: string } = {
->obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
->y : Symbol(y, Decl(file.tsx, 6, 13))
->overwrite : Symbol(overwrite, Decl(file.tsx, 6, 21))
+>obj3 : Symbol(obj3, Decl(file.tsx, 8, 5))
+>y : Symbol(y, Decl(file.tsx, 8, 13))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 8, 21))
y: true,
->y : Symbol(y, Decl(file.tsx, 6, 45))
+>y : Symbol(y, Decl(file.tsx, 8, 45))
overwrite: "hi"
->overwrite : Symbol(overwrite, Decl(file.tsx, 7, 12))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 9, 12))
}
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
+>Prop : Symbol(Prop, Decl(file.tsx, 11, 1))
x: 2
->x : Symbol(Prop.x, Decl(file.tsx, 11, 16))
+>x : Symbol(Prop.x, Decl(file.tsx, 13, 16))
y: true
->y : Symbol(Prop.y, Decl(file.tsx, 12, 8))
+>y : Symbol(Prop.y, Decl(file.tsx, 14, 8))
overwrite: string
->overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 13, 11))
+>overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 15, 11))
}
class OverWriteAttr extends React.Component {
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
>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), Decl(react.d.ts, 161, 66))
->Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
+>Prop : Symbol(Prop, Decl(file.tsx, 11, 1))
render() {
->render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
+>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 19, 55))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -56,50 +58,50 @@ class OverWriteAttr extends React.Component {
}
let anyobj: any;
->anyobj : Symbol(anyobj, Decl(file.tsx, 23, 3))
+>anyobj : Symbol(anyobj, Decl(file.tsx, 25, 3))
// OK
let x =
->x : Symbol(x, Decl(file.tsx, 25, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->obj : Symbol(obj, Decl(file.tsx, 2, 5))
->y : Symbol(y, Decl(file.tsx, 25, 31))
->overwrite : Symbol(overwrite, Decl(file.tsx, 25, 33))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
+>x : Symbol(x, Decl(file.tsx, 27, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>obj : Symbol(obj, Decl(file.tsx, 4, 5))
+>y : Symbol(y, Decl(file.tsx, 27, 31))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 27, 33))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
let x1 =
->x1 : Symbol(x1, Decl(file.tsx, 26, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
+>x1 : Symbol(x1, Decl(file.tsx, 28, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>obj3 : Symbol(obj3, Decl(file.tsx, 8, 5))
let x2 =
->x2 : Symbol(x2, Decl(file.tsx, 27, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->x : Symbol(x, Decl(file.tsx, 27, 23))
->overwrite : Symbol(overwrite, Decl(file.tsx, 27, 29))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->y : Symbol(y, Decl(file.tsx, 27, 60))
+>x2 : Symbol(x2, Decl(file.tsx, 29, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>x : Symbol(x, Decl(file.tsx, 29, 23))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 29, 29))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>y : Symbol(y, Decl(file.tsx, 29, 60))
let x3 =
->x3 : Symbol(x3, Decl(file.tsx, 28, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->overwrite : Symbol(overwrite, Decl(file.tsx, 28, 23))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->x : Symbol(x, Decl(file.tsx, 28, 48))
->y : Symbol(y, Decl(file.tsx, 28, 60))
->x : Symbol(x, Decl(file.tsx, 28, 68))
->overwrite : Symbol(overwrite, Decl(file.tsx, 28, 74))
+>x3 : Symbol(x3, Decl(file.tsx, 30, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 30, 23))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>x : Symbol(x, Decl(file.tsx, 30, 48))
+>y : Symbol(y, Decl(file.tsx, 30, 60))
+>x : Symbol(x, Decl(file.tsx, 30, 68))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 30, 74))
let x4 =
->x4 : Symbol(x4, Decl(file.tsx, 29, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->x : Symbol(x, Decl(file.tsx, 29, 29))
->overwrite : Symbol(overwrite, Decl(file.tsx, 29, 41))
->y : Symbol(y, Decl(file.tsx, 29, 67))
+>x4 : Symbol(x4, Decl(file.tsx, 31, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>x : Symbol(x, Decl(file.tsx, 31, 29))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 31, 41))
+>y : Symbol(y, Decl(file.tsx, 31, 67))
let x5 =
->x5 : Symbol(x5, Decl(file.tsx, 30, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->anyobj : Symbol(anyobj, Decl(file.tsx, 23, 3))
+>x5 : Symbol(x5, Decl(file.tsx, 32, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>anyobj : Symbol(anyobj, Decl(file.tsx, 25, 3))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.types b/tests/baselines/reference/tsxSpreadAttributesResolution11.types
index 45f80b3765f92..5388518e211c0 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution11.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt
index 1b31811de1f07..a5bbf5f1bb096 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.errors.txt
@@ -1,11 +1,13 @@
-file.tsx(27,33): error TS2322: Type 'true' is not assignable to type 'false'.
-file.tsx(28,50): error TS2322: Type '3' is not assignable to type '2'.
-file.tsx(30,11): error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is not assignable to type 'Prop'.
+file.tsx(29,33): error TS2322: Type 'true' is not assignable to type 'false'.
+file.tsx(30,50): error TS2322: Type '3' is not assignable to type '2'.
+file.tsx(32,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'.
==== file.tsx (3 errors) ====
+ ///
+
import React = require('react');
const obj = {};
@@ -35,11 +37,11 @@ file.tsx(30,11): error TS2322: Type '{ y: true; x: 2; overwrite: string; }' is n
let x =
~
!!! error TS2322: Type 'true' is not assignable to type 'false'.
-!!! related TS6500 file.tsx:14:5: The expected type comes from property 'y' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Prop & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:16:5: The expected type comes from property 'y' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Prop & { children?: ReactNode; }'
let x1 =
~
!!! error TS2322: Type '3' is not assignable to type '2'.
-!!! related TS6500 file.tsx:13:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Prop & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:15:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Prop & { children?: ReactNode; }'
let x2 =
let x3 =
~~~~~~~~~~~~~
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.js b/tests/baselines/reference/tsxSpreadAttributesResolution12.js
index ea09198ca28e2..ae939a4008dd0 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution12.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const obj = {};
@@ -36,6 +38,7 @@ let x3 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution12.symbols
index db84f351e907d..62da45ead4754 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution12.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.symbols
@@ -1,53 +1,55 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const obj = {};
->obj : Symbol(obj, Decl(file.tsx, 2, 5))
+>obj : Symbol(obj, Decl(file.tsx, 4, 5))
const obj1: {x: 2} = {
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->x : Symbol(x, Decl(file.tsx, 3, 13))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>x : Symbol(x, Decl(file.tsx, 5, 13))
x: 2
->x : Symbol(x, Decl(file.tsx, 3, 22))
+>x : Symbol(x, Decl(file.tsx, 5, 22))
}
const obj3: {y: false, overwrite: string} = {
->obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
->y : Symbol(y, Decl(file.tsx, 6, 13))
->overwrite : Symbol(overwrite, Decl(file.tsx, 6, 22))
+>obj3 : Symbol(obj3, Decl(file.tsx, 8, 5))
+>y : Symbol(y, Decl(file.tsx, 8, 13))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 8, 22))
y: false,
->y : Symbol(y, Decl(file.tsx, 6, 45))
+>y : Symbol(y, Decl(file.tsx, 8, 45))
overwrite: "hi"
->overwrite : Symbol(overwrite, Decl(file.tsx, 7, 13))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 9, 13))
}
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
+>Prop : Symbol(Prop, Decl(file.tsx, 11, 1))
x: 2
->x : Symbol(Prop.x, Decl(file.tsx, 11, 16))
+>x : Symbol(Prop.x, Decl(file.tsx, 13, 16))
y: false
->y : Symbol(Prop.y, Decl(file.tsx, 12, 8))
+>y : Symbol(Prop.y, Decl(file.tsx, 14, 8))
overwrite: string
->overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 13, 12))
+>overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 15, 12))
}
class OverWriteAttr extends React.Component {
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
>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), Decl(react.d.ts, 161, 66))
->Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
+>Prop : Symbol(Prop, Decl(file.tsx, 11, 1))
render() {
->render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
+>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 19, 55))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -56,36 +58,36 @@ class OverWriteAttr extends React.Component {
}
let anyobj: any;
->anyobj : Symbol(anyobj, Decl(file.tsx, 23, 3))
+>anyobj : Symbol(anyobj, Decl(file.tsx, 25, 3))
// Error
let x =
->x : Symbol(x, Decl(file.tsx, 26, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->obj : Symbol(obj, Decl(file.tsx, 2, 5))
->y : Symbol(y, Decl(file.tsx, 26, 31))
->overwrite : Symbol(overwrite, Decl(file.tsx, 26, 33))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
+>x : Symbol(x, Decl(file.tsx, 28, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>obj : Symbol(obj, Decl(file.tsx, 4, 5))
+>y : Symbol(y, Decl(file.tsx, 28, 31))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 28, 33))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
let x1 =
->x1 : Symbol(x1, Decl(file.tsx, 27, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->overwrite : Symbol(overwrite, Decl(file.tsx, 27, 23))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->x : Symbol(x, Decl(file.tsx, 27, 48))
->y : Symbol(y, Decl(file.tsx, 27, 60))
+>x1 : Symbol(x1, Decl(file.tsx, 29, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 29, 23))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>x : Symbol(x, Decl(file.tsx, 29, 48))
+>y : Symbol(y, Decl(file.tsx, 29, 60))
let x2 =
->x2 : Symbol(x2, Decl(file.tsx, 28, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->anyobj : Symbol(anyobj, Decl(file.tsx, 23, 3))
->x : Symbol(x, Decl(file.tsx, 28, 35))
+>x2 : Symbol(x2, Decl(file.tsx, 30, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>anyobj : Symbol(anyobj, Decl(file.tsx, 25, 3))
+>x : Symbol(x, Decl(file.tsx, 30, 35))
let x3 =
->x3 : Symbol(x3, Decl(file.tsx, 29, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->overwrite : Symbol(overwrite, Decl(file.tsx, 29, 23))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->y : Symbol(y, Decl(file.tsx, 29, 54))
+>x3 : Symbol(x3, Decl(file.tsx, 31, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 31, 23))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>y : Symbol(y, Decl(file.tsx, 31, 54))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.types b/tests/baselines/reference/tsxSpreadAttributesResolution12.types
index f2417f01c7858..466efea632b06 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution12.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution13.js b/tests/baselines/reference/tsxSpreadAttributesResolution13.js
index 07a8f36984b22..697798c096ced 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution13.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution13.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface ComponentProps {
@@ -32,6 +34,7 @@ function ChildComponent({ property1 }: AnotherComponentProps) {
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Component;
var React = require("react");
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols
index 64162f9a82321..6953c5b9b4477 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution13.symbols
@@ -1,61 +1,63 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ComponentProps {
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
property1: string;
->property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 2, 26))
+>property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 4, 26))
property2: number;
->property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 3, 22))
+>property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 5, 22))
}
export default function Component(props: ComponentProps) {
->Component : Symbol(Component, Decl(file.tsx, 5, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>Component : Symbol(Component, Decl(file.tsx, 7, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
let condition1: boolean;
->condition1 : Symbol(condition1, Decl(file.tsx, 8, 7))
+>condition1 : Symbol(condition1, Decl(file.tsx, 10, 7))
if (condition1) {
->condition1 : Symbol(condition1, Decl(file.tsx, 8, 7))
+>condition1 : Symbol(condition1, Decl(file.tsx, 10, 7))
return (
->ChildComponent : Symbol(ChildComponent, Decl(file.tsx, 21, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
+>ChildComponent : Symbol(ChildComponent, Decl(file.tsx, 23, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
);
}
else {
return ( );
->ChildComponent : Symbol(ChildComponent, Decl(file.tsx, 21, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->property1 : Symbol(property1, Decl(file.tsx, 15, 42))
+>ChildComponent : Symbol(ChildComponent, Decl(file.tsx, 23, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>property1 : Symbol(property1, Decl(file.tsx, 17, 42))
}
}
interface AnotherComponentProps {
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 17, 1))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 19, 1))
property1: string;
->property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 19, 33))
+>property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 21, 33))
}
function ChildComponent({ property1 }: AnotherComponentProps) {
->ChildComponent : Symbol(ChildComponent, Decl(file.tsx, 21, 1))
->property1 : Symbol(property1, Decl(file.tsx, 23, 25))
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 17, 1))
+>ChildComponent : Symbol(ChildComponent, Decl(file.tsx, 23, 1))
+>property1 : Symbol(property1, Decl(file.tsx, 25, 25))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 19, 1))
return (
{property1}
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->property1 : Symbol(property1, Decl(file.tsx, 23, 25))
+>property1 : Symbol(property1, Decl(file.tsx, 25, 25))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution13.types b/tests/baselines/reference/tsxSpreadAttributesResolution13.types
index cc4ac513ee39c..5524402d29222 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution13.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution13.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt
index c6e9b0a2fdde1..2f336ca0e23af 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution14.errors.txt
@@ -1,8 +1,10 @@
-file.tsx(11,38): error TS2322: Type '{ Property1: true; property1: string; property2: number; }' is not assignable to type 'IntrinsicAttributes & AnotherComponentProps'.
+file.tsx(13,38): error TS2322: Type '{ Property1: true; property1: string; property2: number; }' is not assignable to type 'IntrinsicAttributes & AnotherComponentProps'.
Property 'Property1' does not exist on type 'IntrinsicAttributes & AnotherComponentProps'. Did you mean 'property1'?
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
interface ComponentProps {
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution14.js b/tests/baselines/reference/tsxSpreadAttributesResolution14.js
index 5e6b7a2fb3ef9..74beaadb9057a 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution14.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution14.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface ComponentProps {
@@ -27,6 +29,7 @@ function AnotherComponent({ property1 }: AnotherComponentProps) {
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Component;
var React = require("react");
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution14.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution14.symbols
index 12c5ce506729f..6cd6e8eb1400b 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution14.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution14.symbols
@@ -1,50 +1,52 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ComponentProps {
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
property1: string;
->property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 2, 26))
+>property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 4, 26))
property2: number;
->property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 3, 22))
+>property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 5, 22))
}
export default function Component(props: ComponentProps) {
->Component : Symbol(Component, Decl(file.tsx, 5, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>Component : Symbol(Component, Decl(file.tsx, 7, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
return (
// Error extra property
->AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 16, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->Property1 : Symbol(Property1, Decl(file.tsx, 10, 36))
+>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 18, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>Property1 : Symbol(Property1, Decl(file.tsx, 12, 36))
);
}
interface AnotherComponentProps {
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 12, 1))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 14, 1))
property1: string;
->property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 14, 33))
+>property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 16, 33))
}
function AnotherComponent({ property1 }: AnotherComponentProps) {
->AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 16, 1))
->property1 : Symbol(property1, Decl(file.tsx, 18, 27))
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 12, 1))
+>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 18, 1))
+>property1 : Symbol(property1, Decl(file.tsx, 20, 27))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 14, 1))
return (
{property1}
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->property1 : Symbol(property1, Decl(file.tsx, 18, 27))
+>property1 : Symbol(property1, Decl(file.tsx, 20, 27))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution14.types b/tests/baselines/reference/tsxSpreadAttributesResolution14.types
index 85ed528a3515b..b9654259ef992 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution14.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution14.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution15.js b/tests/baselines/reference/tsxSpreadAttributesResolution15.js
index 60c81bcbf00ba..7de266b7dccd3 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution15.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution15.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface ComponentProps {
@@ -28,6 +30,7 @@ function AnotherComponent({ property1 }: AnotherComponentProps) {
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Component;
var React = require("react");
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols
index 0de5e96677cd1..732367838446a 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution15.symbols
@@ -1,56 +1,58 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ComponentProps {
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
property1: string;
->property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 2, 26))
+>property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 4, 26))
property2: number;
->property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 3, 22))
+>property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 5, 22))
}
export default function Component(props: ComponentProps) {
->Component : Symbol(Component, Decl(file.tsx, 5, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>Component : Symbol(Component, Decl(file.tsx, 7, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
return (
->AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 17, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->property2 : Symbol(property2, Decl(file.tsx, 9, 36))
->AnotherProperty1 : Symbol(AnotherProperty1, Decl(file.tsx, 9, 46))
+>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 19, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>property2 : Symbol(property2, Decl(file.tsx, 11, 36))
+>AnotherProperty1 : Symbol(AnotherProperty1, Decl(file.tsx, 11, 46))
);
}
interface AnotherComponentProps {
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 11, 1))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 13, 1))
property1: string;
->property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 13, 33))
+>property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 15, 33))
AnotherProperty1: string;
->AnotherProperty1 : Symbol(AnotherComponentProps.AnotherProperty1, Decl(file.tsx, 14, 22))
+>AnotherProperty1 : Symbol(AnotherComponentProps.AnotherProperty1, Decl(file.tsx, 16, 22))
property2: boolean;
->property2 : Symbol(AnotherComponentProps.property2, Decl(file.tsx, 15, 29))
+>property2 : Symbol(AnotherComponentProps.property2, Decl(file.tsx, 17, 29))
}
function AnotherComponent({ property1 }: AnotherComponentProps) {
->AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 17, 1))
->property1 : Symbol(property1, Decl(file.tsx, 19, 27))
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 11, 1))
+>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 19, 1))
+>property1 : Symbol(property1, Decl(file.tsx, 21, 27))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 13, 1))
return (
{property1}
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->property1 : Symbol(property1, Decl(file.tsx, 19, 27))
+>property1 : Symbol(property1, Decl(file.tsx, 21, 27))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution15.types b/tests/baselines/reference/tsxSpreadAttributesResolution15.types
index d56dc6a442a31..f3dfd1def96a7 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution15.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution15.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt
index 53f0dfe2e97ba..06dade4a3f077 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution16.errors.txt
@@ -1,7 +1,9 @@
-file.tsx(11,10): error TS2741: Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }' but required in type 'AnotherComponentProps'.
+file.tsx(13,10): error TS2741: Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }' but required in type 'AnotherComponentProps'.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
interface ComponentProps {
@@ -15,7 +17,7 @@ file.tsx(11,10): error TS2741: Property 'AnotherProperty1' is missing in type '{
~~~~~~~~~~~~~~~~
!!! error TS2741: Property 'AnotherProperty1' is missing in type '{ property1: string; property2: number; }' but required in type 'AnotherComponentProps'.
-!!! related TS2728 file.tsx:17:5: 'AnotherProperty1' is declared here.
+!!! related TS2728 file.tsx:19:5: 'AnotherProperty1' is declared here.
);
}
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution16.js b/tests/baselines/reference/tsxSpreadAttributesResolution16.js
index e0f180c9ae2fc..17600872fc5ef 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution16.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution16.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface ComponentProps {
@@ -29,6 +31,7 @@ function AnotherComponent({ property1 }: AnotherComponentProps) {
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Component;
var React = require("react");
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution16.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution16.symbols
index 90ac07a8a7815..a059ae4292789 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution16.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution16.symbols
@@ -1,55 +1,57 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ComponentProps {
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
property1: string;
->property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 2, 26))
+>property1 : Symbol(ComponentProps.property1, Decl(file.tsx, 4, 26))
property2: number;
->property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 3, 22))
+>property2 : Symbol(ComponentProps.property2, Decl(file.tsx, 5, 22))
}
export default function Component(props: ComponentProps) {
->Component : Symbol(Component, Decl(file.tsx, 5, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
->ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
+>Component : Symbol(Component, Decl(file.tsx, 7, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
+>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 2, 32))
return (
// Error: missing property
->AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 18, 1))
->props : Symbol(props, Decl(file.tsx, 7, 34))
+>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 20, 1))
+>props : Symbol(props, Decl(file.tsx, 9, 34))
);
}
interface AnotherComponentProps {
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 12, 1))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 14, 1))
property1: string;
->property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 14, 33))
+>property1 : Symbol(AnotherComponentProps.property1, Decl(file.tsx, 16, 33))
AnotherProperty1: string;
->AnotherProperty1 : Symbol(AnotherComponentProps.AnotherProperty1, Decl(file.tsx, 15, 22))
+>AnotherProperty1 : Symbol(AnotherComponentProps.AnotherProperty1, Decl(file.tsx, 17, 22))
property2: boolean;
->property2 : Symbol(AnotherComponentProps.property2, Decl(file.tsx, 16, 29))
+>property2 : Symbol(AnotherComponentProps.property2, Decl(file.tsx, 18, 29))
}
function AnotherComponent({ property1 }: AnotherComponentProps) {
->AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 18, 1))
->property1 : Symbol(property1, Decl(file.tsx, 20, 27))
->AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 12, 1))
+>AnotherComponent : Symbol(AnotherComponent, Decl(file.tsx, 20, 1))
+>property1 : Symbol(property1, Decl(file.tsx, 22, 27))
+>AnotherComponentProps : Symbol(AnotherComponentProps, Decl(file.tsx, 14, 1))
return (
{property1}
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
->property1 : Symbol(property1, Decl(file.tsx, 20, 27))
+>property1 : Symbol(property1, Decl(file.tsx, 22, 27))
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
);
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution16.types b/tests/baselines/reference/tsxSpreadAttributesResolution16.types
index e59d83dce5545..270e0ea57ccc2 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution16.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution16.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
index 0500334342cb3..5066c900a1f04 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
@@ -1,15 +1,17 @@
-file.tsx(20,10): error TS2739: Type '{}' is missing the following properties from type 'PoisonedProp': x, y
-file.tsx(21,10): error TS2739: Type '{}' is missing the following properties from type 'PoisonedProp': x, y
-file.tsx(22,19): error TS2322: Type 'boolean' is not assignable to type 'string'.
-file.tsx(22,21): error TS2322: Type 'true' is not assignable to type '"2"'.
-file.tsx(23,10): error TS2322: Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
+file.tsx(22,10): error TS2739: Type '{}' is missing the following properties from type 'PoisonedProp': x, y
+file.tsx(23,10): error TS2739: Type '{}' is missing the following properties from type 'PoisonedProp': x, y
+file.tsx(24,19): error TS2322: Type 'boolean' is not assignable to type 'string'.
+file.tsx(24,21): error TS2322: Type 'true' is not assignable to type '"2"'.
+file.tsx(25,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'.
-file.tsx(24,40): error TS2322: Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'.
+file.tsx(26,40): error TS2322: Type '{ X: string; x: number; y: "2"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'.
Property 'X' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'. Did you mean 'x'?
==== file.tsx (6 errors) ====
+ ///
+
import React = require('react');
interface PoisonedProp {
@@ -38,10 +40,10 @@ file.tsx(24,40): error TS2322: Type '{ X: string; x: number; y: "2"; }' is not a
let z = ;
~
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'x' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'
~
!!! error TS2322: Type 'true' is not assignable to type '"2"'.
-!!! related TS6500 file.tsx:5:5: The expected type comes from property 'y' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'
+!!! related TS6500 file.tsx:7:5: The expected type comes from property 'y' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & PoisonedProp & { children?: ReactNode; }'
let w = ;
~~~~~~~~
!!! error TS2322: Type '{ x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.js b/tests/baselines/reference/tsxSpreadAttributesResolution2.js
index b32d3d61be271..4bc00285b15b7 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution2.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface PoisonedProp {
@@ -28,6 +30,7 @@ let w1 = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution2.symbols
index 293500110c4ab..058cdac66b268 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution2.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.symbols
@@ -1,28 +1,30 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface PoisonedProp {
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
x: string;
->x : Symbol(PoisonedProp.x, Decl(file.tsx, 2, 24))
+>x : Symbol(PoisonedProp.x, Decl(file.tsx, 4, 24))
y: "2";
->y : Symbol(PoisonedProp.y, Decl(file.tsx, 3, 14))
+>y : Symbol(PoisonedProp.y, Decl(file.tsx, 5, 14))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
>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), Decl(react.d.ts, 161, 66))
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 9, 58))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -31,40 +33,40 @@ class Poisoned extends React.Component {
}
const obj = {};
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
// OK
;
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->x : Symbol(x, Decl(file.tsx, 16, 15))
->y : Symbol(y, Decl(file.tsx, 16, 23))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>x : Symbol(x, Decl(file.tsx, 18, 15))
+>y : Symbol(y, Decl(file.tsx, 18, 23))
// Error
let p = ;
->p : Symbol(p, Decl(file.tsx, 19, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
+>p : Symbol(p, Decl(file.tsx, 21, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
let y = ;
->y : Symbol(y, Decl(file.tsx, 20, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
+>y : Symbol(y, Decl(file.tsx, 22, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
let z = ;
->z : Symbol(z, Decl(file.tsx, 21, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->x : Symbol(x, Decl(file.tsx, 21, 17))
->y : Symbol(y, Decl(file.tsx, 21, 19))
+>z : Symbol(z, Decl(file.tsx, 23, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>x : Symbol(x, Decl(file.tsx, 23, 17))
+>y : Symbol(y, Decl(file.tsx, 23, 19))
let w = ;
->w : Symbol(w, Decl(file.tsx, 22, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->x : Symbol(x, Decl(file.tsx, 22, 23))
->y : Symbol(y, Decl(file.tsx, 22, 28))
+>w : Symbol(w, Decl(file.tsx, 24, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>x : Symbol(x, Decl(file.tsx, 24, 23))
+>y : Symbol(y, Decl(file.tsx, 24, 28))
let w1 = ;
->w1 : Symbol(w1, Decl(file.tsx, 23, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->x : Symbol(x, Decl(file.tsx, 23, 24))
->y : Symbol(y, Decl(file.tsx, 23, 29))
->X : Symbol(X, Decl(file.tsx, 23, 38))
+>w1 : Symbol(w1, Decl(file.tsx, 25, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>x : Symbol(x, Decl(file.tsx, 25, 24))
+>y : Symbol(y, Decl(file.tsx, 25, 29))
+>X : Symbol(X, Decl(file.tsx, 25, 38))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.types b/tests/baselines/reference/tsxSpreadAttributesResolution2.types
index a9842286c4d4a..da5dc86aa04c9 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution2.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.js b/tests/baselines/reference/tsxSpreadAttributesResolution3.js
index 016a27b5acf9f..7bf27735fc1a0 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution3.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface PoisonedProp {
@@ -25,6 +27,7 @@ let y = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols
index 508a1bd9424fe..98c190309477b 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.symbols
@@ -1,28 +1,30 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface PoisonedProp {
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
x: string;
->x : Symbol(PoisonedProp.x, Decl(file.tsx, 2, 24))
+>x : Symbol(PoisonedProp.x, Decl(file.tsx, 4, 24))
y: number;
->y : Symbol(PoisonedProp.y, Decl(file.tsx, 3, 14))
+>y : Symbol(PoisonedProp.y, Decl(file.tsx, 5, 14))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
>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), Decl(react.d.ts, 161, 66))
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 9, 58))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -31,25 +33,25 @@ class Poisoned extends React.Component {
}
const obj = {
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
x: "hello world",
->x : Symbol(x, Decl(file.tsx, 13, 13))
+>x : Symbol(x, Decl(file.tsx, 15, 13))
y: 2
->y : Symbol(y, Decl(file.tsx, 14, 21))
+>y : Symbol(y, Decl(file.tsx, 16, 21))
};
// OK
let p = ;
->p : Symbol(p, Decl(file.tsx, 19, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
+>p : Symbol(p, Decl(file.tsx, 21, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
let y = ;
->y : Symbol(y, Decl(file.tsx, 20, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->x : Symbol(x, Decl(file.tsx, 20, 17))
->y : Symbol(y, Decl(file.tsx, 20, 24))
+>y : Symbol(y, Decl(file.tsx, 22, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>x : Symbol(x, Decl(file.tsx, 22, 17))
+>y : Symbol(y, Decl(file.tsx, 22, 24))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.types b/tests/baselines/reference/tsxSpreadAttributesResolution3.types
index ca5b1b544035b..b42491970338d 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution3.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt
index bc8ccdce41f5a..30dc162a73e35 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.errors.txt
@@ -1,7 +1,9 @@
-file.tsx(32,45): error TS2532: Object is possibly 'undefined'.
+file.tsx(34,45): error TS2532: Object is possibly 'undefined'.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
interface PoisonedProp {
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.js b/tests/baselines/reference/tsxSpreadAttributesResolution4.js
index 3b6da7d0c3003..8297baaf0949c 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution4.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface PoisonedProp {
@@ -38,6 +40,7 @@ let e5 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols
index 8225cadd2c1f7..d21521627e050 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.symbols
@@ -1,28 +1,30 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface PoisonedProp {
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
x: string;
->x : Symbol(PoisonedProp.x, Decl(file.tsx, 2, 24))
+>x : Symbol(PoisonedProp.x, Decl(file.tsx, 4, 24))
y: 2;
->y : Symbol(PoisonedProp.y, Decl(file.tsx, 3, 14))
+>y : Symbol(PoisonedProp.y, Decl(file.tsx, 5, 14))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
>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), Decl(react.d.ts, 161, 66))
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 9, 58))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -31,31 +33,31 @@ class Poisoned extends React.Component {
}
const obj: PoisonedProp = {
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
x: "hello world",
->x : Symbol(x, Decl(file.tsx, 13, 27))
+>x : Symbol(x, Decl(file.tsx, 15, 27))
y: 2
->y : Symbol(y, Decl(file.tsx, 14, 21))
+>y : Symbol(y, Decl(file.tsx, 16, 21))
};
// OK
let p = ;
->p : Symbol(p, Decl(file.tsx, 19, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
+>p : Symbol(p, Decl(file.tsx, 21, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
class EmptyProp extends React.Component<{}, {}> {
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(EmptyProp.render, Decl(file.tsx, 21, 49))
+>render : Symbol(EmptyProp.render, Decl(file.tsx, 23, 49))
return Default hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -65,31 +67,31 @@ class EmptyProp extends React.Component<{}, {}> {
// OK
let j: any;
->j : Symbol(j, Decl(file.tsx, 28, 3))
+>j : Symbol(j, Decl(file.tsx, 30, 3))
let e1 = ;
->e1 : Symbol(e1, Decl(file.tsx, 29, 3))
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
+>e1 : Symbol(e1, Decl(file.tsx, 31, 3))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
let e2 =
->e2 : Symbol(e2, Decl(file.tsx, 30, 3))
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
->j : Symbol(j, Decl(file.tsx, 28, 3))
+>e2 : Symbol(e2, Decl(file.tsx, 32, 3))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
+>j : Symbol(j, Decl(file.tsx, 30, 3))
let e3 = { this.textInput = input; } }} />
->e3 : Symbol(e3, Decl(file.tsx, 31, 3))
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
->ref : Symbol(ref, Decl(file.tsx, 31, 25))
->input : Symbol(input, Decl(file.tsx, 31, 32))
->input : Symbol(input, Decl(file.tsx, 31, 32))
+>e3 : Symbol(e3, Decl(file.tsx, 33, 3))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
+>ref : Symbol(ref, Decl(file.tsx, 33, 25))
+>input : Symbol(input, Decl(file.tsx, 33, 32))
+>input : Symbol(input, Decl(file.tsx, 33, 32))
let e4 =
->e4 : Symbol(e4, Decl(file.tsx, 32, 3))
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
->data-prop : Symbol(data-prop, Decl(file.tsx, 32, 19))
+>e4 : Symbol(e4, Decl(file.tsx, 34, 3))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
+>data-prop : Symbol(data-prop, Decl(file.tsx, 34, 19))
let e5 =
->e5 : Symbol(e5, Decl(file.tsx, 33, 3))
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
->"data-prop" : Symbol("data-prop", Decl(file.tsx, 33, 25))
+>e5 : Symbol(e5, Decl(file.tsx, 35, 3))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
+>"data-prop" : Symbol("data-prop", Decl(file.tsx, 35, 25))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.types b/tests/baselines/reference/tsxSpreadAttributesResolution4.types
index 3b7f283130f70..deb7e046bb31a 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution4.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
index d0b4bd2e673d0..f71d46741048f 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt
@@ -1,10 +1,12 @@
-file.tsx(20,10): error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
+file.tsx(22,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'.
-file.tsx(33,10): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
+file.tsx(35,10): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'.
==== file.tsx (2 errors) ====
+ ///
+
import React = require('react');
interface PoisonedProp {
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.js b/tests/baselines/reference/tsxSpreadAttributesResolution5.js
index fdfd154484a97..cbef80da1ea46 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution5.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface PoisonedProp {
@@ -37,6 +39,7 @@ let e = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution5.symbols
index be8ed6aa0d19d..7e2f07402488c 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution5.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.symbols
@@ -1,28 +1,30 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface PoisonedProp {
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
x: string;
->x : Symbol(PoisonedProp.x, Decl(file.tsx, 2, 24))
+>x : Symbol(PoisonedProp.x, Decl(file.tsx, 4, 24))
y: 2;
->y : Symbol(PoisonedProp.y, Decl(file.tsx, 3, 14))
+>y : Symbol(PoisonedProp.y, Decl(file.tsx, 5, 14))
}
class Poisoned extends React.Component {
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
>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), Decl(react.d.ts, 161, 66))
->PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
+>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
+>render : Symbol(Poisoned.render, Decl(file.tsx, 9, 58))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -31,48 +33,48 @@ class Poisoned extends React.Component {
}
let obj = {
->obj : Symbol(obj, Decl(file.tsx, 13, 3))
+>obj : Symbol(obj, Decl(file.tsx, 15, 3))
x: "hello world",
->x : Symbol(x, Decl(file.tsx, 13, 11))
+>x : Symbol(x, Decl(file.tsx, 15, 11))
y: 2
->y : Symbol(y, Decl(file.tsx, 14, 21))
+>y : Symbol(y, Decl(file.tsx, 16, 21))
};
// Error as "obj" has type { x: string; y: number }
let p = ;
->p : Symbol(p, Decl(file.tsx, 19, 3))
->Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
->obj : Symbol(obj, Decl(file.tsx, 13, 3))
+>p : Symbol(p, Decl(file.tsx, 21, 3))
+>Poisoned : Symbol(Poisoned, Decl(file.tsx, 7, 1))
+>obj : Symbol(obj, Decl(file.tsx, 15, 3))
class EmptyProp extends React.Component<{}, {}> {
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
>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), Decl(react.d.ts, 161, 66))
render() {
->render : Symbol(EmptyProp.render, Decl(file.tsx, 21, 49))
+>render : Symbol(EmptyProp.render, Decl(file.tsx, 23, 49))
return Default hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
greeting: string;
->greeting : Symbol(EmptyProp.greeting, Decl(file.tsx, 24, 5))
+>greeting : Symbol(EmptyProp.greeting, Decl(file.tsx, 26, 5))
}
let o = {
->o : Symbol(o, Decl(file.tsx, 28, 3))
+>o : Symbol(o, Decl(file.tsx, 30, 3))
prop1: false
->prop1 : Symbol(prop1, Decl(file.tsx, 28, 9))
+>prop1 : Symbol(prop1, Decl(file.tsx, 30, 9))
}
// Ok
let e = ;
->e : Symbol(e, Decl(file.tsx, 32, 3))
->EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
->o : Symbol(o, Decl(file.tsx, 28, 3))
+>e : Symbol(e, Decl(file.tsx, 34, 3))
+>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 21, 30))
+>o : Symbol(o, Decl(file.tsx, 30, 3))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.types b/tests/baselines/reference/tsxSpreadAttributesResolution5.types
index e1cd5e5f79574..34e2987a8103a 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution5.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt
index cbc04c6f77307..a32f1a5c1fff2 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt
@@ -1,8 +1,10 @@
-file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes & (TextProps & { children?: ReactNode; }))'.
+file.tsx(15,10): error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes & (TextProps & { children?: ReactNode; }))'.
Property 'onEdit' is missing in type '{ editable: true; }' but required in type '{ editable: true; onEdit: (newText: string) => void; }'.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react');
type TextProps = { editable: false }
@@ -19,7 +21,7 @@ file.tsx(13,10): error TS2322: Type '{ editable: true; }' is not assignable to t
~~~~~~~~~~~~~
!!! error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & (IntrinsicClassAttributes & (TextProps & { children?: ReactNode; }))'.
!!! error TS2322: Property 'onEdit' is missing in type '{ editable: true; }' but required in type '{ editable: true; onEdit: (newText: string) => void; }'.
-!!! related TS2728 file.tsx:4:36: 'onEdit' is declared here.
+!!! related TS2728 file.tsx:6:36: 'onEdit' is declared here.
const textProps: TextProps = {
editable: false
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.js b/tests/baselines/reference/tsxSpreadAttributesResolution6.js
index fd41994f8a301..dc22fa5aca9db 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution6.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
type TextProps = { editable: false }
@@ -21,6 +23,7 @@ const textProps: TextProps = {
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution6.symbols
index 50b5f7003cf4b..8527f349b19be 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution6.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.symbols
@@ -1,27 +1,29 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
type TextProps = { editable: false }
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
->editable : Symbol(editable, Decl(file.tsx, 2, 18))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
+>editable : Symbol(editable, Decl(file.tsx, 4, 18))
| { editable: true, onEdit: (newText: string) => void };
->editable : Symbol(editable, Decl(file.tsx, 3, 18))
->onEdit : Symbol(onEdit, Decl(file.tsx, 3, 34))
->newText : Symbol(newText, Decl(file.tsx, 3, 44))
+>editable : Symbol(editable, Decl(file.tsx, 5, 18))
+>onEdit : Symbol(onEdit, Decl(file.tsx, 5, 34))
+>newText : Symbol(newText, Decl(file.tsx, 5, 44))
class TextComponent extends React.Component {
->TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
+>TextComponent : Symbol(TextComponent, Decl(file.tsx, 5, 71))
>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), Decl(react.d.ts, 161, 66))
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(TextComponent.render, Decl(file.tsx, 5, 60))
+>render : Symbol(TextComponent.render, Decl(file.tsx, 7, 60))
return Some Text.. ;
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
@@ -31,15 +33,15 @@ class TextComponent extends React.Component {
// Error
let x =
->x : Symbol(x, Decl(file.tsx, 12, 3))
->TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
->editable : Symbol(editable, Decl(file.tsx, 12, 22))
+>x : Symbol(x, Decl(file.tsx, 14, 3))
+>TextComponent : Symbol(TextComponent, Decl(file.tsx, 5, 71))
+>editable : Symbol(editable, Decl(file.tsx, 14, 22))
const textProps: TextProps = {
->textProps : Symbol(textProps, Decl(file.tsx, 14, 5))
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
+>textProps : Symbol(textProps, Decl(file.tsx, 16, 5))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
editable: false
->editable : Symbol(editable, Decl(file.tsx, 14, 30))
+>editable : Symbol(editable, Decl(file.tsx, 16, 30))
};
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.types b/tests/baselines/reference/tsxSpreadAttributesResolution6.types
index d911d9f373569..0d6ba238d3afb 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution6.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.js b/tests/baselines/reference/tsxSpreadAttributesResolution7.js
index fa20f6e495b46..162086ee34635 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution7.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
type TextProps = { editable: false }
@@ -28,6 +30,7 @@ let y2 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols
index ed2a25867b255..7327aa0edfeab 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols
@@ -1,27 +1,29 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
type TextProps = { editable: false }
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
->editable : Symbol(editable, Decl(file.tsx, 2, 18))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
+>editable : Symbol(editable, Decl(file.tsx, 4, 18))
| { editable: true, onEdit: (newText: string) => void };
->editable : Symbol(editable, Decl(file.tsx, 3, 18))
->onEdit : Symbol(onEdit, Decl(file.tsx, 3, 34))
->newText : Symbol(newText, Decl(file.tsx, 3, 44))
+>editable : Symbol(editable, Decl(file.tsx, 5, 18))
+>onEdit : Symbol(onEdit, Decl(file.tsx, 5, 34))
+>newText : Symbol(newText, Decl(file.tsx, 5, 44))
class TextComponent extends React.Component {
->TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
+>TextComponent : Symbol(TextComponent, Decl(file.tsx, 5, 71))
>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), Decl(react.d.ts, 161, 66))
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(TextComponent.render, Decl(file.tsx, 5, 60))
+>render : Symbol(TextComponent.render, Decl(file.tsx, 7, 60))
return Some Text.. ;
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
@@ -31,33 +33,33 @@ class TextComponent extends React.Component {
// OK
const textPropsFalse: TextProps = {
->textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 12, 5))
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
+>textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 14, 5))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
editable: false
->editable : Symbol(editable, Decl(file.tsx, 12, 35))
+>editable : Symbol(editable, Decl(file.tsx, 14, 35))
};
let y1 =
->y1 : Symbol(y1, Decl(file.tsx, 16, 3))
->TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
->textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 12, 5))
+>y1 : Symbol(y1, Decl(file.tsx, 18, 3))
+>TextComponent : Symbol(TextComponent, Decl(file.tsx, 5, 71))
+>textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 14, 5))
const textPropsTrue: TextProps = {
->textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 18, 5))
->TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
+>textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 20, 5))
+>TextProps : Symbol(TextProps, Decl(file.tsx, 2, 32))
editable: true,
->editable : Symbol(editable, Decl(file.tsx, 18, 34))
+>editable : Symbol(editable, Decl(file.tsx, 20, 34))
onEdit: () => {}
->onEdit : Symbol(onEdit, Decl(file.tsx, 19, 19))
+>onEdit : Symbol(onEdit, Decl(file.tsx, 21, 19))
};
let y2 =
->y2 : Symbol(y2, Decl(file.tsx, 23, 3))
->TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
->textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 18, 5))
+>y2 : Symbol(y2, Decl(file.tsx, 25, 3))
+>TextComponent : Symbol(TextComponent, Decl(file.tsx, 5, 71))
+>textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 20, 5))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.types b/tests/baselines/reference/tsxSpreadAttributesResolution7.types
index 5e4bd26cbfa62..4a32c209ddf91 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution7.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.js b/tests/baselines/reference/tsxSpreadAttributesResolution8.js
index 274502a4bd10b..f3ee05716fe7f 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution8.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const obj = {};
@@ -30,6 +32,7 @@ let x1 =
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols
index 47d62716fac35..77d67140f39c4 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.symbols
@@ -1,50 +1,52 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const obj = {};
->obj : Symbol(obj, Decl(file.tsx, 2, 5))
+>obj : Symbol(obj, Decl(file.tsx, 4, 5))
const obj1 = {
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
x: 2
->x : Symbol(x, Decl(file.tsx, 3, 14))
+>x : Symbol(x, Decl(file.tsx, 5, 14))
}
const obj3 = {
->obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
+>obj3 : Symbol(obj3, Decl(file.tsx, 8, 5))
y: true,
->y : Symbol(y, Decl(file.tsx, 6, 14))
+>y : Symbol(y, Decl(file.tsx, 8, 14))
overwrite: "hi"
->overwrite : Symbol(overwrite, Decl(file.tsx, 7, 12))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 9, 12))
}
interface Prop {
->Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
+>Prop : Symbol(Prop, Decl(file.tsx, 11, 1))
x: number
->x : Symbol(Prop.x, Decl(file.tsx, 11, 16))
+>x : Symbol(Prop.x, Decl(file.tsx, 13, 16))
y: boolean
->y : Symbol(Prop.y, Decl(file.tsx, 12, 13))
+>y : Symbol(Prop.y, Decl(file.tsx, 14, 13))
overwrite: string
->overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 13, 14))
+>overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 15, 14))
}
class OverWriteAttr extends React.Component {
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
>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), Decl(react.d.ts, 161, 66))
->Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
+>Prop : Symbol(Prop, Decl(file.tsx, 11, 1))
render() {
->render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
+>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 19, 55))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -54,16 +56,16 @@ class OverWriteAttr extends React.Component {
// OK
let x =
->x : Symbol(x, Decl(file.tsx, 24, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->obj : Symbol(obj, Decl(file.tsx, 2, 5))
->y : Symbol(y, Decl(file.tsx, 24, 31))
->overwrite : Symbol(overwrite, Decl(file.tsx, 24, 33))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
+>x : Symbol(x, Decl(file.tsx, 26, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>obj : Symbol(obj, Decl(file.tsx, 4, 5))
+>y : Symbol(y, Decl(file.tsx, 26, 31))
+>overwrite : Symbol(overwrite, Decl(file.tsx, 26, 33))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
let x1 =
->x1 : Symbol(x1, Decl(file.tsx, 25, 3))
->OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
->obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
->obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
+>x1 : Symbol(x1, Decl(file.tsx, 27, 3))
+>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 17, 1))
+>obj1 : Symbol(obj1, Decl(file.tsx, 5, 5))
+>obj3 : Symbol(obj3, Decl(file.tsx, 8, 5))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.types b/tests/baselines/reference/tsxSpreadAttributesResolution8.types
index 0b740151e5d0c..048e3682abf69 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution8.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution9.js b/tests/baselines/reference/tsxSpreadAttributesResolution9.js
index ff34ab5694715..aa28e17c297e9 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution9.js
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution9.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
interface OptionProp {
@@ -28,6 +30,7 @@ let y3 = ;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols
index f922ad7c3314d..d9281e2589290 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution9.symbols
@@ -1,28 +1,30 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface OptionProp {
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
x?: 2
->x : Symbol(OptionProp.x, Decl(file.tsx, 2, 22))
+>x : Symbol(OptionProp.x, Decl(file.tsx, 4, 22))
y?: boolean
->y : Symbol(OptionProp.y, Decl(file.tsx, 3, 9))
+>y : Symbol(OptionProp.y, Decl(file.tsx, 5, 9))
}
class Opt extends React.Component {
->Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
+>Opt : Symbol(Opt, Decl(file.tsx, 7, 1))
>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), Decl(react.d.ts, 161, 66))
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
render() {
->render : Symbol(Opt.render, Decl(file.tsx, 7, 51))
+>render : Symbol(Opt.render, Decl(file.tsx, 9, 51))
return Hello
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -31,40 +33,40 @@ class Opt extends React.Component {
}
const obj: OptionProp = {};
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
const obj1: OptionProp = {
->obj1 : Symbol(obj1, Decl(file.tsx, 14, 5))
->OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
+>obj1 : Symbol(obj1, Decl(file.tsx, 16, 5))
+>OptionProp : Symbol(OptionProp, Decl(file.tsx, 2, 32))
x: 2
->x : Symbol(x, Decl(file.tsx, 14, 26))
+>x : Symbol(x, Decl(file.tsx, 16, 26))
}
// OK
let p = ;
->p : Symbol(p, Decl(file.tsx, 19, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
+>p : Symbol(p, Decl(file.tsx, 21, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 7, 1))
let y = ;
->y : Symbol(y, Decl(file.tsx, 20, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
->obj : Symbol(obj, Decl(file.tsx, 13, 5))
+>y : Symbol(y, Decl(file.tsx, 22, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 7, 1))
+>obj : Symbol(obj, Decl(file.tsx, 15, 5))
let y1 = ;
->y1 : Symbol(y1, Decl(file.tsx, 21, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
->obj1 : Symbol(obj1, Decl(file.tsx, 14, 5))
+>y1 : Symbol(y1, Decl(file.tsx, 23, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 7, 1))
+>obj1 : Symbol(obj1, Decl(file.tsx, 16, 5))
let y2 = ;
->y2 : Symbol(y2, Decl(file.tsx, 22, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
->obj1 : Symbol(obj1, Decl(file.tsx, 14, 5))
->y : Symbol(y, Decl(file.tsx, 22, 23))
+>y2 : Symbol(y2, Decl(file.tsx, 24, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 7, 1))
+>obj1 : Symbol(obj1, Decl(file.tsx, 16, 5))
+>y : Symbol(y, Decl(file.tsx, 24, 23))
let y3 = ;
->y3 : Symbol(y3, Decl(file.tsx, 23, 3))
->Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
->x : Symbol(x, Decl(file.tsx, 23, 13))
+>y3 : Symbol(y3, Decl(file.tsx, 25, 3))
+>Opt : Symbol(Opt, Decl(file.tsx, 7, 1))
+>x : Symbol(x, Decl(file.tsx, 25, 13))
diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution9.types b/tests/baselines/reference/tsxSpreadAttributesResolution9.types
index cd5baa9e9a50c..c8661849de31c 100644
--- a/tests/baselines/reference/tsxSpreadAttributesResolution9.types
+++ b/tests/baselines/reference/tsxSpreadAttributesResolution9.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt
index 798bb8c18c256..55c45b8a16d75 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt
@@ -1,9 +1,11 @@
error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-file.tsx(17,39): error TS2842: 'string' is an unused renaming of 'y1'. Did you intend to use it as a type annotation?
+file.tsx(19,39): error TS2842: 'string' is an unused renaming of 'y1'. Did you intend to use it as a type annotation?
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react')
declare function OneThing(k: {yxx: string}): JSX.Element;
@@ -23,7 +25,7 @@ file.tsx(17,39): error TS2842: 'string' is an unused renaming of 'y1'. Did you i
declare function TestingOneThing({y1: string}): JSX.Element;
~~~~~~
!!! error TS2842: 'string' is an unused renaming of 'y1'. Did you intend to use it as a type annotation?
-!!! related TS2843 file.tsx:17:46: We can only write a type for 'y1' by adding a type for the entire parameter here.
+!!! related TS2843 file.tsx:19:46: We can only write a type for 'y1' by adding a type for the entire parameter here.
declare function TestingOneThing(j: {"extra-data": string, yy?: string}): JSX.Element;
declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Element;
declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js
index 8f8d9892f8839..836cea3fb63da 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function OneThing(k: {yxx: string}): JSX.Element;
@@ -45,6 +47,7 @@ const e2 =
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols
index 46f230cc8207d..337c5b10474bf 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.symbols
@@ -1,196 +1,198 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
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))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>k : Symbol(k, Decl(file.tsx, 4, 26))
+>yxx : Symbol(yxx, Decl(file.tsx, 4, 30))
>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))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>k : Symbol(k, Decl(file.tsx, 5, 26))
+>yxx1 : Symbol(yxx1, Decl(file.tsx, 5, 30))
+>children : Symbol(children, Decl(file.tsx, 5, 43))
>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))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>l : Symbol(l, Decl(file.tsx, 6, 26))
+>yy : Symbol(yy, Decl(file.tsx, 6, 30))
+>yy1 : Symbol(yy1, Decl(file.tsx, 6, 41))
>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))
->l : Symbol(l, Decl(file.tsx, 5, 26))
->yy : Symbol(yy, Decl(file.tsx, 5, 30))
->yy1 : Symbol(yy1, Decl(file.tsx, 5, 41))
->yy2 : Symbol(yy2, Decl(file.tsx, 5, 54))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>l : Symbol(l, Decl(file.tsx, 7, 26))
+>yy : Symbol(yy, Decl(file.tsx, 7, 30))
+>yy1 : Symbol(yy1, Decl(file.tsx, 7, 41))
+>yy2 : Symbol(yy2, Decl(file.tsx, 7, 54))
>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))
->"data-prop" : Symbol("data-prop", Decl(file.tsx, 6, 44))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>l1 : Symbol(l1, Decl(file.tsx, 8, 26))
+>data : Symbol(data, Decl(file.tsx, 8, 31))
+>"data-prop" : Symbol("data-prop", Decl(file.tsx, 8, 44))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const c1 =
->c1 : Symbol(c1, Decl(file.tsx, 9, 5))
->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))
->yxx : Symbol(yxx, Decl(file.tsx, 9, 20))
+>c1 : Symbol(c1, Decl(file.tsx, 11, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>yxx : Symbol(yxx, Decl(file.tsx, 11, 20))
const c2 =
->c2 : Symbol(c2, Decl(file.tsx, 10, 5))
->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))
->yy : Symbol(yy, Decl(file.tsx, 10, 20))
->yy1 : Symbol(yy1, Decl(file.tsx, 10, 29))
+>c2 : Symbol(c2, Decl(file.tsx, 12, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>yy : Symbol(yy, Decl(file.tsx, 12, 20))
+>yy1 : Symbol(yy1, Decl(file.tsx, 12, 29))
const c3 =
->c3 : Symbol(c3, Decl(file.tsx, 11, 5))
->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))
->yxx : Symbol(yxx, Decl(file.tsx, 11, 20))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 11, 32))
+>c3 : Symbol(c3, Decl(file.tsx, 13, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>yxx : Symbol(yxx, Decl(file.tsx, 13, 20))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 13, 32))
const c4 =
->c4 : Symbol(c4, Decl(file.tsx, 12, 5))
->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))
->data : Symbol(data, Decl(file.tsx, 12, 20))
->data-prop : Symbol(data-prop, Decl(file.tsx, 12, 33))
+>c4 : Symbol(c4, Decl(file.tsx, 14, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>data : Symbol(data, Decl(file.tsx, 14, 20))
+>data-prop : Symbol(data-prop, Decl(file.tsx, 14, 33))
const c5 = Hello
->c5 : Symbol(c5, Decl(file.tsx, 13, 5))
->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))
->yxx1 : Symbol(yxx1, Decl(file.tsx, 13, 20))
->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))
+>c5 : Symbol(c5, Decl(file.tsx, 15, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
+>yxx1 : Symbol(yxx1, Decl(file.tsx, 15, 20))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 57), Decl(file.tsx, 5, 76), Decl(file.tsx, 6, 69), Decl(file.tsx, 7, 83))
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))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
>y1 : Symbol(y1)
->string : Symbol(string, Decl(file.tsx, 16, 34))
+>string : Symbol(string, Decl(file.tsx, 18, 34))
>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))
->"extra-data" : Symbol("extra-data", Decl(file.tsx, 17, 37))
->yy : Symbol(yy, Decl(file.tsx, 17, 58))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>j : Symbol(j, Decl(file.tsx, 19, 33))
+>"extra-data" : Symbol("extra-data", Decl(file.tsx, 19, 37))
+>yy : Symbol(yy, Decl(file.tsx, 19, 58))
>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))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>n : Symbol(n, Decl(file.tsx, 20, 33))
+>yy : Symbol(yy, Decl(file.tsx, 20, 37))
+>direction : Symbol(direction, Decl(file.tsx, 20, 48))
>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))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>n : Symbol(n, Decl(file.tsx, 21, 33))
+>yy : Symbol(yy, Decl(file.tsx, 21, 37))
+>name : Symbol(name, Decl(file.tsx, 21, 48))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const d1 = ;
->d1 : Symbol(d1, Decl(file.tsx, 22, 5))
->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, Decl(file.tsx, 22, 27))
->extra-data : Symbol(extra-data, Decl(file.tsx, 22, 30))
+>d1 : Symbol(d1, Decl(file.tsx, 24, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>y1 : Symbol(y1, Decl(file.tsx, 24, 27))
+>extra-data : Symbol(extra-data, Decl(file.tsx, 24, 30))
const d2 = ;
->d2 : Symbol(d2, Decl(file.tsx, 23, 5))
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
->extra-data : Symbol(extra-data, Decl(file.tsx, 23, 27))
+>d2 : Symbol(d2, Decl(file.tsx, 25, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>extra-data : Symbol(extra-data, Decl(file.tsx, 25, 27))
const d3 = ;
->d3 : Symbol(d3, Decl(file.tsx, 24, 5))
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
->extra-data : Symbol(extra-data, Decl(file.tsx, 24, 27))
->yy : Symbol(yy, Decl(file.tsx, 24, 46))
+>d3 : Symbol(d3, Decl(file.tsx, 26, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>extra-data : Symbol(extra-data, Decl(file.tsx, 26, 27))
+>yy : Symbol(yy, Decl(file.tsx, 26, 46))
const d4 = ;
->d4 : Symbol(d4, Decl(file.tsx, 25, 5))
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
->extra-data : Symbol(extra-data, Decl(file.tsx, 25, 27))
->yy : Symbol(yy, Decl(file.tsx, 25, 46))
->direction : Symbol(direction, Decl(file.tsx, 25, 53))
+>d4 : Symbol(d4, Decl(file.tsx, 27, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>extra-data : Symbol(extra-data, Decl(file.tsx, 27, 27))
+>yy : Symbol(yy, Decl(file.tsx, 27, 46))
+>direction : Symbol(direction, Decl(file.tsx, 27, 53))
const d5 = ;
->d5 : Symbol(d5, Decl(file.tsx, 26, 5))
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
->extra-data : Symbol(extra-data, Decl(file.tsx, 26, 27))
->yy : Symbol(yy, Decl(file.tsx, 26, 46))
->name : Symbol(name, Decl(file.tsx, 26, 57))
+>d5 : Symbol(d5, Decl(file.tsx, 28, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 15, 47), Decl(file.tsx, 18, 60), Decl(file.tsx, 19, 86), Decl(file.tsx, 20, 83))
+>extra-data : Symbol(extra-data, Decl(file.tsx, 28, 27))
+>yy : Symbol(yy, Decl(file.tsx, 28, 46))
+>name : Symbol(name, Decl(file.tsx, 28, 57))
declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
->a : Symbol(a, Decl(file.tsx, 29, 33))
->y1 : Symbol(y1, Decl(file.tsx, 29, 37))
->y2 : Symbol(y2, Decl(file.tsx, 29, 49))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>a : Symbol(a, Decl(file.tsx, 31, 33))
+>y1 : Symbol(y1, Decl(file.tsx, 31, 37))
+>y2 : Symbol(y2, Decl(file.tsx, 31, 49))
>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))
->a : Symbol(a, Decl(file.tsx, 30, 33))
->y1 : Symbol(y1, Decl(file.tsx, 30, 37))
->y2 : Symbol(y2, Decl(file.tsx, 30, 49))
->y3 : Symbol(y3, Decl(file.tsx, 30, 62))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>a : Symbol(a, Decl(file.tsx, 32, 33))
+>y1 : Symbol(y1, Decl(file.tsx, 32, 37))
+>y2 : Symbol(y2, Decl(file.tsx, 32, 49))
+>y3 : Symbol(y3, Decl(file.tsx, 32, 62))
>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))
+>e1 : Symbol(e1, Decl(file.tsx, 35, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
const e3 =
->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, 34, 27))
+>e3 : Symbol(e3, Decl(file.tsx, 36, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>y1 : Symbol(y1, Decl(file.tsx, 36, 27))
const e4 =
->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, 35, 27))
->y2 : Symbol(y2, Decl(file.tsx, 35, 38))
+>e4 : Symbol(e4, Decl(file.tsx, 37, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>y1 : Symbol(y1, Decl(file.tsx, 37, 27))
+>y2 : Symbol(y2, Decl(file.tsx, 37, 38))
const e5 =
->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))
+>e5 : Symbol(e5, Decl(file.tsx, 38, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>y1 : Symbol(y1, Decl(file.tsx, 38, 27))
+>y3 : Symbol(y3, Decl(file.tsx, 38, 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))
+>e6 : Symbol(e6, Decl(file.tsx, 39, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>y1 : Symbol(y1, Decl(file.tsx, 39, 27))
+>y3 : Symbol(y3, Decl(file.tsx, 39, 30))
+>y2 : Symbol(y2, Decl(file.tsx, 39, 33))
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))
->extra-prop : Symbol(extra-prop, Decl(file.tsx, 38, 33))
+>e2 : Symbol(e2, Decl(file.tsx, 40, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 28, 72), Decl(file.tsx, 31, 77))
+>y1 : Symbol(y1, Decl(file.tsx, 40, 27))
+>y3 : Symbol(y3, Decl(file.tsx, 40, 30))
+>extra-prop : Symbol(extra-prop, Decl(file.tsx, 40, 33))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types
index 5dbf2a767fc03..9094e06abf225 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.errors.txt
index 5132e02d98719..9599239b66468 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react')
declare function OneThing(): JSX.Element;
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js
index 8af3285bad119..e8487383495bd 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function OneThing(): JSX.Element;
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
@@ -35,6 +37,7 @@ const c10 = ;
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols
index b035058d26867..d920b3dd0faf3 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.symbols
@@ -1,106 +1,108 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function OneThing(): JSX.Element;
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
>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))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>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, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
let obj = {
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
yy: 10,
->yy : Symbol(yy, Decl(file.tsx, 4, 11))
+>yy : Symbol(yy, Decl(file.tsx, 6, 11))
yy1: "hello"
->yy1 : Symbol(yy1, Decl(file.tsx, 5, 11))
+>yy1 : Symbol(yy1, Decl(file.tsx, 7, 11))
}
let obj1 = {
->obj1 : Symbol(obj1, Decl(file.tsx, 9, 3))
+>obj1 : Symbol(obj1, Decl(file.tsx, 11, 3))
yy: true
->yy : Symbol(yy, Decl(file.tsx, 9, 12))
+>yy : Symbol(yy, Decl(file.tsx, 11, 12))
}
let obj2 = {
->obj2 : Symbol(obj2, Decl(file.tsx, 13, 3))
+>obj2 : Symbol(obj2, Decl(file.tsx, 15, 3))
yy: 500,
->yy : Symbol(yy, Decl(file.tsx, 13, 12))
+>yy : Symbol(yy, Decl(file.tsx, 15, 12))
"ignore-prop": "hello"
->"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 14, 12))
+>"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 16, 12))
}
let defaultObj: any;
->defaultObj : Symbol(defaultObj, Decl(file.tsx, 18, 3))
+>defaultObj : Symbol(defaultObj, Decl(file.tsx, 20, 3))
// OK
const c1 =
->c1 : Symbol(c1, Decl(file.tsx, 21, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
+>c1 : Symbol(c1, Decl(file.tsx, 23, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
const c2 =
->c2 : Symbol(c2, Decl(file.tsx, 22, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
+>c2 : Symbol(c2, Decl(file.tsx, 24, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
const c3 =
->c3 : Symbol(c3, Decl(file.tsx, 23, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
+>c3 : Symbol(c3, Decl(file.tsx, 25, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
const c4 =
->c4 : Symbol(c4, Decl(file.tsx, 24, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj1 : Symbol(obj1, Decl(file.tsx, 9, 3))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
+>c4 : Symbol(c4, Decl(file.tsx, 26, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj1 : Symbol(obj1, Decl(file.tsx, 11, 3))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
const c5 =
->c5 : Symbol(c5, Decl(file.tsx, 25, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj1 : Symbol(obj1, Decl(file.tsx, 9, 3))
->yy : Symbol(yy, Decl(file.tsx, 25, 30))
->yy1 : Symbol(yy1, Decl(file.tsx, 25, 44))
+>c5 : Symbol(c5, Decl(file.tsx, 27, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj1 : Symbol(obj1, Decl(file.tsx, 11, 3))
+>yy : Symbol(yy, Decl(file.tsx, 27, 30))
+>yy1 : Symbol(yy1, Decl(file.tsx, 27, 44))
const c6 =
->c6 : Symbol(c6, Decl(file.tsx, 26, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj1 : Symbol(obj1, Decl(file.tsx, 9, 3))
->yy : Symbol(yy, Decl(file.tsx, 26, 36))
->yy1 : Symbol(yy1, Decl(file.tsx, 26, 46))
+>c6 : Symbol(c6, Decl(file.tsx, 28, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj1 : Symbol(obj1, Decl(file.tsx, 11, 3))
+>yy : Symbol(yy, Decl(file.tsx, 28, 36))
+>yy1 : Symbol(yy1, Decl(file.tsx, 28, 46))
const c7 = ; // No error. should pick second overload
->c7 : Symbol(c7, Decl(file.tsx, 27, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->defaultObj : Symbol(defaultObj, Decl(file.tsx, 18, 3))
->yy : Symbol(yy, Decl(file.tsx, 27, 36))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
+>c7 : Symbol(c7, Decl(file.tsx, 29, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>defaultObj : Symbol(defaultObj, Decl(file.tsx, 20, 3))
+>yy : Symbol(yy, Decl(file.tsx, 29, 36))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
const c8 =
->c8 : Symbol(c8, Decl(file.tsx, 28, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 28, 20))
+>c8 : Symbol(c8, Decl(file.tsx, 30, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 30, 20))
const c9 = ;
->c9 : Symbol(c9, Decl(file.tsx, 29, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 29, 26))
+>c9 : Symbol(c9, Decl(file.tsx, 31, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 31, 26))
const c10 = ;
->c10 : Symbol(c10, Decl(file.tsx, 30, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj2 : Symbol(obj2, Decl(file.tsx, 13, 3))
->yy1 : Symbol(yy1, Decl(file.tsx, 30, 31))
+>c10 : Symbol(c10, Decl(file.tsx, 32, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj2 : Symbol(obj2, Decl(file.tsx, 15, 3))
+>yy1 : Symbol(yy1, Decl(file.tsx, 32, 31))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types
index 479db6c2f8e64..f14a3a95dc849 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.errors.txt
index fe4eb1fcc947c..dec1817ad2dfd 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
interface Context {
color: any;
}
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.js
index 28ce22470c509..975a469ab6c6f 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx] ////
//// [file.tsx]
+///
+
interface Context {
color: any;
}
@@ -26,6 +28,7 @@ const three2 = ;
const three3 = ; // it is just any so we allow it to pass through
//// [file.jsx]
+///
var obj2;
// OK
var two1 = ;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols
index 0f2a85adb8eeb..79b65aa38e199 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.symbols
@@ -1,98 +1,100 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx] ////
=== file.tsx ===
+///
+
interface Context {
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
color: any;
->color : Symbol(Context.color, Decl(file.tsx, 0, 19))
+>color : Symbol(Context.color, Decl(file.tsx, 2, 19))
}
declare function ZeroThingOrTwoThing(): JSX.Element;
->ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
>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))
->l : Symbol(l, Decl(file.tsx, 4, 37))
->yy : Symbol(yy, Decl(file.tsx, 4, 41))
->yy1 : Symbol(yy1, Decl(file.tsx, 4, 52))
->context : Symbol(context, Decl(file.tsx, 4, 66))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
+>l : Symbol(l, Decl(file.tsx, 6, 37))
+>yy : Symbol(yy, Decl(file.tsx, 6, 41))
+>yy1 : Symbol(yy1, Decl(file.tsx, 6, 52))
+>context : Symbol(context, Decl(file.tsx, 6, 66))
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
>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))
+>obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
// OK
const two1 = ;
->two1 : Symbol(two1, Decl(file.tsx, 9, 5))
->ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
+>two1 : Symbol(two1, Decl(file.tsx, 11, 5))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
const two2 = ;
->two2 : Symbol(two2, Decl(file.tsx, 10, 5))
->ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
->yy : Symbol(yy, Decl(file.tsx, 10, 33))
->yy1 : Symbol(yy1, Decl(file.tsx, 10, 42))
+>two2 : Symbol(two2, Decl(file.tsx, 12, 5))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
+>yy : Symbol(yy, Decl(file.tsx, 12, 33))
+>yy1 : Symbol(yy1, Decl(file.tsx, 12, 42))
const two3 = ; // it is just any so we allow it to pass through
->two3 : Symbol(two3, Decl(file.tsx, 11, 5))
->ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
->obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
+>two3 : Symbol(two3, Decl(file.tsx, 13, 5))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
+>obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
const two4 = ; // it is just any so we allow it to pass through
->two4 : Symbol(two4, Decl(file.tsx, 12, 5))
->ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
->yy : Symbol(yy, Decl(file.tsx, 12, 33))
->obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
+>two4 : Symbol(two4, Decl(file.tsx, 14, 5))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
+>yy : Symbol(yy, Decl(file.tsx, 14, 33))
+>obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
const two5 = ; // it is just any so we allow it to pass through
->two5 : Symbol(two5, Decl(file.tsx, 13, 5))
->ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
->obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
->yy : Symbol(yy, Decl(file.tsx, 13, 44))
+>two5 : Symbol(two5, Decl(file.tsx, 15, 5))
+>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 4, 1), Decl(file.tsx, 5, 52))
+>obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
+>yy : Symbol(yy, Decl(file.tsx, 15, 44))
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))
+>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 15, 58), Decl(file.tsx, 17, 58), Decl(file.tsx, 18, 58))
+>l : Symbol(l, Decl(file.tsx, 17, 28))
+>y1 : Symbol(y1, Decl(file.tsx, 17, 32))
>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))
+>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 15, 58), Decl(file.tsx, 17, 58), Decl(file.tsx, 18, 58))
+>l : Symbol(l, Decl(file.tsx, 18, 28))
+>y2 : Symbol(y2, Decl(file.tsx, 18, 32))
>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))
->l : Symbol(l, Decl(file.tsx, 17, 28))
->yy : Symbol(yy, Decl(file.tsx, 17, 32))
->yy1 : Symbol(yy1, Decl(file.tsx, 17, 43))
->context : Symbol(context, Decl(file.tsx, 17, 57))
+>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 15, 58), Decl(file.tsx, 17, 58), Decl(file.tsx, 18, 58))
+>l : Symbol(l, Decl(file.tsx, 19, 28))
+>yy : Symbol(yy, Decl(file.tsx, 19, 32))
+>yy1 : Symbol(yy1, Decl(file.tsx, 19, 43))
+>context : Symbol(context, Decl(file.tsx, 19, 57))
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
->updater : Symbol(updater, Decl(file.tsx, 17, 75))
+>updater : Symbol(updater, Decl(file.tsx, 19, 75))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const three1 = ;
->three1 : Symbol(three1, Decl(file.tsx, 20, 5))
->ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
->yy : Symbol(yy, Decl(file.tsx, 20, 26))
->yy1 : Symbol(yy1, Decl(file.tsx, 20, 34))
+>three1 : Symbol(three1, Decl(file.tsx, 22, 5))
+>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 15, 58), Decl(file.tsx, 17, 58), Decl(file.tsx, 18, 58))
+>yy : Symbol(yy, Decl(file.tsx, 22, 26))
+>yy1 : Symbol(yy1, Decl(file.tsx, 22, 34))
const three2 = ;
->three2 : Symbol(three2, Decl(file.tsx, 21, 5))
->ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
->y2 : Symbol(y2, Decl(file.tsx, 21, 26))
+>three2 : Symbol(three2, Decl(file.tsx, 23, 5))
+>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 15, 58), Decl(file.tsx, 17, 58), Decl(file.tsx, 18, 58))
+>y2 : Symbol(y2, Decl(file.tsx, 23, 26))
const three3 = ; // it is just any so we allow it to pass through
->three3 : Symbol(three3, Decl(file.tsx, 22, 5))
->ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
->obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
->y2 : Symbol(y2, Decl(file.tsx, 22, 36))
+>three3 : Symbol(three3, Decl(file.tsx, 24, 5))
+>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 15, 58), Decl(file.tsx, 17, 58), Decl(file.tsx, 18, 58))
+>obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
+>y2 : Symbol(y2, Decl(file.tsx, 24, 36))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types
index f2aa2b6594741..67fd0a9ffe08a 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx] ////
=== file.tsx ===
+///
+
interface Context {
color: any;
>color : any
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
index 725ef6fb2b2bb..b878f8e4d5133 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt
@@ -1,57 +1,57 @@
-file.tsx(12,22): error TS2769: No overload matches this call.
+file.tsx(14,22): error TS2769: No overload matches this call.
Overload 1 of 2, '(): Element', gave the following error.
Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes'.
Property 'extraProp' does not exist on type 'IntrinsicAttributes'.
Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
-file.tsx(13,13): error TS2769: No overload matches this call.
+file.tsx(15,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(): Element', gave the following error.
Type '{ yy: number; }' is not assignable to type 'IntrinsicAttributes'.
Property 'yy' does not exist on type 'IntrinsicAttributes'.
Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'.
-file.tsx(14,31): error TS2769: No overload matches this call.
+file.tsx(16,31): error TS2769: No overload matches this call.
Overload 1 of 2, '(): Element', gave the following error.
Type '{ yy1: true; yy: number; }' is not assignable to type 'IntrinsicAttributes'.
Property 'yy1' does not exist on type 'IntrinsicAttributes'.
Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
Type 'boolean' is not assignable to type 'string'.
-file.tsx(16,31): error TS2769: No overload matches this call.
+file.tsx(18,31): error TS2769: No overload matches this call.
Overload 1 of 2, '(): Element', gave the following error.
Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes'.
Property 'y1' does not exist on type 'IntrinsicAttributes'.
Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
-file.tsx(17,13): error TS2769: No overload matches this call.
+file.tsx(19,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(): Element', gave the following error.
Type '{ yy: boolean; yy1: string; }' has no properties in common with type 'IntrinsicAttributes'.
Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
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'.
-file.tsx(25,13): error TS2769: No overload matches this call.
+file.tsx(27,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error.
Type '{ "extra-data": true; }' is not assignable to type '{ "extra-data": string; }'.
Types of property '"extra-data"' are incompatible.
Type 'boolean' is not assignable to type 'string'.
Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
Property 'yy' is missing in type '{ "extra-data": true; }' but required in type '{ yy: string; direction?: number; }'.
-file.tsx(26,13): error TS2769: No overload matches this call.
+file.tsx(28,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error.
Type '{ yy: string; direction: string; }' is not assignable to type 'IntrinsicAttributes & { "extra-data": string; }'.
Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'.
Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
Type 'string' is not assignable to type 'number'.
-file.tsx(33,13): error TS2769: No overload matches this call.
+file.tsx(35,13): error TS2769: No overload matches this call.
Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
Type 'boolean' is not assignable to type 'string'.
Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error.
Type 'boolean' is not assignable to type 'string'.
Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
Type 'string' is not assignable to type 'boolean'.
-file.tsx(34,13): error TS2769: No overload matches this call.
+file.tsx(36,13): error TS2769: No overload matches this call.
Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
@@ -60,7 +60,7 @@ file.tsx(34,13): error TS2769: No overload matches this call.
Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'.
Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
Type 'string' is not assignable to type 'boolean'.
-file.tsx(35,13): error TS2769: No overload matches this call.
+file.tsx(37,13): error TS2769: No overload matches this call.
Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
Type '{ y1: string; y2: number; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
@@ -68,7 +68,7 @@ file.tsx(35,13): error TS2769: No overload matches this call.
Type 'string' is not assignable to type 'Element'.
Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
Type 'string' is not assignable to type 'boolean'.
-file.tsx(36,13): error TS2769: No overload matches this call.
+file.tsx(38,13): error TS2769: No overload matches this call.
Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
Type '{ children: string; y1: string; y2: number; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
@@ -79,6 +79,8 @@ file.tsx(36,13): error TS2769: No overload matches this call.
==== file.tsx (11 errors) ====
+ ///
+
import React = require('react')
declare function OneThing(): JSX.Element;
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
@@ -107,7 +109,7 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Property 'yy' does not exist on type 'IntrinsicAttributes'.
!!! error TS2769: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
!!! error TS2769: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'.
-!!! related TS2728 file.tsx:3:43: 'yy1' is declared here.
+!!! related TS2728 file.tsx:5:43: 'yy1' is declared here.
const c2 = ; // type incompatible;
~~~
!!! error TS2769: No overload matches this call.
@@ -116,7 +118,7 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Property 'yy1' does not exist on type 'IntrinsicAttributes'.
!!! error TS2769: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
-!!! related TS6500 file.tsx:3:43: The expected type comes from property 'yy1' which is declared here on type 'IntrinsicAttributes & { yy: number; yy1: string; }'
+!!! related TS6500 file.tsx:5:43: The expected type comes from property 'yy1' which is declared here on type 'IntrinsicAttributes & { yy: number; yy1: string; }'
const c3 = ; // This is OK because all attribute are spread
const c4 = ; // extra property;
~~
@@ -152,7 +154,7 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
!!! error TS2769: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
!!! error TS2769: Property 'yy' is missing in type '{ "extra-data": true; }' but required in type '{ yy: string; direction?: number; }'.
-!!! related TS2728 file.tsx:22:38: 'yy' is declared here.
+!!! related TS2728 file.tsx:24:38: 'yy' is declared here.
const d2 =
~~~~~~~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -161,7 +163,7 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'.
!!! error TS2769: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
!!! error TS2769: Type 'string' is not assignable to type 'number'.
-!!! related TS6500 file.tsx:22:50: The expected type comes from property 'direction' which is declared here on type 'IntrinsicAttributes & { yy: string; direction?: number; }'
+!!! related TS6500 file.tsx:24:50: The expected type comes from property 'direction' which is declared here on type 'IntrinsicAttributes & { yy: string; direction?: number; }'
declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element;
@@ -177,9 +179,9 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
!!! error TS2769: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
!!! error TS2769: Type 'string' is not assignable to type 'boolean'.
-!!! related TS6500 file.tsx:28:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'
-!!! related TS6500 file.tsx:29:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
-!!! related TS6500 file.tsx:30:64: The expected type comes from property 'y3' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
+!!! related TS6500 file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'
+!!! related TS6500 file.tsx:31:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
+!!! related TS6500 file.tsx:32:64: The expected type comes from property 'y3' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
const e2 =
~~~~~~~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -191,7 +193,7 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'.
!!! error TS2769: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
!!! error TS2769: Type 'string' is not assignable to type 'boolean'.
-!!! related TS6500 file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
+!!! related TS6500 file.tsx:32:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
const e3 =
~~~~~~~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -202,8 +204,8 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: Type 'string' is not assignable to type 'Element'.
!!! error TS2769: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
!!! error TS2769: Type 'string' is not assignable to type 'boolean'.
-!!! related TS6500 file.tsx:29:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
-!!! related TS6500 file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
+!!! related TS6500 file.tsx:31:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
+!!! related TS6500 file.tsx:32:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
const e4 = Hi
~~~~~~~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -214,6 +216,6 @@ file.tsx(36,13): error TS2769: No overload matches this call.
!!! error TS2769: 'TestingOptional' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element'.
!!! error TS2769: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
!!! error TS2769: Type 'string' is not assignable to type 'boolean'.
-!!! related TS6500 file.tsx:29:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
-!!! related TS6500 file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
+!!! related TS6500 file.tsx:31:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'
+!!! related TS6500 file.tsx:32:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js
index eb9ddba05c53e..8505f66e8b40a 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function OneThing(): JSX.Element;
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
@@ -41,6 +43,7 @@ const e4 = Hi
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var obj = {
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.symbols
index b2d468e69d920..9e7c919b6199d 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.symbols
@@ -1,161 +1,163 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function OneThing(): JSX.Element;
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
>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))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>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, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
let obj = {
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
yy: 10,
->yy : Symbol(yy, Decl(file.tsx, 4, 11))
+>yy : Symbol(yy, Decl(file.tsx, 6, 11))
yy1: "hello"
->yy1 : Symbol(yy1, Decl(file.tsx, 5, 11))
+>yy1 : Symbol(yy1, Decl(file.tsx, 7, 11))
}
let obj2: any;
->obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
+>obj2 : Symbol(obj2, Decl(file.tsx, 10, 3))
// Error
const c0 = ; // extra property;
->c0 : Symbol(c0, Decl(file.tsx, 11, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->extraProp : Symbol(extraProp, Decl(file.tsx, 11, 20))
+>c0 : Symbol(c0, Decl(file.tsx, 13, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>extraProp : Symbol(extraProp, Decl(file.tsx, 13, 20))
const c1 = ; // missing property;
->c1 : Symbol(c1, Decl(file.tsx, 12, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->yy : Symbol(yy, Decl(file.tsx, 12, 20))
+>c1 : Symbol(c1, Decl(file.tsx, 14, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>yy : Symbol(yy, Decl(file.tsx, 14, 20))
const c2 = ; // type incompatible;
->c2 : Symbol(c2, Decl(file.tsx, 13, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
->yy1 : Symbol(yy1, Decl(file.tsx, 13, 29))
+>c2 : Symbol(c2, Decl(file.tsx, 15, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
+>yy1 : Symbol(yy1, Decl(file.tsx, 15, 29))
const c3 = ; // This is OK because all attribute are spread
->c3 : Symbol(c3, Decl(file.tsx, 14, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
->extra : Symbol(extra, Decl(file.tsx, 14, 35))
+>c3 : Symbol(c3, Decl(file.tsx, 16, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
+>extra : Symbol(extra, Decl(file.tsx, 16, 35))
const c4 = ; // extra property;
->c4 : Symbol(c4, Decl(file.tsx, 15, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
->y1 : Symbol(y1, Decl(file.tsx, 15, 29))
+>c4 : Symbol(c4, Decl(file.tsx, 17, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
+>y1 : Symbol(y1, Decl(file.tsx, 17, 29))
const c5 = ; // type incompatible;
->c5 : Symbol(c5, Decl(file.tsx, 16, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj : Symbol(obj, Decl(file.tsx, 4, 3))
->yy : Symbol(yy, Decl(file.tsx, 16, 35))
+>c5 : Symbol(c5, Decl(file.tsx, 18, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj : Symbol(obj, Decl(file.tsx, 6, 3))
+>yy : Symbol(yy, Decl(file.tsx, 18, 35))
const c6 = ; // Should error as there is extra attribute that doesn't match any. Current it is not
->c6 : Symbol(c6, Decl(file.tsx, 17, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
->extra : Symbol(extra, Decl(file.tsx, 17, 36))
+>c6 : Symbol(c6, Decl(file.tsx, 19, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj2 : Symbol(obj2, Decl(file.tsx, 10, 3))
+>extra : Symbol(extra, Decl(file.tsx, 19, 36))
const c7 = ; // Should error as there is extra attribute that doesn't match any. Current it is not
->c7 : Symbol(c7, Decl(file.tsx, 18, 5))
->OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
->obj2 : Symbol(obj2, Decl(file.tsx, 8, 3))
->yy : Symbol(yy, Decl(file.tsx, 18, 30))
+>c7 : Symbol(c7, Decl(file.tsx, 20, 5))
+>OneThing : Symbol(OneThing, Decl(file.tsx, 2, 31), Decl(file.tsx, 3, 41))
+>obj2 : Symbol(obj2, Decl(file.tsx, 10, 3))
+>yy : Symbol(yy, Decl(file.tsx, 20, 30))
declare function TestingOneThing(j: {"extra-data": string}): JSX.Element;
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 18, 37), Decl(file.tsx, 20, 73))
->j : Symbol(j, Decl(file.tsx, 20, 33))
->"extra-data" : Symbol("extra-data", Decl(file.tsx, 20, 37))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 20, 37), Decl(file.tsx, 22, 73))
+>j : Symbol(j, Decl(file.tsx, 22, 33))
+>"extra-data" : Symbol("extra-data", Decl(file.tsx, 22, 37))
>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, direction?: number}): JSX.Element;
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 18, 37), Decl(file.tsx, 20, 73))
->n : Symbol(n, Decl(file.tsx, 21, 33))
->yy : Symbol(yy, Decl(file.tsx, 21, 37))
->direction : Symbol(direction, Decl(file.tsx, 21, 48))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 20, 37), Decl(file.tsx, 22, 73))
+>n : Symbol(n, Decl(file.tsx, 23, 33))
+>yy : Symbol(yy, Decl(file.tsx, 23, 37))
+>direction : Symbol(direction, Decl(file.tsx, 23, 48))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// Error
const d1 =
->d1 : Symbol(d1, Decl(file.tsx, 24, 5))
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 18, 37), Decl(file.tsx, 20, 73))
->extra-data : Symbol(extra-data, Decl(file.tsx, 24, 27))
+>d1 : Symbol(d1, Decl(file.tsx, 26, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 20, 37), Decl(file.tsx, 22, 73))
+>extra-data : Symbol(extra-data, Decl(file.tsx, 26, 27))
const d2 =
->d2 : Symbol(d2, Decl(file.tsx, 25, 5))
->TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 18, 37), Decl(file.tsx, 20, 73))
->yy : Symbol(yy, Decl(file.tsx, 25, 27))
->direction : Symbol(direction, Decl(file.tsx, 25, 38))
+>d2 : Symbol(d2, Decl(file.tsx, 27, 5))
+>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 20, 37), Decl(file.tsx, 22, 73))
+>yy : Symbol(yy, Decl(file.tsx, 27, 27))
+>direction : Symbol(direction, Decl(file.tsx, 27, 38))
declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->a : Symbol(a, Decl(file.tsx, 27, 33))
->y1 : Symbol(y1, Decl(file.tsx, 27, 37))
->y2 : Symbol(y2, Decl(file.tsx, 27, 49))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>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, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element;
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->a : Symbol(a, Decl(file.tsx, 28, 33))
->y1 : Symbol(y1, Decl(file.tsx, 28, 37))
->y2 : Symbol(y2, Decl(file.tsx, 28, 49))
->children : Symbol(children, Decl(file.tsx, 28, 62))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>a : Symbol(a, Decl(file.tsx, 30, 33))
+>y1 : Symbol(y1, Decl(file.tsx, 30, 37))
+>y2 : Symbol(y2, Decl(file.tsx, 30, 49))
+>children : Symbol(children, Decl(file.tsx, 30, 62))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 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, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->a : Symbol(a, Decl(file.tsx, 29, 33))
->y1 : Symbol(y1, Decl(file.tsx, 29, 37))
->y2 : Symbol(y2, Decl(file.tsx, 29, 49))
->y3 : Symbol(y3, Decl(file.tsx, 29, 62))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>a : Symbol(a, Decl(file.tsx, 31, 33))
+>y1 : Symbol(y1, Decl(file.tsx, 31, 37))
+>y2 : Symbol(y2, Decl(file.tsx, 31, 49))
+>y3 : Symbol(y3, Decl(file.tsx, 31, 62))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// Error
const e1 =
->e1 : Symbol(e1, Decl(file.tsx, 32, 5))
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->y1 : Symbol(y1, Decl(file.tsx, 32, 27))
->y3 : Symbol(y3, Decl(file.tsx, 32, 30))
+>e1 : Symbol(e1, Decl(file.tsx, 34, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>y1 : Symbol(y1, Decl(file.tsx, 34, 27))
+>y3 : Symbol(y3, Decl(file.tsx, 34, 30))
const e2 =
->e2 : Symbol(e2, Decl(file.tsx, 33, 5))
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->y1 : Symbol(y1, Decl(file.tsx, 33, 27))
->y2 : Symbol(y2, Decl(file.tsx, 33, 38))
->y3 : Symbol(y3, Decl(file.tsx, 33, 48))
+>e2 : Symbol(e2, Decl(file.tsx, 35, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>y1 : Symbol(y1, Decl(file.tsx, 35, 27))
+>y2 : Symbol(y2, Decl(file.tsx, 35, 38))
+>y3 : Symbol(y3, Decl(file.tsx, 35, 48))
const e3 =
->e3 : Symbol(e3, Decl(file.tsx, 34, 5))
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->y1 : Symbol(y1, Decl(file.tsx, 34, 27))
->y2 : Symbol(y2, Decl(file.tsx, 34, 38))
->children : Symbol(children, Decl(file.tsx, 34, 48))
+>e3 : Symbol(e3, Decl(file.tsx, 36, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>y1 : Symbol(y1, Decl(file.tsx, 36, 27))
+>y2 : Symbol(y2, Decl(file.tsx, 36, 38))
+>children : Symbol(children, Decl(file.tsx, 36, 48))
const e4 = Hi
->e4 : Symbol(e4, Decl(file.tsx, 35, 5))
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
->y1 : Symbol(y1, Decl(file.tsx, 35, 27))
->y2 : Symbol(y2, Decl(file.tsx, 35, 38))
->TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 25, 58), Decl(file.tsx, 27, 77), Decl(file.tsx, 28, 100))
+>e4 : Symbol(e4, Decl(file.tsx, 37, 5))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
+>y1 : Symbol(y1, Decl(file.tsx, 37, 27))
+>y2 : Symbol(y2, Decl(file.tsx, 37, 38))
+>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 27, 58), Decl(file.tsx, 29, 77), Decl(file.tsx, 30, 100))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types
index 54c8b20e97769..2b99147b05b53 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
index cf6aab23da1ff..029a3f87b9e28 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
@@ -1,4 +1,4 @@
-file.tsx(48,13): error TS2769: No overload matches this call.
+file.tsx(50,13): error TS2769: No overload matches this call.
Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
Property 'to' does not exist on type 'IntrinsicAttributes & ButtonProps'.
@@ -8,21 +8,21 @@ file.tsx(48,13): error TS2769: No overload matches this call.
Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
-file.tsx(54,51): error TS2769: No overload matches this call.
+file.tsx(56,51): error TS2769: No overload matches this call.
Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
Type 'number' is not assignable to type 'string'.
Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
Type 'number' is not assignable to type 'string'.
Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
Type 'number' is not assignable to type 'string'.
-file.tsx(55,68): error TS2769: No overload matches this call.
+file.tsx(57,68): error TS2769: No overload matches this call.
Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
Type 'boolean' is not assignable to type 'string'.
Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
Type 'boolean' is not assignable to type 'string'.
Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
Type 'boolean' is not assignable to type 'string'.
-file.tsx(56,13): error TS2769: No overload matches this call.
+file.tsx(58,13): error TS2769: No overload matches this call.
Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
Property 'onClick' is missing in type '{ "data-format": true; }' but required in type 'ButtonProps'.
Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
@@ -34,6 +34,8 @@ file.tsx(56,13): error TS2769: No overload matches this call.
==== file.tsx (4 errors) ====
+ ///
+
import React = require('react')
export interface ClickableProps {
@@ -93,7 +95,7 @@ file.tsx(56,13): error TS2769: No overload matches this call.
!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
!!! error TS2769: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
!!! error TS2769: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
-!!! related TS2793 file.tsx:38:17: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
+!!! related TS2793 file.tsx:40:17: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
const b1 = {}} {...obj0}>Hello world ; // extra property;
const b2 = ; // extra property
const b3 = {}}} />; // extra property
@@ -108,9 +110,9 @@ file.tsx(56,13): error TS2769: No overload matches this call.
!!! error TS2769: Type 'number' is not assignable to type 'string'.
!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
!!! error TS2769: Type 'number' is not assignable to type 'string'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & ButtonProps'
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & LinkProps'
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & HyphenProps'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & ButtonProps'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & LinkProps'
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & HyphenProps'
const b7 = ; // incorrect type for optional attribute
~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -120,9 +122,9 @@ file.tsx(56,13): error TS2769: No overload matches this call.
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
-!!! related TS6500 file.tsx:5:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & ButtonProps'
-!!! related TS6500 file.tsx:5:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & LinkProps'
-!!! related TS6500 file.tsx:5:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & HyphenProps'
+!!! related TS6500 file.tsx:7:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & ButtonProps'
+!!! related TS6500 file.tsx:7:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & LinkProps'
+!!! related TS6500 file.tsx:7:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & HyphenProps'
const b8 = ; // incorrect type for specified hyphanated name
~~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -134,5 +136,5 @@ file.tsx(56,13): error TS2769: No overload matches this call.
!!! error TS2769: Type '{ "data-format": true; }' is not assignable to type 'HyphenProps'.
!!! error TS2769: Types of property '"data-format"' are incompatible.
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
-!!! related TS2728 file.tsx:9:5: 'onClick' is declared here.
-!!! related TS2728 file.tsx:13:5: 'to' is declared here.
\ No newline at end of file
+!!! related TS2728 file.tsx:11:5: 'onClick' is declared here.
+!!! related TS2728 file.tsx:15:5: 'to' is declared here.
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js
index 3d71699df61c6..179a803b80569 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
export interface ClickableProps {
@@ -60,6 +62,7 @@ const b8 = ; // incorrect type for specified hyphanat
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.MainButton = MainButton;
var React = require("react");
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.symbols
index 4d5d3e21e4a54..31ba990f3c21c 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.symbols
@@ -1,181 +1,183 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
export interface ClickableProps {
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 0, 31))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 31))
children?: string;
->children : Symbol(ClickableProps.children, Decl(file.tsx, 2, 33))
+>children : Symbol(ClickableProps.children, Decl(file.tsx, 4, 33))
className?: string;
->className : Symbol(ClickableProps.className, Decl(file.tsx, 3, 22))
+>className : Symbol(ClickableProps.className, Decl(file.tsx, 5, 22))
}
export interface ButtonProps extends ClickableProps {
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 0, 31))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 31))
onClick: React.MouseEventHandler;
->onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 7, 53))
+>onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 9, 53))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>MouseEventHandler : Symbol(React.MouseEventHandler, Decl(react.d.ts, 389, 66))
}
export interface LinkProps extends ClickableProps {
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 0, 31))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 31))
to: string;
->to : Symbol(LinkProps.to, Decl(file.tsx, 11, 51))
+>to : Symbol(LinkProps.to, Decl(file.tsx, 13, 51))
}
export interface HyphenProps extends ClickableProps {
->HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 0, 31))
+>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 15, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 31))
"data-format": string;
->"data-format" : Symbol(HyphenProps["data-format"], Decl(file.tsx, 15, 53))
+>"data-format" : Symbol(HyphenProps["data-format"], Decl(file.tsx, 17, 53))
}
let obj0 = {
->obj0 : Symbol(obj0, Decl(file.tsx, 19, 3))
+>obj0 : Symbol(obj0, Decl(file.tsx, 21, 3))
to: "world"
->to : Symbol(to, Decl(file.tsx, 19, 12))
+>to : Symbol(to, Decl(file.tsx, 21, 12))
};
let obj1 = {
->obj1 : Symbol(obj1, Decl(file.tsx, 23, 3))
+>obj1 : Symbol(obj1, Decl(file.tsx, 25, 3))
children: "hi",
->children : Symbol(children, Decl(file.tsx, 23, 12))
+>children : Symbol(children, Decl(file.tsx, 25, 12))
to: "boo"
->to : Symbol(to, Decl(file.tsx, 24, 19))
+>to : Symbol(to, Decl(file.tsx, 26, 19))
}
let obj2 = {
->obj2 : Symbol(obj2, Decl(file.tsx, 28, 3))
+>obj2 : Symbol(obj2, Decl(file.tsx, 30, 3))
onClick: ()=>{}
->onClick : Symbol(onClick, Decl(file.tsx, 28, 12))
+>onClick : Symbol(onClick, Decl(file.tsx, 30, 12))
}
let obj3: any;
->obj3 : Symbol(obj3, Decl(file.tsx, 32, 3))
+>obj3 : Symbol(obj3, Decl(file.tsx, 34, 3))
export function MainButton(buttonProps: ButtonProps): JSX.Element;
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->buttonProps : Symbol(buttonProps, Decl(file.tsx, 34, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>buttonProps : Symbol(buttonProps, Decl(file.tsx, 36, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
>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, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->linkProps : Symbol(linkProps, Decl(file.tsx, 35, 27))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 37, 27))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
>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, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->hyphenProps : Symbol(hyphenProps, Decl(file.tsx, 36, 27))
->HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>hyphenProps : Symbol(hyphenProps, Decl(file.tsx, 38, 27))
+>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 15, 1))
>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, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->props : Symbol(props, Decl(file.tsx, 37, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
->HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>props : Symbol(props, Decl(file.tsx, 39, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 15, 1))
>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, 38, 9))
->props : Symbol(props, Decl(file.tsx, 37, 27))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 40, 9))
+>props : Symbol(props, Decl(file.tsx, 39, 27))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
if(linkProps.to) {
->linkProps.to : Symbol(LinkProps.to, Decl(file.tsx, 11, 51))
->linkProps : Symbol(linkProps, Decl(file.tsx, 38, 9))
->to : Symbol(LinkProps.to, Decl(file.tsx, 11, 51))
+>linkProps.to : Symbol(LinkProps.to, Decl(file.tsx, 13, 51))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 40, 9))
+>to : Symbol(LinkProps.to, Decl(file.tsx, 13, 51))
return this._buildMainLink(props);
->props : Symbol(props, Decl(file.tsx, 37, 27))
+>props : Symbol(props, Decl(file.tsx, 39, 27))
}
return this._buildMainButton(props);
->props : Symbol(props, Decl(file.tsx, 37, 27))
+>props : Symbol(props, Decl(file.tsx, 39, 27))
}
// Error
const b0 = {}}>GO ; // extra property;
->b0 : Symbol(b0, Decl(file.tsx, 47, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->to : Symbol(to, Decl(file.tsx, 47, 22))
->onClick : Symbol(onClick, Decl(file.tsx, 47, 38))
->e : Symbol(e, Decl(file.tsx, 47, 49))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
+>b0 : Symbol(b0, Decl(file.tsx, 49, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>to : Symbol(to, Decl(file.tsx, 49, 22))
+>onClick : Symbol(onClick, Decl(file.tsx, 49, 38))
+>e : Symbol(e, Decl(file.tsx, 49, 49))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
const b1 = {}} {...obj0}>Hello world ; // extra property;
->b1 : Symbol(b1, Decl(file.tsx, 48, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 48, 22))
->e : Symbol(e, Decl(file.tsx, 48, 33))
->obj0 : Symbol(obj0, Decl(file.tsx, 19, 3))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
+>b1 : Symbol(b1, Decl(file.tsx, 50, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 50, 22))
+>e : Symbol(e, Decl(file.tsx, 50, 33))
+>obj0 : Symbol(obj0, Decl(file.tsx, 21, 3))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
const b2 = ; // extra property
->b2 : Symbol(b2, Decl(file.tsx, 49, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->to : Symbol(to, Decl(file.tsx, 49, 28))
->obj2 : Symbol(obj2, Decl(file.tsx, 28, 3))
+>b2 : Symbol(b2, Decl(file.tsx, 51, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>to : Symbol(to, Decl(file.tsx, 51, 28))
+>obj2 : Symbol(obj2, Decl(file.tsx, 30, 3))
const b3 = {}}} />; // extra property
->b3 : Symbol(b3, Decl(file.tsx, 50, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->to : Symbol(to, Decl(file.tsx, 50, 28))
->onClick : Symbol(onClick, Decl(file.tsx, 50, 47))
->k : Symbol(k, Decl(file.tsx, 50, 57))
+>b3 : Symbol(b3, Decl(file.tsx, 52, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>to : Symbol(to, Decl(file.tsx, 52, 28))
+>onClick : Symbol(onClick, Decl(file.tsx, 52, 47))
+>k : Symbol(k, Decl(file.tsx, 52, 57))
const b4 = ; // Should error because Incorrect type; but attributes are any so everything is allowed
->b4 : Symbol(b4, Decl(file.tsx, 51, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->obj3 : Symbol(obj3, Decl(file.tsx, 32, 3))
->to : Symbol(to, Decl(file.tsx, 51, 32))
+>b4 : Symbol(b4, Decl(file.tsx, 53, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>obj3 : Symbol(obj3, Decl(file.tsx, 34, 3))
+>to : Symbol(to, Decl(file.tsx, 53, 32))
const b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes
->b5 : Symbol(b5, Decl(file.tsx, 52, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 52, 28))
->e : Symbol(e, Decl(file.tsx, 52, 37))
->obj0 : Symbol(obj0, Decl(file.tsx, 19, 3))
+>b5 : Symbol(b5, Decl(file.tsx, 54, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 54, 28))
+>e : Symbol(e, Decl(file.tsx, 54, 37))
+>obj0 : Symbol(obj0, Decl(file.tsx, 21, 3))
const b6 = ; // incorrect type for optional attribute
->b6 : Symbol(b6, Decl(file.tsx, 53, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 53, 28))
->e : Symbol(e, Decl(file.tsx, 53, 37))
->children : Symbol(children, Decl(file.tsx, 53, 49))
+>b6 : Symbol(b6, Decl(file.tsx, 55, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 55, 28))
+>e : Symbol(e, Decl(file.tsx, 55, 37))
+>children : Symbol(children, Decl(file.tsx, 55, 49))
const b7 = ; // incorrect type for optional attribute
->b7 : Symbol(b7, Decl(file.tsx, 54, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 54, 28))
->e : Symbol(e, Decl(file.tsx, 54, 37))
->children : Symbol(children, Decl(file.tsx, 54, 49))
->className : Symbol(className, Decl(file.tsx, 54, 66))
+>b7 : Symbol(b7, Decl(file.tsx, 56, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 56, 28))
+>e : Symbol(e, Decl(file.tsx, 56, 37))
+>children : Symbol(children, Decl(file.tsx, 56, 49))
+>className : Symbol(className, Decl(file.tsx, 56, 66))
const b8 = ; // incorrect type for specified hyphanated name
->b8 : Symbol(b8, Decl(file.tsx, 55, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 32, 14), Decl(file.tsx, 34, 66), Decl(file.tsx, 35, 62), Decl(file.tsx, 36, 66))
->data-format : Symbol(data-format, Decl(file.tsx, 55, 22))
+>b8 : Symbol(b8, Decl(file.tsx, 57, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 34, 14), Decl(file.tsx, 36, 66), Decl(file.tsx, 37, 62), Decl(file.tsx, 38, 66))
+>data-format : Symbol(data-format, Decl(file.tsx, 57, 22))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.types
index a44c769489372..95090c258484e 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js
index c70c161212043..e179cb61c8b9a 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function log(...args: any[]): void;
@@ -63,6 +65,7 @@ const b12 =
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
exports.MainButton = MainButton;
var React = require("react");
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols
index 02bb0d9bc9a6c..9a4f072e94aeb 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols
@@ -1,195 +1,197 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function log(...args: any[]): void;
->log : Symbol(log, Decl(file.tsx, 0, 31))
->args : Symbol(args, Decl(file.tsx, 2, 21))
+>log : Symbol(log, Decl(file.tsx, 2, 31))
+>args : Symbol(args, Decl(file.tsx, 4, 21))
export interface ClickableProps {
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
children?: string;
->children : Symbol(ClickableProps.children, Decl(file.tsx, 4, 33))
+>children : Symbol(ClickableProps.children, Decl(file.tsx, 6, 33))
className?: string;
->className : Symbol(ClickableProps.className, Decl(file.tsx, 5, 22))
+>className : Symbol(ClickableProps.className, Decl(file.tsx, 7, 22))
}
export interface ButtonProps extends ClickableProps {
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
onClick: React.MouseEventHandler;
->onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 9, 53))
+>onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 11, 53))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>MouseEventHandler : Symbol(React.MouseEventHandler, Decl(react.d.ts, 389, 66))
}
export interface LinkProps extends ClickableProps {
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
to: string;
->to : Symbol(LinkProps.to, Decl(file.tsx, 13, 51))
+>to : Symbol(LinkProps.to, Decl(file.tsx, 15, 51))
}
export interface HyphenProps extends ClickableProps {
->HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 15, 1))
->ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 2, 43))
+>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 17, 1))
+>ClickableProps : Symbol(ClickableProps, Decl(file.tsx, 4, 43))
"data-format": string;
->"data-format" : Symbol(HyphenProps["data-format"], Decl(file.tsx, 17, 53))
+>"data-format" : Symbol(HyphenProps["data-format"], Decl(file.tsx, 19, 53))
}
let obj = {
->obj : Symbol(obj, Decl(file.tsx, 21, 3))
+>obj : Symbol(obj, Decl(file.tsx, 23, 3))
children: "hi",
->children : Symbol(children, Decl(file.tsx, 21, 11))
+>children : Symbol(children, Decl(file.tsx, 23, 11))
to: "boo"
->to : Symbol(to, Decl(file.tsx, 22, 19))
+>to : Symbol(to, Decl(file.tsx, 24, 19))
}
let obj1: any;
->obj1 : Symbol(obj1, Decl(file.tsx, 25, 3))
+>obj1 : Symbol(obj1, Decl(file.tsx, 27, 3))
let obj2 = {
->obj2 : Symbol(obj2, Decl(file.tsx, 26, 3))
+>obj2 : Symbol(obj2, Decl(file.tsx, 28, 3))
onClick: () => {}
->onClick : Symbol(onClick, Decl(file.tsx, 26, 12))
+>onClick : Symbol(onClick, Decl(file.tsx, 28, 12))
}
export function MainButton(buttonProps: ButtonProps): JSX.Element;
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->buttonProps : Symbol(buttonProps, Decl(file.tsx, 30, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>buttonProps : Symbol(buttonProps, Decl(file.tsx, 32, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
>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, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->linkProps : Symbol(linkProps, Decl(file.tsx, 31, 27))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 33, 27))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
>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, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->hyphenProps : Symbol(hyphenProps, Decl(file.tsx, 32, 27))
->HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 15, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>hyphenProps : Symbol(hyphenProps, Decl(file.tsx, 34, 27))
+>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 17, 1))
>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, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->props : Symbol(props, Decl(file.tsx, 33, 27))
->ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 7, 1))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
->HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 15, 1))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>props : Symbol(props, Decl(file.tsx, 35, 27))
+>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 9, 1))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
+>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 17, 1))
>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, 34, 9))
->props : Symbol(props, Decl(file.tsx, 33, 27))
->LinkProps : Symbol(LinkProps, Decl(file.tsx, 11, 1))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 36, 9))
+>props : Symbol(props, Decl(file.tsx, 35, 27))
+>LinkProps : Symbol(LinkProps, Decl(file.tsx, 13, 1))
if(linkProps.to) {
->linkProps.to : Symbol(LinkProps.to, Decl(file.tsx, 13, 51))
->linkProps : Symbol(linkProps, Decl(file.tsx, 34, 9))
->to : Symbol(LinkProps.to, Decl(file.tsx, 13, 51))
+>linkProps.to : Symbol(LinkProps.to, Decl(file.tsx, 15, 51))
+>linkProps : Symbol(linkProps, Decl(file.tsx, 36, 9))
+>to : Symbol(LinkProps.to, Decl(file.tsx, 15, 51))
return this._buildMainLink(props);
->props : Symbol(props, Decl(file.tsx, 33, 27))
+>props : Symbol(props, Decl(file.tsx, 35, 27))
}
return this._buildMainButton(props);
->props : Symbol(props, Decl(file.tsx, 33, 27))
+>props : Symbol(props, Decl(file.tsx, 35, 27))
}
// OK
const b0 = GO ;
->b0 : Symbol(b0, Decl(file.tsx, 43, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->to : Symbol(to, Decl(file.tsx, 43, 22))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
+>b0 : Symbol(b0, Decl(file.tsx, 45, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>to : Symbol(to, Decl(file.tsx, 45, 22))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
const b1 = {}}>Hello world ;
->b1 : Symbol(b1, Decl(file.tsx, 44, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 44, 22))
->e : Symbol(e, Decl(file.tsx, 44, 33))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
+>b1 : Symbol(b1, Decl(file.tsx, 46, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 46, 22))
+>e : Symbol(e, Decl(file.tsx, 46, 33))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
const b2 = ;
->b2 : Symbol(b2, Decl(file.tsx, 45, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->obj : Symbol(obj, Decl(file.tsx, 21, 3))
+>b2 : Symbol(b2, Decl(file.tsx, 47, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>obj : Symbol(obj, Decl(file.tsx, 23, 3))
const b3 = ;
->b3 : Symbol(b3, Decl(file.tsx, 46, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->to : Symbol(to, Decl(file.tsx, 46, 28))
->obj : Symbol(obj, Decl(file.tsx, 21, 3))
+>b3 : Symbol(b3, Decl(file.tsx, 48, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>to : Symbol(to, Decl(file.tsx, 48, 28))
+>obj : Symbol(obj, Decl(file.tsx, 23, 3))
const b4 = ; // any; just pick the first overload
->b4 : Symbol(b4, Decl(file.tsx, 47, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->obj1 : Symbol(obj1, Decl(file.tsx, 25, 3))
+>b4 : Symbol(b4, Decl(file.tsx, 49, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>obj1 : Symbol(obj1, Decl(file.tsx, 27, 3))
const b5 = ; // should pick the second overload
->b5 : Symbol(b5, Decl(file.tsx, 48, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->obj1 : Symbol(obj1, Decl(file.tsx, 25, 3))
->to : Symbol(to, Decl(file.tsx, 48, 32))
+>b5 : Symbol(b5, Decl(file.tsx, 50, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>obj1 : Symbol(obj1, Decl(file.tsx, 27, 3))
+>to : Symbol(to, Decl(file.tsx, 50, 32))
const b6 = ;
->b6 : Symbol(b6, Decl(file.tsx, 49, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->obj2 : Symbol(obj2, Decl(file.tsx, 26, 3))
+>b6 : Symbol(b6, Decl(file.tsx, 51, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>obj2 : Symbol(obj2, Decl(file.tsx, 28, 3))
const b7 = { log("hi") }}} />;
->b7 : Symbol(b7, Decl(file.tsx, 50, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 50, 28))
->log : Symbol(log, Decl(file.tsx, 0, 31))
+>b7 : Symbol(b7, Decl(file.tsx, 52, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 52, 28))
+>log : Symbol(log, Decl(file.tsx, 2, 31))
const b8 = ; // OK; method declaration get retained (See GitHub #13365)
->b8 : Symbol(b8, Decl(file.tsx, 51, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 51, 28))
+>b8 : Symbol(b8, Decl(file.tsx, 53, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 53, 28))
const b9 = GO ;
->b9 : Symbol(b9, Decl(file.tsx, 52, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->to : Symbol(to, Decl(file.tsx, 52, 22))
->extra-prop : Symbol(extra-prop, Decl(file.tsx, 52, 38))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
+>b9 : Symbol(b9, Decl(file.tsx, 54, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>to : Symbol(to, Decl(file.tsx, 54, 22))
+>extra-prop : Symbol(extra-prop, Decl(file.tsx, 54, 38))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
const b10 = ;
->b10 : Symbol(b10, Decl(file.tsx, 53, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->to : Symbol(to, Decl(file.tsx, 53, 23))
->children : Symbol(children, Decl(file.tsx, 53, 39))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
+>b10 : Symbol(b10, Decl(file.tsx, 55, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>to : Symbol(to, Decl(file.tsx, 55, 23))
+>children : Symbol(children, Decl(file.tsx, 55, 39))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
const b11 = {}} className="hello" data-format>Hello world ;
->b11 : Symbol(b11, Decl(file.tsx, 54, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->onClick : Symbol(onClick, Decl(file.tsx, 54, 23))
->e : Symbol(e, Decl(file.tsx, 54, 34))
->className : Symbol(className, Decl(file.tsx, 54, 43))
->data-format : Symbol(data-format, Decl(file.tsx, 54, 61))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
+>b11 : Symbol(b11, Decl(file.tsx, 56, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>onClick : Symbol(onClick, Decl(file.tsx, 56, 23))
+>e : Symbol(e, Decl(file.tsx, 56, 34))
+>className : Symbol(className, Decl(file.tsx, 56, 43))
+>data-format : Symbol(data-format, Decl(file.tsx, 56, 61))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
const b12 =
->b12 : Symbol(b12, Decl(file.tsx, 55, 5))
->MainButton : Symbol(MainButton, Decl(file.tsx, 28, 1), Decl(file.tsx, 30, 66), Decl(file.tsx, 31, 62), Decl(file.tsx, 32, 66))
->data-format : Symbol(data-format, Decl(file.tsx, 55, 23))
+>b12 : Symbol(b12, Decl(file.tsx, 57, 5))
+>MainButton : Symbol(MainButton, Decl(file.tsx, 30, 1), Decl(file.tsx, 32, 66), Decl(file.tsx, 33, 62), Decl(file.tsx, 34, 66))
+>data-format : Symbol(data-format, Decl(file.tsx, 57, 23))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types
index 7b6fd3acc5a4d..8f6255f4cdc0d 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.errors.txt
index 795f9da77205b..311f6647336d3 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react')
interface MyComponentProp {
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.js b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.js
index 393830a5e1429..b466cbef6f72e 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
interface MyComponentProp {
@@ -16,6 +18,7 @@ let i = ; // We infer type arguments here
let i1 = ;
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols
index cbb84ab6020f4..f4c91c5021b1f 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.symbols
@@ -1,22 +1,24 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface MyComponentProp {
->MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 0, 31))
+>MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 2, 31))
values: string;
->values : Symbol(MyComponentProp.values, Decl(file.tsx, 2, 27))
+>values : Symbol(MyComponentProp.values, Decl(file.tsx, 4, 27))
}
function MyComponent(attr: T) {
->MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
->T : Symbol(T, Decl(file.tsx, 6, 21))
->MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 0, 31))
->attr : Symbol(attr, Decl(file.tsx, 6, 42))
->T : Symbol(T, Decl(file.tsx, 6, 21))
+>MyComponent : Symbol(MyComponent, Decl(file.tsx, 6, 1))
+>T : Symbol(T, Decl(file.tsx, 8, 21))
+>MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 2, 31))
+>attr : Symbol(attr, Decl(file.tsx, 8, 42))
+>T : Symbol(T, Decl(file.tsx, 8, 21))
return attr.values
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -25,12 +27,12 @@ function MyComponent(attr: T) {
// OK
let i = ; // We infer type arguments here
->i : Symbol(i, Decl(file.tsx, 11, 3))
->MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
->values : Symbol(values, Decl(file.tsx, 11, 20))
+>i : Symbol(i, Decl(file.tsx, 13, 3))
+>MyComponent : Symbol(MyComponent, Decl(file.tsx, 6, 1))
+>values : Symbol(values, Decl(file.tsx, 13, 20))
let i1 = ;
->i1 : Symbol(i1, Decl(file.tsx, 12, 3))
->MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
->values : Symbol(values, Decl(file.tsx, 12, 21))
+>i1 : Symbol(i1, Decl(file.tsx, 14, 3))
+>MyComponent : Symbol(MyComponent, Decl(file.tsx, 6, 1))
+>values : Symbol(values, Decl(file.tsx, 14, 21))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.types b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.types
index 90e48ed14f275..24a79c88e75ec 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.errors.txt
index ebc2736a796d4..c7415202da21b 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.errors.txt
@@ -1,9 +1,11 @@
error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-file.tsx(13,24): error TS2322: Type 'number' is not assignable to type 'string'.
+file.tsx(15,24): error TS2322: Type 'number' is not assignable to type 'string'.
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (1 errors) ====
+ ///
+
import React = require('react')
interface MyComponentProp {
@@ -19,4 +21,4 @@ file.tsx(13,24): error TS2322: Type 'number' is not assignable to type 'string'.
let i1 = ;
~~~~~~
!!! error TS2322: Type 'number' is not assignable to type 'string'.
-!!! related TS6500 file.tsx:4:5: The expected type comes from property 'values' which is declared here on type 'IntrinsicAttributes & MyComponentProp'
\ No newline at end of file
+!!! related TS6500 file.tsx:6:5: The expected type comes from property 'values' which is declared here on type 'IntrinsicAttributes & MyComponentProp'
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.js b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.js
index e85fc71891931..cfff8d495e111 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
interface MyComponentProp {
@@ -16,6 +18,7 @@ function MyComponent1(attr: T) {
let i1 = ;
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.symbols
index b448d1e9f615d..b424932b22efd 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.symbols
@@ -1,22 +1,24 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface MyComponentProp {
->MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 0, 31))
+>MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 2, 31))
values: string;
->values : Symbol(MyComponentProp.values, Decl(file.tsx, 2, 27))
+>values : Symbol(MyComponentProp.values, Decl(file.tsx, 4, 27))
}
function MyComponent1(attr: T) {
->MyComponent1 : Symbol(MyComponent1, Decl(file.tsx, 4, 1))
->T : Symbol(T, Decl(file.tsx, 6, 22))
->MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 0, 31))
->attr : Symbol(attr, Decl(file.tsx, 6, 49))
->T : Symbol(T, Decl(file.tsx, 6, 22))
+>MyComponent1 : Symbol(MyComponent1, Decl(file.tsx, 6, 1))
+>T : Symbol(T, Decl(file.tsx, 8, 22))
+>MyComponentProp : Symbol(MyComponentProp, Decl(file.tsx, 2, 31))
+>attr : Symbol(attr, Decl(file.tsx, 8, 49))
+>T : Symbol(T, Decl(file.tsx, 8, 22))
return attr.values
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -26,7 +28,7 @@ function MyComponent1(attr: T) {
// Error
let i1 = ;
->i1 : Symbol(i1, Decl(file.tsx, 12, 3))
->MyComponent1 : Symbol(MyComponent1, Decl(file.tsx, 4, 1))
->values : Symbol(values, Decl(file.tsx, 12, 22))
+>i1 : Symbol(i1, Decl(file.tsx, 14, 3))
+>MyComponent1 : Symbol(MyComponent1, Decl(file.tsx, 6, 1))
+>values : Symbol(values, Decl(file.tsx, 14, 22))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.types b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.types
index ef82ca9b63018..69e1bcf7d4f3f 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentWithDefaultTypeParameter2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
index b8437c4b2d8c7..527fa8380ed2d 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt
@@ -1,18 +1,20 @@
-file.tsx(19,16): error TS2322: Type '{ naaame: string; }' is not assignable to type 'IntrinsicAttributes & { name: string; }'.
+file.tsx(21,16): error TS2322: Type '{ naaame: string; }' is not assignable to type 'IntrinsicAttributes & { name: string; }'.
Property 'naaame' does not exist on type 'IntrinsicAttributes & { name: string; }'. Did you mean 'name'?
-file.tsx(27,15): error TS2322: Type 'number' is not assignable to type 'string'.
-file.tsx(29,15): error TS2322: Type '{ naaaaaaame: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
+file.tsx(29,15): error TS2322: Type 'number' is not assignable to type 'string'.
+file.tsx(31,15): error TS2322: Type '{ naaaaaaame: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
-file.tsx(34,10): error TS2741: Property '"prop-name"' is missing in type '{ "extra-prop-name": string; }' but required in type '{ "prop-name": string; }'.
-file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
+file.tsx(36,10): error TS2741: Property '"prop-name"' is missing in type '{ "extra-prop-name": string; }' but required in type '{ "prop-name": string; }'.
+file.tsx(39,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
Property 'prop1' does not exist on type 'IntrinsicAttributes'.
-file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
+file.tsx(40,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
Property 'ref' does not exist on type 'IntrinsicAttributes'.
-file.tsx(41,16): error TS1005: ',' expected.
-file.tsx(45,11): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes'.
+file.tsx(43,16): error TS1005: ',' expected.
+file.tsx(47,11): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes'.
==== file.tsx (8 errors) ====
+ ///
+
function EmptyPropSFC() {
return Default Greeting
;
}
@@ -57,7 +59,7 @@ file.tsx(45,11): error TS2559: Type '{ prop1: boolean; }' has no properties in c
let h = ;
~~~~~~~~~~~~
!!! error TS2741: Property '"prop-name"' is missing in type '{ "extra-prop-name": string; }' but required in type '{ "prop-name": string; }'.
-!!! related TS2728 file.tsx:11:27: '"prop-name"' is declared here.
+!!! related TS2728 file.tsx:13:27: '"prop-name"' is declared here.
// Error
let i =
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.js b/tests/baselines/reference/tsxStatelessFunctionComponents1.js
index 826f1ad785ad4..db053401c5986 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents1.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx] ////
//// [file.tsx]
+///
+
function EmptyPropSFC() {
return Default Greeting
;
}
@@ -58,6 +60,7 @@ let j4 =
//// [file.jsx]
+///
function EmptyPropSFC() {
return Default Greeting
;
}
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponents1.symbols
index 4ba544e558f65..f5b79a0e9839a 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.symbols
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx] ////
=== file.tsx ===
+///
+
function EmptyPropSFC() {
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
@@ -10,28 +12,28 @@ function EmptyPropSFC() {
}
function Greet(x: {name: string}) {
->Greet : Symbol(Greet, Decl(file.tsx, 2, 1))
->x : Symbol(x, Decl(file.tsx, 4, 15))
->name : Symbol(name, Decl(file.tsx, 4, 19))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 1))
+>x : Symbol(x, Decl(file.tsx, 6, 15))
+>name : Symbol(name, Decl(file.tsx, 6, 19))
return Hello, {x}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->x : Symbol(x, Decl(file.tsx, 4, 15))
+>x : Symbol(x, Decl(file.tsx, 6, 15))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
function Meet({name = 'world'}) {
->Meet : Symbol(Meet, Decl(file.tsx, 6, 1))
->name : Symbol(name, Decl(file.tsx, 7, 15))
+>Meet : Symbol(Meet, Decl(file.tsx, 8, 1))
+>name : Symbol(name, Decl(file.tsx, 9, 15))
return Hello, {name}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->name : Symbol(name, Decl(file.tsx, 7, 15))
+>name : Symbol(name, Decl(file.tsx, 9, 15))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
function MeetAndGreet(k: {"prop-name": string}) {
->MeetAndGreet : Symbol(MeetAndGreet, Decl(file.tsx, 9, 1))
->k : Symbol(k, Decl(file.tsx, 10, 22))
->"prop-name" : Symbol("prop-name", Decl(file.tsx, 10, 26))
+>MeetAndGreet : Symbol(MeetAndGreet, Decl(file.tsx, 11, 1))
+>k : Symbol(k, Decl(file.tsx, 12, 22))
+>"prop-name" : Symbol("prop-name", Decl(file.tsx, 12, 26))
return Hi Hi
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
@@ -40,113 +42,113 @@ function MeetAndGreet(k: {"prop-name": string}) {
// OK
let a = ;
->a : Symbol(a, Decl(file.tsx, 15, 3))
->Greet : Symbol(Greet, Decl(file.tsx, 2, 1))
->name : Symbol(name, Decl(file.tsx, 15, 14))
+>a : Symbol(a, Decl(file.tsx, 17, 3))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 1))
+>name : Symbol(name, Decl(file.tsx, 17, 14))
let a1 = ;
->a1 : Symbol(a1, Decl(file.tsx, 16, 3))
->Greet : Symbol(Greet, Decl(file.tsx, 2, 1))
->name : Symbol(name, Decl(file.tsx, 16, 15))
->extra-prop : Symbol(extra-prop, Decl(file.tsx, 16, 28))
+>a1 : Symbol(a1, Decl(file.tsx, 18, 3))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 1))
+>name : Symbol(name, Decl(file.tsx, 18, 15))
+>extra-prop : Symbol(extra-prop, Decl(file.tsx, 18, 28))
// Error
let b = ;
->b : Symbol(b, Decl(file.tsx, 18, 3))
->Greet : Symbol(Greet, Decl(file.tsx, 2, 1))
->naaame : Symbol(naaame, Decl(file.tsx, 18, 14))
+>b : Symbol(b, Decl(file.tsx, 20, 3))
+>Greet : Symbol(Greet, Decl(file.tsx, 4, 1))
+>naaame : Symbol(naaame, Decl(file.tsx, 20, 14))
// OK
let c = ;
->c : Symbol(c, Decl(file.tsx, 21, 3))
->Meet : Symbol(Meet, Decl(file.tsx, 6, 1))
+>c : Symbol(c, Decl(file.tsx, 23, 3))
+>Meet : Symbol(Meet, Decl(file.tsx, 8, 1))
let c1 = ;
->c1 : Symbol(c1, Decl(file.tsx, 22, 3))
->Meet : Symbol(Meet, Decl(file.tsx, 6, 1))
->extra-prop : Symbol(extra-prop, Decl(file.tsx, 22, 14))
+>c1 : Symbol(c1, Decl(file.tsx, 24, 3))
+>Meet : Symbol(Meet, Decl(file.tsx, 8, 1))
+>extra-prop : Symbol(extra-prop, Decl(file.tsx, 24, 14))
// OK
let d = ;
->d : Symbol(d, Decl(file.tsx, 24, 3))
->Meet : Symbol(Meet, Decl(file.tsx, 6, 1))
->name : Symbol(name, Decl(file.tsx, 24, 13))
+>d : Symbol(d, Decl(file.tsx, 26, 3))
+>Meet : Symbol(Meet, Decl(file.tsx, 8, 1))
+>name : Symbol(name, Decl(file.tsx, 26, 13))
// Error
let e = ;
->e : Symbol(e, Decl(file.tsx, 26, 3))
->Meet : Symbol(Meet, Decl(file.tsx, 6, 1))
->name : Symbol(name, Decl(file.tsx, 26, 13))
+>e : Symbol(e, Decl(file.tsx, 28, 3))
+>Meet : Symbol(Meet, Decl(file.tsx, 8, 1))
+>name : Symbol(name, Decl(file.tsx, 28, 13))
// Error
let f = ;
->f : Symbol(f, Decl(file.tsx, 28, 3))
->Meet : Symbol(Meet, Decl(file.tsx, 6, 1))
->naaaaaaame : Symbol(naaaaaaame, Decl(file.tsx, 28, 13))
+>f : Symbol(f, Decl(file.tsx, 30, 3))
+>Meet : Symbol(Meet, Decl(file.tsx, 8, 1))
+>naaaaaaame : Symbol(naaaaaaame, Decl(file.tsx, 30, 13))
// OK
let g = ;
->g : Symbol(g, Decl(file.tsx, 31, 3))
->MeetAndGreet : Symbol(MeetAndGreet, Decl(file.tsx, 9, 1))
->prop-name : Symbol(prop-name, Decl(file.tsx, 31, 21))
+>g : Symbol(g, Decl(file.tsx, 33, 3))
+>MeetAndGreet : Symbol(MeetAndGreet, Decl(file.tsx, 11, 1))
+>prop-name : Symbol(prop-name, Decl(file.tsx, 33, 21))
// Error
let h = ;
->h : Symbol(h, Decl(file.tsx, 33, 3))
->MeetAndGreet : Symbol(MeetAndGreet, Decl(file.tsx, 9, 1))
->extra-prop-name : Symbol(extra-prop-name, Decl(file.tsx, 33, 21))
+>h : Symbol(h, Decl(file.tsx, 35, 3))
+>MeetAndGreet : Symbol(MeetAndGreet, Decl(file.tsx, 11, 1))
+>extra-prop-name : Symbol(extra-prop-name, Decl(file.tsx, 35, 21))
// Error
let i =
->i : Symbol(i, Decl(file.tsx, 36, 3))
+>i : Symbol(i, Decl(file.tsx, 38, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
->prop1 : Symbol(prop1, Decl(file.tsx, 36, 21))
+>prop1 : Symbol(prop1, Decl(file.tsx, 38, 21))
let i1 = x.greeting.substr(10)} />
->i1 : Symbol(i1, Decl(file.tsx, 37, 3))
+>i1 : Symbol(i1, Decl(file.tsx, 39, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
->ref : Symbol(ref, Decl(file.tsx, 37, 22))
->x : Symbol(x, Decl(file.tsx, 37, 28))
->x : Symbol(x, Decl(file.tsx, 37, 28))
+>ref : Symbol(ref, Decl(file.tsx, 39, 22))
+>x : Symbol(x, Decl(file.tsx, 39, 28))
+>x : Symbol(x, Decl(file.tsx, 39, 28))
let o = {
->o : Symbol(o, Decl(file.tsx, 39, 3))
+>o : Symbol(o, Decl(file.tsx, 41, 3))
prop1: true;
->prop1 : Symbol(prop1, Decl(file.tsx, 39, 9))
+>prop1 : Symbol(prop1, Decl(file.tsx, 41, 9))
}
// OK as access properties are allow when spread
let i2 =
->i2 : Symbol(i2, Decl(file.tsx, 44, 3))
+>i2 : Symbol(i2, Decl(file.tsx, 46, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
->o : Symbol(o, Decl(file.tsx, 39, 3))
+>o : Symbol(o, Decl(file.tsx, 41, 3))
let o1: any;
->o1 : Symbol(o1, Decl(file.tsx, 46, 3))
+>o1 : Symbol(o1, Decl(file.tsx, 48, 3))
// OK
let j =
->j : Symbol(j, Decl(file.tsx, 48, 3))
+>j : Symbol(j, Decl(file.tsx, 50, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
->o1 : Symbol(o1, Decl(file.tsx, 46, 3))
+>o1 : Symbol(o1, Decl(file.tsx, 48, 3))
let j1 =
->j1 : Symbol(j1, Decl(file.tsx, 49, 3))
+>j1 : Symbol(j1, Decl(file.tsx, 51, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
let j2 =
->j2 : Symbol(j2, Decl(file.tsx, 50, 3))
+>j2 : Symbol(j2, Decl(file.tsx, 52, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
->data-prop : Symbol(data-prop, Decl(file.tsx, 50, 22))
+>data-prop : Symbol(data-prop, Decl(file.tsx, 52, 22))
let j3 =
->j3 : Symbol(j3, Decl(file.tsx, 51, 3))
+>j3 : Symbol(j3, Decl(file.tsx, 53, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
let j4 =
->j4 : Symbol(j4, Decl(file.tsx, 52, 3))
+>j4 : Symbol(j4, Decl(file.tsx, 54, 3))
>EmptyPropSFC : Symbol(EmptyPropSFC, Decl(file.tsx, 0, 0))
->"data-info" : Symbol("data-info", Decl(file.tsx, 52, 28))
+>"data-info" : Symbol("data-info", Decl(file.tsx, 54, 28))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.types b/tests/baselines/reference/tsxStatelessFunctionComponents1.types
index 971bc1646b497..6d642180afb39 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents1.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx] ////
=== file.tsx ===
+///
+
function EmptyPropSFC() {
>EmptyPropSFC : () => JSX.Element
> : ^^^^^^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt
index 4a44bdf4fde7a..5b1c623b7775a 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt
@@ -1,11 +1,13 @@
-file.tsx(19,16): error TS2322: Type '{ ref: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
+file.tsx(21,16): error TS2322: Type '{ ref: string; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
-file.tsx(25,42): error TS2551: Property 'subtr' does not exist on type 'string'. Did you mean 'substr'?
-file.tsx(27,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'.
-file.tsx(35,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'.
+file.tsx(27,42): error TS2551: Property 'subtr' does not exist on type 'string'. Did you mean 'substr'?
+file.tsx(29,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'.
+file.tsx(37,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'.
==== file.tsx (4 errors) ====
+ ///
+
import React = require('react');
function Greet(x: {name?: string}) {
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js
index ea70a2818dc75..e4380cb348ee2 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
function Greet(x: {name?: string}) {
@@ -41,6 +43,7 @@ let i = x.propertyNotOnHtmlDivElement} />;
//// [file.jsx]
"use strict";
+///
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.symbols b/tests/baselines/reference/tsxStatelessFunctionComponents2.symbols
index 66bcbc8633a76..9172ccf64b715 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents2.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.symbols
@@ -1,108 +1,110 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
function Greet(x: {name?: string}) {
->Greet : Symbol(Greet, Decl(file.tsx, 0, 32))
->x : Symbol(x, Decl(file.tsx, 2, 15))
->name : Symbol(name, Decl(file.tsx, 2, 19))
+>Greet : Symbol(Greet, Decl(file.tsx, 2, 32))
+>x : Symbol(x, Decl(file.tsx, 4, 15))
+>name : Symbol(name, Decl(file.tsx, 4, 19))
return
Hello, {x}
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->x : Symbol(x, Decl(file.tsx, 2, 15))
+>x : Symbol(x, Decl(file.tsx, 4, 15))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
class BigGreeter extends React.Component<{ name?: string }, {}> {
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 4, 1))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 6, 1))
>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), Decl(react.d.ts, 161, 66))
->name : Symbol(name, Decl(file.tsx, 6, 42))
+>name : Symbol(name, Decl(file.tsx, 8, 42))
render() {
->render : Symbol(BigGreeter.render, Decl(file.tsx, 6, 65))
+>render : Symbol(BigGreeter.render, Decl(file.tsx, 8, 65))
return
;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
greeting: string;
->greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 9, 2))
+>greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 11, 2))
}
// OK
let a =
;
->a : Symbol(a, Decl(file.tsx, 14, 3))
->Greet : Symbol(Greet, Decl(file.tsx, 0, 32))
+>a : Symbol(a, Decl(file.tsx, 16, 3))
+>Greet : Symbol(Greet, Decl(file.tsx, 2, 32))
// OK - always valid to specify 'key'
let b =
;
->b : Symbol(b, Decl(file.tsx, 16, 3))
->Greet : Symbol(Greet, Decl(file.tsx, 0, 32))
->key : Symbol(key, Decl(file.tsx, 16, 14))
+>b : Symbol(b, Decl(file.tsx, 18, 3))
+>Greet : Symbol(Greet, Decl(file.tsx, 2, 32))
+>key : Symbol(key, Decl(file.tsx, 18, 14))
// Error - not allowed to specify 'ref' on SFCs
let c =
;
->c : Symbol(c, Decl(file.tsx, 18, 3))
->Greet : Symbol(Greet, Decl(file.tsx, 0, 32))
->ref : Symbol(ref, Decl(file.tsx, 18, 14))
+>c : Symbol(c, Decl(file.tsx, 20, 3))
+>Greet : Symbol(Greet, Decl(file.tsx, 2, 32))
+>ref : Symbol(ref, Decl(file.tsx, 20, 14))
// OK - ref is valid for classes
let d =
x.greeting.substr(10)} />;
->d : Symbol(d, Decl(file.tsx, 22, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 4, 1))
->ref : Symbol(ref, Decl(file.tsx, 22, 19))
->x : Symbol(x, Decl(file.tsx, 22, 25))
+>d : Symbol(d, Decl(file.tsx, 24, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 6, 1))
+>ref : Symbol(ref, Decl(file.tsx, 24, 19))
+>x : Symbol(x, Decl(file.tsx, 24, 25))
>x.greeting.substr : Symbol(String.substr, Decl(lib.es5.d.ts, --, --))
->x.greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 9, 2))
->x : Symbol(x, Decl(file.tsx, 22, 25))
->greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 9, 2))
+>x.greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 11, 2))
+>x : Symbol(x, Decl(file.tsx, 24, 25))
+>greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 11, 2))
>substr : Symbol(String.substr, Decl(lib.es5.d.ts, --, --))
// Error ('subtr' not on string)
let e = x.greeting.subtr(10)} />;
->e : Symbol(e, Decl(file.tsx, 24, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 4, 1))
->ref : Symbol(ref, Decl(file.tsx, 24, 19))
->x : Symbol(x, Decl(file.tsx, 24, 25))
->x.greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 9, 2))
->x : Symbol(x, Decl(file.tsx, 24, 25))
->greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 9, 2))
-
-// Error (ref callback is contextually typed)
-let f = x.notARealProperty} />;
->f : Symbol(f, Decl(file.tsx, 26, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 4, 1))
+>e : Symbol(e, Decl(file.tsx, 26, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 6, 1))
>ref : Symbol(ref, Decl(file.tsx, 26, 19))
>x : Symbol(x, Decl(file.tsx, 26, 25))
+>x.greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 11, 2))
>x : Symbol(x, Decl(file.tsx, 26, 25))
+>greeting : Symbol(BigGreeter.greeting, Decl(file.tsx, 11, 2))
+
+// Error (ref callback is contextually typed)
+let f = x.notARealProperty} />;
+>f : Symbol(f, Decl(file.tsx, 28, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 6, 1))
+>ref : Symbol(ref, Decl(file.tsx, 28, 19))
+>x : Symbol(x, Decl(file.tsx, 28, 25))
+>x : Symbol(x, Decl(file.tsx, 28, 25))
// OK - key is always valid
let g = ;
->g : Symbol(g, Decl(file.tsx, 29, 3))
->BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 4, 1))
->key : Symbol(key, Decl(file.tsx, 29, 19))
+>g : Symbol(g, Decl(file.tsx, 31, 3))
+>BigGreeter : Symbol(BigGreeter, Decl(file.tsx, 6, 1))
+>key : Symbol(key, Decl(file.tsx, 31, 19))
// OK - contextually typed intrinsic ref callback parameter
let h = x.innerText} />;
->h : Symbol(h, Decl(file.tsx, 32, 3))
+>h : Symbol(h, Decl(file.tsx, 34, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->ref : Symbol(ref, Decl(file.tsx, 32, 12))
->x : Symbol(x, Decl(file.tsx, 32, 18))
+>ref : Symbol(ref, Decl(file.tsx, 34, 12))
+>x : Symbol(x, Decl(file.tsx, 34, 18))
>x.innerText : Symbol(HTMLElement.innerText, Decl(lib.dom.d.ts, --, --))
->x : Symbol(x, Decl(file.tsx, 32, 18))
+>x : Symbol(x, Decl(file.tsx, 34, 18))
>innerText : Symbol(HTMLElement.innerText, Decl(lib.dom.d.ts, --, --))
// Error - property not on ontextually typed intrinsic ref callback parameter
let i =
x.propertyNotOnHtmlDivElement} />;
->i : Symbol(i, Decl(file.tsx, 34, 3))
+>i : Symbol(i, Decl(file.tsx, 36, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->ref : Symbol(ref, Decl(file.tsx, 34, 12))
->x : Symbol(x, Decl(file.tsx, 34, 18))
->x : Symbol(x, Decl(file.tsx, 34, 18))
+>ref : Symbol(ref, Decl(file.tsx, 36, 12))
+>x : Symbol(x, Decl(file.tsx, 36, 18))
+>x : Symbol(x, Decl(file.tsx, 36, 18))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.types b/tests/baselines/reference/tsxStatelessFunctionComponents2.types
index b2a4e39632b5d..9856fb6c100d3 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents2.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents3.errors.txt
index 38242626b59ab..f5d3adf285d78 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents3.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react');
const Foo = (props: any) =>
;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.js b/tests/baselines/reference/tsxStatelessFunctionComponents3.js
index 52c53ad77fbe6..a9fd52085ce78 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents3.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react');
const Foo = (props: any) =>
;
@@ -20,6 +22,7 @@ var App: React.StatelessComponent<{ children }> = ({children}) => (
);
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols
index f1ffa80d79b23..73d996db72e95 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.symbols
@@ -1,26 +1,28 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const Foo = (props: any) =>
;
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
->props : Symbol(props, Decl(file.tsx, 2, 13))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
+>props : Symbol(props, Decl(file.tsx, 4, 13))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
// Should be OK
const foo =
;
->foo : Symbol(foo, Decl(file.tsx, 4, 5))
->Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
+>foo : Symbol(foo, Decl(file.tsx, 6, 5))
+>Foo : Symbol(Foo, Decl(file.tsx, 4, 5))
// Should be OK
var MainMenu: React.StatelessComponent<{}> = (props) => (
->MainMenu : Symbol(MainMenu, Decl(file.tsx, 8, 3))
+>MainMenu : Symbol(MainMenu, Decl(file.tsx, 10, 3))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
->props : Symbol(props, Decl(file.tsx, 8, 46))
+>props : Symbol(props, Decl(file.tsx, 10, 46))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
Main Menu
@@ -31,17 +33,17 @@ var MainMenu: React.StatelessComponent<{}> = (props) => (
>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))
+>App : Symbol(App, Decl(file.tsx, 14, 3))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>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))
+>children : Symbol(children, Decl(file.tsx, 14, 35))
+>children : Symbol(children, Decl(file.tsx, 14, 52))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
->MainMenu : Symbol(MainMenu, Decl(file.tsx, 8, 3))
+>MainMenu : Symbol(MainMenu, Decl(file.tsx, 10, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.types b/tests/baselines/reference/tsxStatelessFunctionComponents3.types
index a3d87d3a03a0a..766083c989446 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponents3.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react');
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.errors.txt
index bbe13314ee5bd..596f08b7ab0e0 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react')
declare function ComponentWithTwoAttributes
(l: {key1: K, value: V}): JSX.Element;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js
index 5134e9d6a6559..88570edef1d5a 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function ComponentWithTwoAttributes(l: {key1: K, value: V}): JSX.Element;
@@ -33,6 +35,7 @@ declare function InferParamComponent(attr: InferParamProp): JSX.Element;
let i = { }} />;
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols
index b85feb89564fc..9e1cb8294b8bf 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.symbols
@@ -1,112 +1,114 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function ComponentWithTwoAttributes(l: {key1: K, value: V}): JSX.Element;
->ComponentWithTwoAttributes : Symbol(ComponentWithTwoAttributes, Decl(file.tsx, 0, 31))
->K : Symbol(K, Decl(file.tsx, 2, 44))
->V : Symbol(V, Decl(file.tsx, 2, 46))
->l : Symbol(l, Decl(file.tsx, 2, 49))
->key1 : Symbol(key1, Decl(file.tsx, 2, 53))
->K : Symbol(K, Decl(file.tsx, 2, 44))
->value : Symbol(value, Decl(file.tsx, 2, 61))
->V : Symbol(V, Decl(file.tsx, 2, 46))
+>ComponentWithTwoAttributes : Symbol(ComponentWithTwoAttributes, Decl(file.tsx, 2, 31))
+>K : Symbol(K, Decl(file.tsx, 4, 44))
+>V : Symbol(V, Decl(file.tsx, 4, 46))
+>l : Symbol(l, Decl(file.tsx, 4, 49))
+>key1 : Symbol(key1, Decl(file.tsx, 4, 53))
+>K : Symbol(K, Decl(file.tsx, 4, 44))
+>value : Symbol(value, Decl(file.tsx, 4, 61))
+>V : Symbol(V, Decl(file.tsx, 4, 46))
>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) {
->Baz : Symbol(Baz, Decl(file.tsx, 2, 86))
->T : Symbol(T, Decl(file.tsx, 5, 13))
->U : Symbol(U, Decl(file.tsx, 5, 15))
->key1 : Symbol(key1, Decl(file.tsx, 5, 18))
->T : Symbol(T, Decl(file.tsx, 5, 13))
->value : Symbol(value, Decl(file.tsx, 5, 26))
->U : Symbol(U, Decl(file.tsx, 5, 15))
+>Baz : Symbol(Baz, Decl(file.tsx, 4, 86))
+>T : Symbol(T, Decl(file.tsx, 7, 13))
+>U : Symbol(U, Decl(file.tsx, 7, 15))
+>key1 : Symbol(key1, Decl(file.tsx, 7, 18))
+>T : Symbol(T, Decl(file.tsx, 7, 13))
+>value : Symbol(value, Decl(file.tsx, 7, 26))
+>U : Symbol(U, Decl(file.tsx, 7, 15))
let a0 =
->a0 : Symbol(a0, Decl(file.tsx, 6, 7))
->ComponentWithTwoAttributes : Symbol(ComponentWithTwoAttributes, Decl(file.tsx, 0, 31))
->key1 : Symbol(key1, Decl(file.tsx, 6, 40))
->key1 : Symbol(key1, Decl(file.tsx, 5, 18))
->value : Symbol(value, Decl(file.tsx, 6, 52))
->value : Symbol(value, Decl(file.tsx, 5, 26))
+>a0 : Symbol(a0, Decl(file.tsx, 8, 7))
+>ComponentWithTwoAttributes : Symbol(ComponentWithTwoAttributes, Decl(file.tsx, 2, 31))
+>key1 : Symbol(key1, Decl(file.tsx, 8, 40))
+>key1 : Symbol(key1, Decl(file.tsx, 7, 18))
+>value : Symbol(value, Decl(file.tsx, 8, 52))
+>value : Symbol(value, Decl(file.tsx, 7, 26))
let a1 =
->a1 : Symbol(a1, Decl(file.tsx, 7, 7))
->ComponentWithTwoAttributes : Symbol(ComponentWithTwoAttributes, Decl(file.tsx, 0, 31))
->key1 : Symbol(key1, Decl(file.tsx, 7, 46))
->value : Symbol(value, Decl(file.tsx, 7, 51))
->value : Symbol(value, Decl(file.tsx, 5, 26))
->key : Symbol(key, Decl(file.tsx, 7, 66))
+>a1 : Symbol(a1, Decl(file.tsx, 9, 7))
+>ComponentWithTwoAttributes : Symbol(ComponentWithTwoAttributes, Decl(file.tsx, 2, 31))
+>key1 : Symbol(key1, Decl(file.tsx, 9, 46))
+>value : Symbol(value, Decl(file.tsx, 9, 51))
+>value : Symbol(value, Decl(file.tsx, 7, 26))
+>key : Symbol(key, Decl(file.tsx, 9, 66))
}
declare function Link(l: {func: (arg: U)=>void}): JSX.Element;
->Link : Symbol(Link, Decl(file.tsx, 8, 1))
->U : Symbol(U, Decl(file.tsx, 10, 22))
->l : Symbol(l, Decl(file.tsx, 10, 25))
->func : Symbol(func, Decl(file.tsx, 10, 29))
->arg : Symbol(arg, Decl(file.tsx, 10, 36))
->U : Symbol(U, Decl(file.tsx, 10, 22))
+>Link : Symbol(Link, Decl(file.tsx, 10, 1))
+>U : Symbol(U, Decl(file.tsx, 12, 22))
+>l : Symbol(l, Decl(file.tsx, 12, 25))
+>func : Symbol(func, Decl(file.tsx, 12, 29))
+>arg : Symbol(arg, Decl(file.tsx, 12, 36))
+>U : Symbol(U, Decl(file.tsx, 12, 22))
>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) {
->createLink : Symbol(createLink, Decl(file.tsx, 10, 65))
->func : Symbol(func, Decl(file.tsx, 13, 20))
->a : Symbol(a, Decl(file.tsx, 13, 27))
+>createLink : Symbol(createLink, Decl(file.tsx, 12, 65))
+>func : Symbol(func, Decl(file.tsx, 15, 20))
+>a : Symbol(a, Decl(file.tsx, 15, 27))
let o =
->o : Symbol(o, Decl(file.tsx, 14, 7))
->Link : Symbol(Link, Decl(file.tsx, 8, 1))
->func : Symbol(func, Decl(file.tsx, 14, 17))
->func : Symbol(func, Decl(file.tsx, 13, 20))
+>o : Symbol(o, Decl(file.tsx, 16, 7))
+>Link : Symbol(Link, Decl(file.tsx, 10, 1))
+>func : Symbol(func, Decl(file.tsx, 16, 17))
+>func : Symbol(func, Decl(file.tsx, 15, 20))
}
function createLink1(func: (a: number)=>boolean) {
->createLink1 : Symbol(createLink1, Decl(file.tsx, 15, 1))
->func : Symbol(func, Decl(file.tsx, 17, 21))
->a : Symbol(a, Decl(file.tsx, 17, 28))
+>createLink1 : Symbol(createLink1, Decl(file.tsx, 17, 1))
+>func : Symbol(func, Decl(file.tsx, 19, 21))
+>a : Symbol(a, Decl(file.tsx, 19, 28))
let o =
->o : Symbol(o, Decl(file.tsx, 18, 7))
->Link : Symbol(Link, Decl(file.tsx, 8, 1))
->func : Symbol(func, Decl(file.tsx, 18, 17))
->func : Symbol(func, Decl(file.tsx, 17, 21))
+>o : Symbol(o, Decl(file.tsx, 20, 7))
+>Link : Symbol(Link, Decl(file.tsx, 10, 1))
+>func : Symbol(func, Decl(file.tsx, 20, 17))
+>func : Symbol(func, Decl(file.tsx, 19, 21))
}
interface InferParamProp {
->InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 19, 1))
->T : Symbol(T, Decl(file.tsx, 21, 25))
+>InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 21, 1))
+>T : Symbol(T, Decl(file.tsx, 23, 25))
values: Array;
->values : Symbol(InferParamProp.values, Decl(file.tsx, 21, 29))
+>values : Symbol(InferParamProp.values, Decl(file.tsx, 23, 29))
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
->T : Symbol(T, Decl(file.tsx, 21, 25))
+>T : Symbol(T, Decl(file.tsx, 23, 25))
selectHandler: (selectedVal: T) => void;
->selectHandler : Symbol(InferParamProp.selectHandler, Decl(file.tsx, 22, 21))
->selectedVal : Symbol(selectedVal, Decl(file.tsx, 23, 20))
->T : Symbol(T, Decl(file.tsx, 21, 25))
+>selectHandler : Symbol(InferParamProp.selectHandler, Decl(file.tsx, 24, 21))
+>selectedVal : Symbol(selectedVal, Decl(file.tsx, 25, 20))
+>T : Symbol(T, Decl(file.tsx, 23, 25))
}
declare function InferParamComponent(attr: InferParamProp): JSX.Element;
->InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 24, 1))
->T : Symbol(T, Decl(file.tsx, 26, 37))
->attr : Symbol(attr, Decl(file.tsx, 26, 40))
->InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 19, 1))
->T : Symbol(T, Decl(file.tsx, 26, 37))
+>InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 26, 1))
+>T : Symbol(T, Decl(file.tsx, 28, 37))
+>attr : Symbol(attr, Decl(file.tsx, 28, 40))
+>InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 21, 1))
+>T : Symbol(T, Decl(file.tsx, 28, 37))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
let i = { }} />;
->i : Symbol(i, Decl(file.tsx, 29, 3))
->InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 24, 1))
->values : Symbol(values, Decl(file.tsx, 29, 28))
->selectHandler : Symbol(selectHandler, Decl(file.tsx, 29, 50))
->val : Symbol(val, Decl(file.tsx, 29, 67))
+>i : Symbol(i, Decl(file.tsx, 31, 3))
+>InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 26, 1))
+>values : Symbol(values, Decl(file.tsx, 31, 28))
+>selectHandler : Symbol(selectHandler, Decl(file.tsx, 31, 50))
+>val : Symbol(val, Decl(file.tsx, 31, 67))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types
index 3afdade77b833..08e68e064f2e6 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt
index 5d0e87b0a004c..887ae68bbe565 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.errors.txt
@@ -1,19 +1,21 @@
error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-file.tsx(8,15): error TS2322: Type 'T & { "ignore-prop": number; }' is not assignable to type 'IntrinsicAttributes & { prop: number; "ignore-prop": string; }'.
+file.tsx(10,15): error TS2322: Type 'T & { "ignore-prop": number; }' is not assignable to type 'IntrinsicAttributes & { prop: number; "ignore-prop": string; }'.
Type 'T & { "ignore-prop": number; }' is not assignable to type '{ prop: number; "ignore-prop": string; }'.
Types of property '"ignore-prop"' are incompatible.
Type 'number' is not assignable to type 'string'.
-file.tsx(13,15): error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }'.
+file.tsx(15,15): error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }'.
Type 'T' is not assignable to type '{ prop: unknown; "ignore-prop": string; }'.
-file.tsx(20,19): error TS2322: Type '(a: number, b: string) => void' is not assignable to type '(arg: number) => void'.
+file.tsx(22,19): error TS2322: Type '(a: number, b: string) => void' is not assignable to type '(arg: number) => void'.
Target signature provides too few arguments. Expected 2 or more, but got 1.
-file.tsx(31,52): error TS2322: Type '(val: string) => void' is not assignable to type '(selectedVal: number) => void'.
+file.tsx(33,52): error TS2322: Type '(val: string) => void' is not assignable to type '(selectedVal: number) => void'.
Types of parameters 'val' and 'selectedVal' are incompatible.
Type 'number' is not assignable to type 'string'.
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (4 errors) ====
+ ///
+
import React = require('react')
declare function ComponentSpecific1(l: {prop: U, "ignore-prop": string}): JSX.Element;
@@ -35,8 +37,8 @@ file.tsx(31,52): error TS2322: Type '(val: string) => void' is not assignable to
~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }'.
!!! error TS2322: Type 'T' is not assignable to type '{ prop: unknown; "ignore-prop": string; }'.
-!!! related TS2208 file.tsx:12:14: This type parameter might need an `extends { prop: unknown; "ignore-prop": string; }` constraint.
-!!! related TS2208 file.tsx:12:14: This type parameter might need an `extends JSX.IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }` constraint.
+!!! related TS2208 file.tsx:14:14: This type parameter might need an `extends { prop: unknown; "ignore-prop": string; }` constraint.
+!!! related TS2208 file.tsx:14:14: This type parameter might need an `extends JSX.IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }` constraint.
}
declare function Link(l: {func: (arg: U)=>void}): JSX.Element;
@@ -47,7 +49,7 @@ file.tsx(31,52): error TS2322: Type '(val: string) => void' is not assignable to
~~~~
!!! error TS2322: Type '(a: number, b: string) => void' is not assignable to type '(arg: number) => void'.
!!! error TS2322: Target signature provides too few arguments. Expected 2 or more, but got 1.
-!!! related TS6500 file.tsx:16:30: The expected type comes from property 'func' which is declared here on type 'IntrinsicAttributes & { func: (arg: number) => void; }'
+!!! related TS6500 file.tsx:18:30: The expected type comes from property 'func' which is declared here on type 'IntrinsicAttributes & { func: (arg: number) => void; }'
}
interface InferParamProp {
@@ -63,5 +65,5 @@ file.tsx(31,52): error TS2322: Type '(val: string) => void' is not assignable to
!!! error TS2322: Type '(val: string) => void' is not assignable to type '(selectedVal: number) => void'.
!!! error TS2322: Types of parameters 'val' and 'selectedVal' are incompatible.
!!! error TS2322: Type 'number' is not assignable to type 'string'.
-!!! related TS6500 file.tsx:25:5: The expected type comes from property 'selectHandler' which is declared here on type 'IntrinsicAttributes & InferParamProp'
+!!! related TS6500 file.tsx:27:5: The expected type comes from property 'selectHandler' which is declared here on type 'IntrinsicAttributes & InferParamProp'
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js
index f5f1819eb6089..3f0db4d697b0c 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function ComponentSpecific1(l: {prop: U, "ignore-prop": string}): JSX.Element;
@@ -35,6 +37,7 @@ let i =
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.symbols
index a768dd708b551..1cf1083f637a1 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.symbols
@@ -1,109 +1,111 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function ComponentSpecific1(l: {prop: U, "ignore-prop": string}): JSX.Element;
->ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 0, 31))
->U : Symbol(U, Decl(file.tsx, 2, 36))
->l : Symbol(l, Decl(file.tsx, 2, 39))
->prop : Symbol(prop, Decl(file.tsx, 2, 43))
->U : Symbol(U, Decl(file.tsx, 2, 36))
->"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 2, 51))
+>ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 2, 31))
+>U : Symbol(U, Decl(file.tsx, 4, 36))
+>l : Symbol(l, Decl(file.tsx, 4, 39))
+>prop : Symbol(prop, Decl(file.tsx, 4, 43))
+>U : Symbol(U, Decl(file.tsx, 4, 36))
+>"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 4, 51))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ComponentSpecific2(l: {prop: U}): JSX.Element;
->ComponentSpecific2 : Symbol(ComponentSpecific2, Decl(file.tsx, 2, 89))
->U : Symbol(U, Decl(file.tsx, 3, 36))
->l : Symbol(l, Decl(file.tsx, 3, 39))
->prop : Symbol(prop, Decl(file.tsx, 3, 43))
->U : Symbol(U, Decl(file.tsx, 3, 36))
+>ComponentSpecific2 : Symbol(ComponentSpecific2, Decl(file.tsx, 4, 89))
+>U : Symbol(U, Decl(file.tsx, 5, 36))
+>l : Symbol(l, Decl(file.tsx, 5, 39))
+>prop : Symbol(prop, Decl(file.tsx, 5, 43))
+>U : Symbol(U, Decl(file.tsx, 5, 36))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// Error
function Bar(arg: T) {
->Bar : Symbol(Bar, Decl(file.tsx, 3, 66))
->T : Symbol(T, Decl(file.tsx, 6, 13))
->prop : Symbol(prop, Decl(file.tsx, 6, 24))
->arg : Symbol(arg, Decl(file.tsx, 6, 39))
->T : Symbol(T, Decl(file.tsx, 6, 13))
+>Bar : Symbol(Bar, Decl(file.tsx, 5, 66))
+>T : Symbol(T, Decl(file.tsx, 8, 13))
+>prop : Symbol(prop, Decl(file.tsx, 8, 24))
+>arg : Symbol(arg, Decl(file.tsx, 8, 39))
+>T : Symbol(T, Decl(file.tsx, 8, 13))
let a1 = ;
->a1 : Symbol(a1, Decl(file.tsx, 7, 7))
->ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 0, 31))
->arg : Symbol(arg, Decl(file.tsx, 6, 39))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 7, 41))
+>a1 : Symbol(a1, Decl(file.tsx, 9, 7))
+>ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 2, 31))
+>arg : Symbol(arg, Decl(file.tsx, 8, 39))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 9, 41))
}
// Error
function Baz(arg: T) {
->Baz : Symbol(Baz, Decl(file.tsx, 8, 2))
->T : Symbol(T, Decl(file.tsx, 11, 13))
->arg : Symbol(arg, Decl(file.tsx, 11, 16))
->T : Symbol(T, Decl(file.tsx, 11, 13))
+>Baz : Symbol(Baz, Decl(file.tsx, 10, 2))
+>T : Symbol(T, Decl(file.tsx, 13, 13))
+>arg : Symbol(arg, Decl(file.tsx, 13, 16))
+>T : Symbol(T, Decl(file.tsx, 13, 13))
let a0 =
->a0 : Symbol(a0, Decl(file.tsx, 12, 7))
->ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 0, 31))
->arg : Symbol(arg, Decl(file.tsx, 11, 16))
+>a0 : Symbol(a0, Decl(file.tsx, 14, 7))
+>ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 2, 31))
+>arg : Symbol(arg, Decl(file.tsx, 13, 16))
}
declare function Link(l: {func: (arg: U)=>void}): JSX.Element;
->Link : Symbol(Link, Decl(file.tsx, 13, 1))
->U : Symbol(U, Decl(file.tsx, 15, 22))
->l : Symbol(l, Decl(file.tsx, 15, 25))
->func : Symbol(func, Decl(file.tsx, 15, 29))
->arg : Symbol(arg, Decl(file.tsx, 15, 36))
->U : Symbol(U, Decl(file.tsx, 15, 22))
+>Link : Symbol(Link, Decl(file.tsx, 15, 1))
+>U : Symbol(U, Decl(file.tsx, 17, 22))
+>l : Symbol(l, Decl(file.tsx, 17, 25))
+>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, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// Error
function createLink(func: (a: number, b: string)=>void) {
->createLink : Symbol(createLink, Decl(file.tsx, 15, 65))
->func : Symbol(func, Decl(file.tsx, 18, 20))
->a : Symbol(a, Decl(file.tsx, 18, 27))
->b : Symbol(b, Decl(file.tsx, 18, 37))
+>createLink : Symbol(createLink, Decl(file.tsx, 17, 65))
+>func : Symbol(func, Decl(file.tsx, 20, 20))
+>a : Symbol(a, Decl(file.tsx, 20, 27))
+>b : Symbol(b, Decl(file.tsx, 20, 37))
let o =
->o : Symbol(o, Decl(file.tsx, 19, 7))
->Link : Symbol(Link, Decl(file.tsx, 13, 1))
->func : Symbol(func, Decl(file.tsx, 19, 17))
->func : Symbol(func, Decl(file.tsx, 18, 20))
+>o : Symbol(o, Decl(file.tsx, 21, 7))
+>Link : Symbol(Link, Decl(file.tsx, 15, 1))
+>func : Symbol(func, Decl(file.tsx, 21, 17))
+>func : Symbol(func, Decl(file.tsx, 20, 20))
}
interface InferParamProp {
->InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 20, 1))
->T : Symbol(T, Decl(file.tsx, 22, 25))
+>InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 22, 1))
+>T : Symbol(T, Decl(file.tsx, 24, 25))
values: Array;
->values : Symbol(InferParamProp.values, Decl(file.tsx, 22, 29))
+>values : Symbol(InferParamProp.values, Decl(file.tsx, 24, 29))
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
->T : Symbol(T, Decl(file.tsx, 22, 25))
+>T : Symbol(T, Decl(file.tsx, 24, 25))
selectHandler: (selectedVal: T) => void;
->selectHandler : Symbol(InferParamProp.selectHandler, Decl(file.tsx, 23, 21))
->selectedVal : Symbol(selectedVal, Decl(file.tsx, 24, 20))
->T : Symbol(T, Decl(file.tsx, 22, 25))
+>selectHandler : Symbol(InferParamProp.selectHandler, Decl(file.tsx, 25, 21))
+>selectedVal : Symbol(selectedVal, Decl(file.tsx, 26, 20))
+>T : Symbol(T, Decl(file.tsx, 24, 25))
}
declare function InferParamComponent(attr: InferParamProp): JSX.Element;
->InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 25, 1))
->T : Symbol(T, Decl(file.tsx, 27, 37))
->attr : Symbol(attr, Decl(file.tsx, 27, 40))
->InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 20, 1))
->T : Symbol(T, Decl(file.tsx, 27, 37))
+>InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 27, 1))
+>T : Symbol(T, Decl(file.tsx, 29, 37))
+>attr : Symbol(attr, Decl(file.tsx, 29, 40))
+>InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 22, 1))
+>T : Symbol(T, Decl(file.tsx, 29, 37))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// Error
let i = { }} />;
->i : Symbol(i, Decl(file.tsx, 30, 3))
->InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 25, 1))
->values : Symbol(values, Decl(file.tsx, 30, 28))
->selectHandler : Symbol(selectHandler, Decl(file.tsx, 30, 50))
->val : Symbol(val, Decl(file.tsx, 30, 67))
+>i : Symbol(i, Decl(file.tsx, 32, 3))
+>InferParamComponent : Symbol(InferParamComponent, Decl(file.tsx, 27, 1))
+>values : Symbol(values, Decl(file.tsx, 32, 28))
+>selectHandler : Symbol(selectHandler, Decl(file.tsx, 32, 50))
+>val : Symbol(val, Decl(file.tsx, 32, 67))
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types
index feda5b1af3d83..3d9c873f24cd8 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.errors.txt
index 83d30a9ba4ae0..054144311c0ad 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.errors.txt
@@ -3,6 +3,8 @@ error TS5107: Option 'module=AMD' is deprecated and will stop functioning in Typ
!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file.tsx (0 errors) ====
+ ///
+
import React = require('react')
declare function OverloadComponent(): JSX.Element;
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js
index ea5cf5e566894..ede7d2b73069c 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function OverloadComponent(): JSX.Element;
@@ -26,6 +28,7 @@ function createLink(func: (a: number)=>void) {
}
//// [file.jsx]
+///
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols
index 427cc365a570b..fddad2b80e558 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.symbols
@@ -1,130 +1,132 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
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))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>U : Symbol(U, Decl(file.tsx, 4, 35))
>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))
->U : Symbol(U, Decl(file.tsx, 3, 35))
->attr : Symbol(attr, Decl(file.tsx, 3, 38))
->b : Symbol(b, Decl(file.tsx, 3, 45))
->U : Symbol(U, Decl(file.tsx, 3, 35))
->a : Symbol(a, Decl(file.tsx, 3, 50))
->"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 3, 62))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>U : Symbol(U, Decl(file.tsx, 5, 35))
+>attr : Symbol(attr, Decl(file.tsx, 5, 38))
+>b : Symbol(b, Decl(file.tsx, 5, 45))
+>U : Symbol(U, Decl(file.tsx, 5, 35))
+>a : Symbol(a, Decl(file.tsx, 5, 50))
+>"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 5, 62))
>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))
->T : Symbol(T, Decl(file.tsx, 4, 35))
->U : Symbol(U, Decl(file.tsx, 4, 37))
->attr : Symbol(attr, Decl(file.tsx, 4, 41))
->b : Symbol(b, Decl(file.tsx, 4, 48))
->U : Symbol(U, Decl(file.tsx, 4, 37))
->a : Symbol(a, Decl(file.tsx, 4, 53))
->T : Symbol(T, Decl(file.tsx, 4, 35))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>T : Symbol(T, Decl(file.tsx, 6, 35))
+>U : Symbol(U, Decl(file.tsx, 6, 37))
+>attr : Symbol(attr, Decl(file.tsx, 6, 41))
+>b : Symbol(b, Decl(file.tsx, 6, 48))
+>U : Symbol(U, Decl(file.tsx, 6, 37))
+>a : Symbol(a, Decl(file.tsx, 6, 53))
+>T : Symbol(T, Decl(file.tsx, 6, 35))
>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) {
->Baz : Symbol(Baz, Decl(file.tsx, 4, 74))
->T : Symbol(T, Decl(file.tsx, 7, 13))
->b : Symbol(b, Decl(file.tsx, 7, 24))
->U : Symbol(U, Decl(file.tsx, 7, 35))
->a : Symbol(a, Decl(file.tsx, 7, 47))
->b : Symbol(b, Decl(file.tsx, 7, 58))
->arg1 : Symbol(arg1, Decl(file.tsx, 7, 70))
->T : Symbol(T, Decl(file.tsx, 7, 13))
->arg2 : Symbol(arg2, Decl(file.tsx, 7, 78))
->U : Symbol(U, Decl(file.tsx, 7, 35))
+>Baz : Symbol(Baz, Decl(file.tsx, 6, 74))
+>T : Symbol(T, Decl(file.tsx, 9, 13))
+>b : Symbol(b, Decl(file.tsx, 9, 24))
+>U : Symbol(U, Decl(file.tsx, 9, 35))
+>a : Symbol(a, Decl(file.tsx, 9, 47))
+>b : Symbol(b, Decl(file.tsx, 9, 58))
+>arg1 : Symbol(arg1, Decl(file.tsx, 9, 70))
+>T : Symbol(T, Decl(file.tsx, 9, 13))
+>arg2 : Symbol(arg2, Decl(file.tsx, 9, 78))
+>U : Symbol(U, Decl(file.tsx, 9, 35))
let a0 = ;
->a0 : Symbol(a0, Decl(file.tsx, 8, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
->arg1 : Symbol(arg1, Decl(file.tsx, 7, 70))
->a : Symbol(a, Decl(file.tsx, 8, 41))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 8, 51))
+>a0 : Symbol(a0, Decl(file.tsx, 10, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>arg1 : Symbol(arg1, Decl(file.tsx, 9, 70))
+>a : Symbol(a, Decl(file.tsx, 10, 41))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 10, 51))
let a1 = ;
->a1 : Symbol(a1, Decl(file.tsx, 9, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
->arg2 : Symbol(arg2, Decl(file.tsx, 7, 78))
->ignore-pro : Symbol(ignore-pro, Decl(file.tsx, 9, 41))
+>a1 : Symbol(a1, Decl(file.tsx, 11, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>arg2 : Symbol(arg2, Decl(file.tsx, 9, 78))
+>ignore-pro : Symbol(ignore-pro, Decl(file.tsx, 11, 41))
let a2 = ;
->a2 : Symbol(a2, Decl(file.tsx, 10, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
->arg2 : Symbol(arg2, Decl(file.tsx, 7, 78))
+>a2 : Symbol(a2, Decl(file.tsx, 12, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>arg2 : Symbol(arg2, Decl(file.tsx, 9, 78))
let a3 = ;
->a3 : Symbol(a3, Decl(file.tsx, 11, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
->arg1 : Symbol(arg1, Decl(file.tsx, 7, 70))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 11, 41))
+>a3 : Symbol(a3, Decl(file.tsx, 13, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>arg1 : Symbol(arg1, Decl(file.tsx, 9, 70))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 13, 41))
let a4 = ;
->a4 : Symbol(a4, Decl(file.tsx, 12, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
+>a4 : Symbol(a4, Decl(file.tsx, 14, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
let a5 = ;
->a5 : Symbol(a5, Decl(file.tsx, 13, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
->arg2 : Symbol(arg2, Decl(file.tsx, 7, 78))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 13, 41))
->arg1 : Symbol(arg1, Decl(file.tsx, 7, 70))
+>a5 : Symbol(a5, Decl(file.tsx, 15, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>arg2 : Symbol(arg2, Decl(file.tsx, 9, 78))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 15, 41))
+>arg1 : Symbol(arg1, Decl(file.tsx, 9, 70))
let a6 = ;
->a6 : Symbol(a6, Decl(file.tsx, 14, 7))
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
->arg2 : Symbol(arg2, Decl(file.tsx, 7, 78))
->ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 14, 41))
->arg1 : Symbol(arg1, Decl(file.tsx, 7, 70))
+>a6 : Symbol(a6, Decl(file.tsx, 16, 7))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 101))
+>arg2 : Symbol(arg2, Decl(file.tsx, 9, 78))
+>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 16, 41))
+>arg1 : Symbol(arg1, Decl(file.tsx, 9, 70))
}
declare function Link(l: {func: (arg: U)=>void}): JSX.Element;
->Link : Symbol(Link, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 65))
->U : Symbol(U, Decl(file.tsx, 17, 22))
->l : Symbol(l, Decl(file.tsx, 17, 25))
->func : Symbol(func, Decl(file.tsx, 17, 29))
->arg : Symbol(arg, Decl(file.tsx, 17, 36))
->U : Symbol(U, Decl(file.tsx, 17, 22))
+>Link : Symbol(Link, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 65))
+>U : Symbol(U, Decl(file.tsx, 19, 22))
+>l : Symbol(l, Decl(file.tsx, 19, 25))
+>func : Symbol(func, Decl(file.tsx, 19, 29))
+>arg : Symbol(arg, Decl(file.tsx, 19, 36))
+>U : Symbol(U, Decl(file.tsx, 19, 22))
>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))
->U : Symbol(U, Decl(file.tsx, 18, 22))
->l : Symbol(l, Decl(file.tsx, 18, 25))
->func : Symbol(func, Decl(file.tsx, 18, 29))
->arg1 : Symbol(arg1, Decl(file.tsx, 18, 36))
->U : Symbol(U, Decl(file.tsx, 18, 22))
->arg2 : Symbol(arg2, Decl(file.tsx, 18, 43))
+>Link : Symbol(Link, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 65))
+>U : Symbol(U, Decl(file.tsx, 20, 22))
+>l : Symbol(l, Decl(file.tsx, 20, 25))
+>func : Symbol(func, Decl(file.tsx, 20, 29))
+>arg1 : Symbol(arg1, Decl(file.tsx, 20, 36))
+>U : Symbol(U, Decl(file.tsx, 20, 22))
+>arg2 : Symbol(arg2, Decl(file.tsx, 20, 43))
>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))
->func : Symbol(func, Decl(file.tsx, 19, 20))
->a : Symbol(a, Decl(file.tsx, 19, 27))
+>createLink : Symbol(createLink, Decl(file.tsx, 20, 79))
+>func : Symbol(func, Decl(file.tsx, 21, 20))
+>a : Symbol(a, Decl(file.tsx, 21, 27))
let o =
->o : Symbol(o, Decl(file.tsx, 20, 7))
->Link : Symbol(Link, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 65))
->func : Symbol(func, Decl(file.tsx, 20, 17))
->func : Symbol(func, Decl(file.tsx, 19, 20))
+>o : Symbol(o, Decl(file.tsx, 22, 7))
+>Link : Symbol(Link, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 65))
+>func : Symbol(func, Decl(file.tsx, 22, 17))
+>func : Symbol(func, Decl(file.tsx, 21, 20))
let o1 = {}} />;
->o1 : Symbol(o1, Decl(file.tsx, 21, 7))
->Link : Symbol(Link, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 65))
->func : Symbol(func, Decl(file.tsx, 21, 18))
->a : Symbol(a, Decl(file.tsx, 21, 26))
->b : Symbol(b, Decl(file.tsx, 21, 35))
+>o1 : Symbol(o1, Decl(file.tsx, 23, 7))
+>Link : Symbol(Link, Decl(file.tsx, 17, 1), Decl(file.tsx, 19, 65))
+>func : Symbol(func, Decl(file.tsx, 23, 18))
+>a : Symbol(a, Decl(file.tsx, 23, 26))
+>b : Symbol(b, Decl(file.tsx, 23, 35))
}
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types
index 042f5db5a0ec1..f8f364c96c9c3 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.types
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : typeof React
> : ^^^^^^^^^^^^
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt
index fdd4fa153df6f..b7a52554544e6 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt
@@ -1,4 +1,4 @@
-file.tsx(9,15): error TS2769: No overload matches this call.
+file.tsx(11,15): error TS2769: No overload matches this call.
Overload 1 of 3, '(): Element', gave the following error.
Type '{ a: number; }' is not assignable to type 'IntrinsicAttributes'.
Property 'a' does not exist on type 'IntrinsicAttributes'.
@@ -6,7 +6,7 @@ file.tsx(9,15): error TS2769: No overload matches this call.
Type 'number' is not assignable to type 'string'.
Overload 3 of 3, '(attr: { b: unknown; a: number; }): Element', gave the following error.
Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'.
-file.tsx(10,15): error TS2769: No overload matches this call.
+file.tsx(12,15): error TS2769: No overload matches this call.
Overload 1 of 3, '(): Element', gave the following error.
Type 'T & { "ignore-prop": true; }' has no properties in common with type 'IntrinsicAttributes'.
Overload 2 of 3, '(attr: { b: number; a: string; "ignore-prop": boolean; }): Element', gave the following error.
@@ -18,6 +18,8 @@ file.tsx(10,15): error TS2769: No overload matches this call.
==== file.tsx (2 errors) ====
+ ///
+
import React = require('react')
declare function OverloadComponent(): JSX.Element;
@@ -36,8 +38,8 @@ file.tsx(10,15): error TS2769: No overload matches this call.
!!! error TS2769: Type 'number' is not assignable to type 'string'.
!!! error TS2769: Overload 3 of 3, '(attr: { b: unknown; a: number; }): Element', gave the following error.
!!! error TS2769: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'.
-!!! related TS6500 file.tsx:4:52: The expected type comes from property 'a' which is declared here on type 'IntrinsicAttributes & { b: unknown; a: string; "ignore-prop": boolean; }'
-!!! related TS2728 file.tsx:5:49: 'b' is declared here.
+!!! related TS6500 file.tsx:6:52: The expected type comes from property 'a' which is declared here on type 'IntrinsicAttributes & { b: unknown; a: string; "ignore-prop": boolean; }'
+!!! related TS2728 file.tsx:7:49: 'b' is declared here.
let a2 = // missing a
~~~~~~~~~~~~~~~~~
!!! error TS2769: No overload matches this call.
@@ -49,6 +51,6 @@ file.tsx(10,15): error TS2769: No overload matches this call.
!!! error TS2769: Overload 3 of 3, '(attr: { b: unknown; a: unknown; }): Element', gave the following error.
!!! error TS2769: Type 'T & { "ignore-prop": true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'.
!!! error TS2769: Property 'a' is missing in type '{ b: number; } & { "ignore-prop": true; }' but required in type '{ b: unknown; a: unknown; }'.
-!!! related TS2728 file.tsx:4:52: 'a' is declared here.
-!!! related TS2728 file.tsx:5:55: 'a' is declared here.
+!!! related TS2728 file.tsx:6:52: 'a' is declared here.
+!!! related TS2728 file.tsx:7:55: 'a' is declared here.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js
index 9354b3dad1cfb..1e561774bcbf4 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js
@@ -1,6 +1,8 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx] ////
//// [file.tsx]
+///
+
import React = require('react')
declare function OverloadComponent(): JSX.Element;
@@ -15,6 +17,7 @@ function Baz(arg1: T, a
//// [file.jsx]
"use strict";
+///
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
// Error
diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.symbols
index df279c9333ccf..dc060703fd86b 100644
--- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.symbols
+++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.symbols
@@ -1,62 +1,64 @@
//// [tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx] ////
=== file.tsx ===
+///
+
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))
declare function OverloadComponent(): JSX.Element;
->OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 100))
->U : Symbol(U, Decl(file.tsx, 2, 35))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 100))
+>U : Symbol(U, Decl(file.tsx, 4, 35))
>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, 100))
->U : Symbol(U, Decl(file.tsx, 3, 35))
->attr : Symbol(attr, Decl(file.tsx, 3, 38))
->b : Symbol(b, Decl(file.tsx, 3, 45))
->U : Symbol(U, Decl(file.tsx, 3, 35))
->a : Symbol(a, Decl(file.tsx, 3, 50))
->"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 3, 61))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 100))
+>U : Symbol(U, Decl(file.tsx, 5, 35))
+>attr : Symbol(attr, Decl(file.tsx, 5, 38))
+>b : Symbol(b, Decl(file.tsx, 5, 45))
+>U : Symbol(U, Decl(file.tsx, 5, 35))
+>a : Symbol(a, Decl(file.tsx, 5, 50))
+>"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 5, 61))
>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, 100))
->T : Symbol(T, Decl(file.tsx, 4, 35))
->U : Symbol(U, Decl(file.tsx, 4, 37))
->attr : Symbol(attr, Decl(file.tsx, 4, 41))
->b : Symbol(b, Decl(file.tsx, 4, 48))
->U : Symbol(U, Decl(file.tsx, 4, 37))
->a : Symbol(a, Decl(file.tsx, 4, 53))
->T : Symbol(T, Decl(file.tsx, 4, 35))
+>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 2, 31), Decl(file.tsx, 4, 53), Decl(file.tsx, 5, 100))
+>T : Symbol(T, Decl(file.tsx, 6, 35))
+>U : Symbol(U, Decl(file.tsx, 6, 37))
+>attr : Symbol(attr, Decl(file.tsx, 6, 41))
+>b : Symbol(b, Decl(file.tsx, 6, 48))
+>U : Symbol(U, Decl(file.tsx, 6, 37))
+>a : Symbol(a, Decl(file.tsx, 6, 53))
+>T : Symbol(T, Decl(file.tsx, 6, 35))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// Error
function Baz