From 2fd5667a040427d8df0322ad77a8e76e9701522f Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Thu, 19 Jan 2017 09:46:43 -0800 Subject: [PATCH] Update baselines --- .../reference/jsxFactoryIdentifier.symbols | 4 +- .../reference/jsxFactoryIdentifier.types | 4 +- .../reference/jsxFactoryQualifiedName.symbols | 4 +- .../reference/jsxFactoryQualifiedName.types | 4 +- .../tsxDefaultAttributesResolution1.js | 17 ++++--- .../tsxDefaultAttributesResolution2.js | 17 ++++--- .../tsxDefaultAttributesResolution3.js | 17 ++++--- tests/baselines/reference/tsxEmit1.types | 6 +-- tests/baselines/reference/tsxReactEmit1.types | 6 +-- tests/baselines/reference/tsxReactEmit5.types | 1 + .../tsxSpreadAttributesResolution1.js | 17 ++++--- .../tsxSpreadAttributesResolution10.js | 17 ++++--- .../tsxSpreadAttributesResolution11.js | 17 ++++--- .../tsxSpreadAttributesResolution12.js | 17 ++++--- .../tsxSpreadAttributesResolution2.js | 17 ++++--- .../tsxSpreadAttributesResolution3.js | 17 ++++--- .../tsxSpreadAttributesResolution4.js | 17 ++++--- .../tsxSpreadAttributesResolution5.js | 17 ++++--- .../tsxSpreadAttributesResolution6.js | 17 ++++--- .../tsxSpreadAttributesResolution7.js | 17 ++++--- .../tsxSpreadAttributesResolution8.js | 17 ++++--- .../tsxSpreadAttributesResolution9.js | 17 ++++--- .../reference/tsxSpreadChildren.symbols | 4 +- .../reference/tsxSpreadChildren.types | 4 +- ...xStatelessFunctionComponentOverload2.types | 2 +- ...xStatelessFunctionComponentOverload3.types | 8 ++-- ...elessFunctionComponentOverload5.errors.txt | 46 ++++++++----------- .../tsxStatelessFunctionComponentOverload5.js | 20 ++++---- .../tsxStatelessFunctionComponentOverload6.js | 4 +- ...tatelessFunctionComponentOverload6.symbols | 5 +- ...xStatelessFunctionComponentOverload6.types | 9 ++-- ...tsxStatelessFunctionComponentOverload5.tsx | 10 ++-- ...tsxStatelessFunctionComponentOverload6.tsx | 2 +- .../tsxGoToDefinitionStatelessFunction1.ts | 2 +- .../tsxGoToDefinitionStatelessFunction2.ts | 6 +-- 35 files changed, 237 insertions(+), 169 deletions(-) diff --git a/tests/baselines/reference/jsxFactoryIdentifier.symbols b/tests/baselines/reference/jsxFactoryIdentifier.symbols index 0d0f1e80490..b6d6856bccb 100644 --- a/tests/baselines/reference/jsxFactoryIdentifier.symbols +++ b/tests/baselines/reference/jsxFactoryIdentifier.symbols @@ -107,12 +107,12 @@ class A { return [ , >meta : Symbol(unknown) ->content : Symbol(unknown) +>content : Symbol(content, Decl(test.tsx, 11, 8)) >meta : Symbol(unknown) >meta : Symbol(unknown) ->content : Symbol(unknown) +>content : Symbol(content, Decl(test.tsx, 12, 8)) >c.a!.b : Symbol(b, Decl(test.tsx, 3, 6)) >c.a : Symbol(a, Decl(test.tsx, 2, 8)) >c : Symbol(c, Decl(test.tsx, 2, 3)) diff --git a/tests/baselines/reference/jsxFactoryIdentifier.types b/tests/baselines/reference/jsxFactoryIdentifier.types index c946c90559d..cb44bb0ac0f 100644 --- a/tests/baselines/reference/jsxFactoryIdentifier.types +++ b/tests/baselines/reference/jsxFactoryIdentifier.types @@ -120,13 +120,13 @@ class A { , > : any >meta : any ->content : any +>content : string >meta : any > : any >meta : any ->content : any +>content : string >c.a!.b : string >c.a! : { b: string; } >c.a : { b: string; } diff --git a/tests/baselines/reference/jsxFactoryQualifiedName.symbols b/tests/baselines/reference/jsxFactoryQualifiedName.symbols index 16cd35d1ca3..f2579903d3e 100644 --- a/tests/baselines/reference/jsxFactoryQualifiedName.symbols +++ b/tests/baselines/reference/jsxFactoryQualifiedName.symbols @@ -101,12 +101,12 @@ class A { return [ , >meta : Symbol(unknown) ->content : Symbol(unknown) +>content : Symbol(content, Decl(test.tsx, 11, 8)) >meta : Symbol(unknown) >meta : Symbol(unknown) ->content : Symbol(unknown) +>content : Symbol(content, Decl(test.tsx, 12, 8)) >c.a!.b : Symbol(b, Decl(test.tsx, 3, 6)) >c.a : Symbol(a, Decl(test.tsx, 2, 8)) >c : Symbol(c, Decl(test.tsx, 2, 3)) diff --git a/tests/baselines/reference/jsxFactoryQualifiedName.types b/tests/baselines/reference/jsxFactoryQualifiedName.types index 663ba4b5bfc..724aed319ec 100644 --- a/tests/baselines/reference/jsxFactoryQualifiedName.types +++ b/tests/baselines/reference/jsxFactoryQualifiedName.types @@ -114,13 +114,13 @@ class A { , > : any >meta : any ->content : any +>content : string >meta : any > : any >meta : any ->content : any +>content : string >c.a!.b : string >c.a! : { b: string; } >c.a : { b: string; } diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution1.js b/tests/baselines/reference/tsxDefaultAttributesResolution1.js index 1bb12e56e98..209f6336bdf 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution1.js +++ b/tests/baselines/reference/tsxDefaultAttributesResolution1.js @@ -16,16 +16,21 @@ let p = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution2.js b/tests/baselines/reference/tsxDefaultAttributesResolution2.js index d94b592d134..63fd59d8726 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution2.js +++ b/tests/baselines/reference/tsxDefaultAttributesResolution2.js @@ -16,16 +16,21 @@ let p = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.js b/tests/baselines/reference/tsxDefaultAttributesResolution3.js index db518997c57..41c948632c3 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution3.js +++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.js @@ -16,16 +16,21 @@ let p = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxEmit1.types b/tests/baselines/reference/tsxEmit1.types index c62c1f1a961..e56ab8dfa04 100644 --- a/tests/baselines/reference/tsxEmit1.types +++ b/tests/baselines/reference/tsxEmit1.types @@ -60,8 +60,8 @@ var selfClosed7 =
; >selfClosed7 : JSX.Element >
: JSX.Element >div : any ->x : undefined ->p : undefined +>x : any +>p : any >y : string var openClosed1 =
; @@ -82,7 +82,7 @@ var openClosed3 =
{p}
; >
{p}
: JSX.Element >div : any >n : string ->p : undefined +>p : any >div : any var openClosed4 =
{p < p}
; diff --git a/tests/baselines/reference/tsxReactEmit1.types b/tests/baselines/reference/tsxReactEmit1.types index cfc6a3942c2..49dbc0c9fd9 100644 --- a/tests/baselines/reference/tsxReactEmit1.types +++ b/tests/baselines/reference/tsxReactEmit1.types @@ -62,8 +62,8 @@ var selfClosed7 =
; >selfClosed7 : JSX.Element >
: JSX.Element >div : any ->x : undefined ->p : undefined +>x : any +>p : any >y : string >b : true @@ -85,7 +85,7 @@ var openClosed3 =
{p}
; >
{p}
: JSX.Element >div : any >n : string ->p : undefined +>p : any >div : any var openClosed4 =
{p < p}
; diff --git a/tests/baselines/reference/tsxReactEmit5.types b/tests/baselines/reference/tsxReactEmit5.types index 8f3a4bed956..fb5e201ca36 100644 --- a/tests/baselines/reference/tsxReactEmit5.types +++ b/tests/baselines/reference/tsxReactEmit5.types @@ -34,3 +34,4 @@ var spread1 =
; >x : string >foo : any >y : string + diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution1.js b/tests/baselines/reference/tsxSpreadAttributesResolution1.js index 538bf316743..f65293b2bf8 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution1.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution1.js @@ -16,16 +16,21 @@ let y = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.js b/tests/baselines/reference/tsxSpreadAttributesResolution10.js index a460af219af..f475c7277dc 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution10.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.js @@ -26,16 +26,21 @@ let y3 = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Opt = (function (_super) { __extends(Opt, _super); function Opt() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Opt.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.js b/tests/baselines/reference/tsxSpreadAttributesResolution11.js index 5d50ef9289e..0327f0a1743 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution11.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.js @@ -34,11 +34,16 @@ let x5 = //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var obj = {}; var obj1 = { @@ -51,7 +56,7 @@ var obj3 = { var OverWriteAttr = (function (_super) { __extends(OverWriteAttr, _super); function OverWriteAttr() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } OverWriteAttr.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.js b/tests/baselines/reference/tsxSpreadAttributesResolution12.js index f7655003f40..a970df473f8 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution12.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.js @@ -33,11 +33,16 @@ let x2 = //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var obj = {}; var obj1 = { @@ -50,7 +55,7 @@ var obj3 = { var OverWriteAttr = (function (_super) { __extends(OverWriteAttr, _super); function OverWriteAttr() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } OverWriteAttr.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.js b/tests/baselines/reference/tsxSpreadAttributesResolution2.js index 98e475d59af..1e9a275edf8 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution2.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.js @@ -22,16 +22,21 @@ let z = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.js b/tests/baselines/reference/tsxSpreadAttributesResolution3.js index 18ccc054b27..f7941c8fb65 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution3.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.js @@ -24,16 +24,21 @@ let y = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.js b/tests/baselines/reference/tsxSpreadAttributesResolution4.js index e548e8863bf..4d9950b473a 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution4.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.js @@ -23,16 +23,21 @@ let p = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.js b/tests/baselines/reference/tsxSpreadAttributesResolution5.js index 8208b2d9dc7..d1c38161b1a 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution5.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.js @@ -23,16 +23,21 @@ let p = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); function Poisoned() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Poisoned.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.js b/tests/baselines/reference/tsxSpreadAttributesResolution6.js index 0b4e50793db..04fb196dc7f 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.js @@ -20,16 +20,21 @@ const textProps: TextProps = { //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var TextComponent = (function (_super) { __extends(TextComponent, _super); function TextComponent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } TextComponent.prototype.render = function () { return Some Text..; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.js b/tests/baselines/reference/tsxSpreadAttributesResolution7.js index 47ee5ef15ed..5c5bd2f288a 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution7.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.js @@ -27,16 +27,21 @@ let y2 = //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var TextComponent = (function (_super) { __extends(TextComponent, _super); function TextComponent() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } TextComponent.prototype.render = function () { return Some Text..; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.js b/tests/baselines/reference/tsxSpreadAttributesResolution8.js index 188c89fb21d..8c67064c7d9 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution8.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.js @@ -29,11 +29,16 @@ let x1 = //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var obj = {}; var obj1 = { @@ -46,7 +51,7 @@ var obj3 = { var OverWriteAttr = (function (_super) { __extends(OverWriteAttr, _super); function OverWriteAttr() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } OverWriteAttr.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution9.js b/tests/baselines/reference/tsxSpreadAttributesResolution9.js index 1ef5d081753..116f2c02f78 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution9.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution9.js @@ -27,16 +27,21 @@ let y3 = ; //// [file.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Opt = (function (_super) { __extends(Opt, _super); function Opt() { - return _super.apply(this, arguments) || this; + return _super !== null && _super.apply(this, arguments) || this; } Opt.prototype.render = function () { return
Hello
; diff --git a/tests/baselines/reference/tsxSpreadChildren.symbols b/tests/baselines/reference/tsxSpreadChildren.symbols index 6e726e93217..b2631c70fd9 100644 --- a/tests/baselines/reference/tsxSpreadChildren.symbols +++ b/tests/baselines/reference/tsxSpreadChildren.symbols @@ -64,11 +64,11 @@ function TodoList({ todos }: TodoListProps) { >map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 21, 22)) >Todo : Symbol(Todo, Decl(tsxSpreadChildren.tsx, 15, 1)) ->key : Symbol(key, Decl(tsxSpreadChildren.tsx, 16, 21)) +>key : Symbol(key, Decl(tsxSpreadChildren.tsx, 21, 35)) >todo.id : Symbol(TodoProp.id, Decl(tsxSpreadChildren.tsx, 9, 20)) >todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 21, 22)) >id : Symbol(TodoProp.id, Decl(tsxSpreadChildren.tsx, 9, 20)) ->todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 16, 34)) +>todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 21, 49)) >todo.todo : Symbol(TodoProp.todo, Decl(tsxSpreadChildren.tsx, 10, 15)) >todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 21, 22)) >todo : Symbol(TodoProp.todo, Decl(tsxSpreadChildren.tsx, 10, 15)) diff --git a/tests/baselines/reference/tsxSpreadChildren.types b/tests/baselines/reference/tsxSpreadChildren.types index fbf76d0679d..1317499ff45 100644 --- a/tests/baselines/reference/tsxSpreadChildren.types +++ b/tests/baselines/reference/tsxSpreadChildren.types @@ -71,11 +71,11 @@ function TodoList({ todos }: TodoListProps) { >todo : TodoProp > : JSX.Element >Todo : (prop: { key: number; todo: string; }) => JSX.Element ->key : any +>key : number >todo.id : number >todo : TodoProp >id : number ->todo : any +>todo : string >todo.todo : string >todo : TodoProp >todo : string diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types index 3736f3b9991..3a8a0fdf256 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.types @@ -105,7 +105,7 @@ const c7 = ; // No error. should pick s >c7 : JSX.Element > : JSX.Element >OneThing : { (): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; } ->defaultObj : undefined +>defaultObj : any >yy : true >obj : { yy: number; yy1: string; } diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types index ce3e5e7abb6..77d763d97ab 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload3.types @@ -43,7 +43,7 @@ const two3 = ; // it is just any so we allow i >two3 : JSX.Element > : JSX.Element >ZeroThingOrTwoThing : { (): JSX.Element; (l: { yy: number; yy1: string; }, context: Context): JSX.Element; } ->obj2 : undefined +>obj2 : any const two4 = ; // it is just any so we allow it to pass through >two4 : JSX.Element @@ -51,13 +51,13 @@ const two4 = ; // it is just any so >ZeroThingOrTwoThing : { (): JSX.Element; (l: { yy: number; yy1: string; }, context: Context): JSX.Element; } >yy : number >1000 : 1000 ->obj2 : undefined +>obj2 : any const two5 = ; // it is just any so we allow it to pass through >two5 : JSX.Element > : JSX.Element >ZeroThingOrTwoThing : { (): JSX.Element; (l: { yy: number; yy1: string; }, context: Context): JSX.Element; } ->obj2 : undefined +>obj2 : any >yy : number >1000 : 1000 @@ -105,7 +105,7 @@ const three3 = ; // it is just any so we allow >three3 : JSX.Element > : JSX.Element >ThreeThing : { (l: { y1: string; }): JSX.Element; (l: { y2: string; }): JSX.Element; (l: { yy: number; yy1: string; }, context: Context, updater: any): JSX.Element; } ->obj2 : undefined +>obj2 : any >y2 : number >10 : 10 diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt index b3d954baa84..807dfa78ebc 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt @@ -6,15 +6,12 @@ tests/cases/conformance/jsx/file.tsx(51,24): error TS2322: Type '{ onClick: () = Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. tests/cases/conformance/jsx/file.tsx(52,24): error TS2322: Type '{ onClick: (k: any) => void; to: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. -tests/cases/conformance/jsx/file.tsx(54,24): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & HyphenProps'. - Type '{}' is not assignable to type 'HyphenProps'. - Property '"data-format"' is missing in type '{}'. -tests/cases/conformance/jsx/file.tsx(55,24): error TS2322: Type '{ children: 10; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. - Type '{ children: 10; }' is not assignable to type 'HyphenProps'. - Property '"data-format"' is missing in type '{ children: 10; }'. -tests/cases/conformance/jsx/file.tsx(56,24): error TS2322: Type '{ children: "hello"; className: true; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. - Type '{ children: "hello"; className: true; }' is not assignable to type 'HyphenProps'. - Property '"data-format"' is missing in type '{ children: "hello"; className: true; }'. +tests/cases/conformance/jsx/file.tsx(54,24): error TS2322: Type '{ to: string; onClick(e: any): void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. + Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'. +tests/cases/conformance/jsx/file.tsx(55,24): error TS2322: Type '{ children: 10; onClick(e: any): void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. + Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. +tests/cases/conformance/jsx/file.tsx(56,24): error TS2322: Type '{ children: "hello"; className: true; onClick(e: any): void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. + Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. tests/cases/conformance/jsx/file.tsx(57,24): error TS2322: Type '{ data-format: true; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. Type '{ data-format: true; }' is not assignable to type 'HyphenProps'. Types of property '"data-format"' are incompatible. @@ -86,23 +83,20 @@ tests/cases/conformance/jsx/file.tsx(57,24): error TS2322: Type '{ data-format: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ onClick: (k: any) => void; to: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. !!! error TS2322: Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. - const b4 = ; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed - const b5 = ; // Spread doesn't retain method declaration - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & HyphenProps'. -!!! error TS2322: Type '{}' is not assignable to type 'HyphenProps'. -!!! error TS2322: Property '"data-format"' is missing in type '{}'. - const b6 = ; // incorrect type for optional attribute - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ children: 10; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. -!!! error TS2322: Type '{ children: 10; }' is not assignable to type 'HyphenProps'. -!!! error TS2322: Property '"data-format"' is missing in type '{ children: 10; }'. - const b7 = ; // incorrect type for optional attribute - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ children: "hello"; className: true; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. -!!! error TS2322: Type '{ children: "hello"; className: true; }' is not assignable to type 'HyphenProps'. -!!! error TS2322: Property '"data-format"' is missing in type '{ children: "hello"; className: true; }'. - const b8 = ; // incorrect type for specified hyphanted name + const b4 = ; // Should error because Incorrect type; but attributes are any so everything is allowed + const b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ to: string; onClick(e: any): void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. +!!! error TS2322: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'. + const b6 = ; // incorrect type for optional attribute + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ children: 10; onClick(e: any): void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. +!!! error TS2322: Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. + const b7 = ; // incorrect type for optional attribute + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ children: "hello"; className: true; onClick(e: any): void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. +!!! error TS2322: Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'. + const b8 = ; // incorrect type for specified hyphanated name ~~~~~~~~~~~ !!! error TS2322: Type '{ data-format: true; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. !!! error TS2322: Type '{ data-format: true; }' is not assignable to type 'HyphenProps'. diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js index 21cae8eb395..8e488869224 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js @@ -51,11 +51,11 @@ const b0 = {}}>GO; // ex const b1 = {}} {...obj0}>Hello world; // extra property; const b2 = ; // extra property const b3 = {}}} />; // extra property -const b4 = ; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed -const b5 = ; // Spread doesn't retain method declaration -const b6 = ; // incorrect type for optional attribute -const b7 = ; // incorrect type for optional attribute -const b8 = ; // incorrect type for specified hyphanted name +const b4 = ; // Should error because Incorrect type; but attributes are any so everything is allowed +const b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes +const b6 = ; // incorrect type for optional attribute +const b7 = ; // incorrect type for optional attribute +const b8 = ; // incorrect type for specified hyphanated name //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { @@ -84,9 +84,9 @@ define(["require", "exports", "react"], function (require, exports, React) { var b1 = Hello world; // extra property; var b2 = ; // extra property var b3 = ; // extra property - var b4 = ; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed - var b5 = ; // Spread doesn't retain method declaration - var b6 = ; // incorrect type for optional attribute - var b7 = ; // incorrect type for optional attribute - var b8 = ; // incorrect type for specified hyphanted name + var b4 = ; // Should error because Incorrect type; but attributes are any so everything is allowed + var b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes + var b6 = ; // incorrect type for optional attribute + var b7 = ; // incorrect type for optional attribute + var b8 = ; // incorrect type for specified hyphanated name }); diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js index 071a7d05347..cabe9dc9ebf 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js @@ -49,7 +49,7 @@ const b4 = ; // any; just pick the first overload const b5 = ; // should pick the second overload const b6 = ; const b7 = { console.log("hi") }}} />; -const b8 = ; // OK; method declaration get discarded +const b8 = ; // OK; method declaration get retained (See GitHub #13365) const b9 = GO; const b10 = GO; const b11 = {}} className="hello" data-format>Hello world; @@ -86,7 +86,7 @@ define(["require", "exports", "react"], function (require, exports, React) { var b5 = ; // should pick the second overload var b6 = ; var b7 = ; - var b8 = ; // OK; method declaration get discarded + var b8 = ; // OK; method declaration get retained (See GitHub #13365) var b9 = GO; var b10 = GO; var b11 = Hello world; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols index 308752e1c21..681fdfad594 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.symbols @@ -155,11 +155,10 @@ const b7 = { console.log("hi") }}} />; >console : Symbol(console, Decl(lib.d.ts, --, --)) >log : Symbol(Console.log, Decl(lib.d.ts, --, --)) -const b8 = ; // OK; method declaration get discarded +const b8 = ; // OK; method declaration get retained (See GitHub #13365) >b8 : Symbol(b8, Decl(file.tsx, 50, 5)) >MainButton : Symbol(MainButton, Decl(file.tsx, 27, 1), Decl(file.tsx, 29, 66), Decl(file.tsx, 30, 62), Decl(file.tsx, 31, 66)) ->obj : Symbol(obj, Decl(file.tsx, 20, 3)) ->onClick : Symbol(onClick, Decl(file.tsx, 50, 37)) +>onClick : Symbol(onClick, Decl(file.tsx, 50, 28)) const b9 = GO; >b9 : Symbol(b9, Decl(file.tsx, 51, 5)) diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types index 296619e2051..6e200eb75f6 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.types @@ -156,13 +156,13 @@ const b4 = ; // any; just pick the first overload >b4 : JSX.Element > : JSX.Element >MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; (hyphenProps: HyphenProps): JSX.Element; } ->obj1 : undefined +>obj1 : any const b5 = ; // should pick the second overload >b5 : JSX.Element > : JSX.Element >MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; (hyphenProps: HyphenProps): JSX.Element; } ->obj1 : undefined +>obj1 : any >to : string const b6 = ; @@ -184,11 +184,10 @@ const b7 = { console.log("hi") }}} />; >log : (message?: any, ...optionalParams: any[]) => void >"hi" : "hi" -const b8 = ; // OK; method declaration get discarded +const b8 = ; // OK; method declaration get retained (See GitHub #13365) >b8 : JSX.Element -> : JSX.Element +> : JSX.Element >MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; (hyphenProps: HyphenProps): JSX.Element; } ->obj : { children: string; to: string; } >{onClick() {}} : { onClick(): void; } >onClick : () => void diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx index 8821d0adcce..d3fd7f2ef0b 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx @@ -55,8 +55,8 @@ const b0 = {}}>GO; // ex const b1 = {}} {...obj0}>Hello world; // extra property; const b2 = ; // extra property const b3 = {}}} />; // extra property -const b4 = ; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed -const b5 = ; // Spread doesn't retain method declaration -const b6 = ; // incorrect type for optional attribute -const b7 = ; // incorrect type for optional attribute -const b8 = ; // incorrect type for specified hyphanted name \ No newline at end of file +const b4 = ; // Should error because Incorrect type; but attributes are any so everything is allowed +const b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes +const b6 = ; // incorrect type for optional attribute +const b7 = ; // incorrect type for optional attribute +const b8 = ; // incorrect type for specified hyphanated name \ No newline at end of file diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx index 2bd372eaa0d..b70d48dd7fd 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx @@ -53,7 +53,7 @@ const b4 = ; // any; just pick the first overload const b5 = ; // should pick the second overload const b6 = ; const b7 = { console.log("hi") }}} />; -const b8 = ; // OK; method declaration get discarded +const b8 = ; // OK; method declaration get retained (See GitHub #13365) const b9 = GO; const b10 = GO; const b11 = {}} className="hello" data-format>Hello world; diff --git a/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction1.ts b/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction1.ts index d715dc5b204..d620b3585af 100644 --- a/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction1.ts +++ b/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction1.ts @@ -15,7 +15,7 @@ //// propString: "hell" //// /*pt2*/optional?: boolean //// } -//// /*opt*/declare function Opt(attributes: OptionPropBag): JSX.Element; +//// declare function /*opt*/Opt(attributes: OptionPropBag): JSX.Element; //// let opt = ; //// let opt1 = ; //// let opt2 = ; diff --git a/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction2.ts b/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction2.ts index 77eb0864828..946cc01cc14 100644 --- a/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction2.ts +++ b/tests/cases/fourslash/tsxGoToDefinitionStatelessFunction2.ts @@ -20,9 +20,9 @@ //// interface LinkProps extends ClickableProps { //// goTo: string; //// } -//// /*firstSource*/declare function MainButton(buttonProps: ButtonProps): JSX.Element; -//// /*secondSource*/declare function MainButton(linkProps: LinkProps): JSX.Element; -//// /*thirdSource*/declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; +//// declare function /*firstSource*/MainButton(buttonProps: ButtonProps): JSX.Element; +//// declare function /*secondSource*/MainButton(linkProps: LinkProps): JSX.Element; +//// declare function /*thirdSource*/MainButton(props: ButtonProps | LinkProps): JSX.Element; //// let opt =
; //// let opt =
; //// let opt =
{}} />;