Update baselines

This commit is contained in:
Kanchalai Tanglertsampan 2017-01-19 09:46:43 -08:00
parent a39f9ef1a7
commit 2fd5667a04
35 changed files with 237 additions and 169 deletions

View file

@ -107,12 +107,12 @@ class A {
return [
<meta content="helloworld"></meta>,
>meta : Symbol(unknown)
>content : Symbol(unknown)
>content : Symbol(content, Decl(test.tsx, 11, 8))
>meta : Symbol(unknown)
<meta content={c.a!.b}></meta>
>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))

View file

@ -120,13 +120,13 @@ class A {
<meta content="helloworld"></meta>,
><meta content="helloworld"></meta> : any
>meta : any
>content : any
>content : string
>meta : any
<meta content={c.a!.b}></meta>
><meta content={c.a!.b}></meta> : any
>meta : any
>content : any
>content : string
>c.a!.b : string
>c.a! : { b: string; }
>c.a : { b: string; }

View file

@ -101,12 +101,12 @@ class A {
return [
<meta content="helloworld"></meta>,
>meta : Symbol(unknown)
>content : Symbol(unknown)
>content : Symbol(content, Decl(test.tsx, 11, 8))
>meta : Symbol(unknown)
<meta content={c.a!.b}></meta>
>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))

View file

@ -114,13 +114,13 @@ class A {
<meta content="helloworld"></meta>,
><meta content="helloworld"></meta> : any
>meta : any
>content : any
>content : string
>meta : any
<meta content={c.a!.b}></meta>
><meta content={c.a!.b}></meta> : any
>meta : any
>content : any
>content : string
>c.a!.b : string
>c.a! : { b: string; }
>c.a : { b: string; }

View file

@ -16,16 +16,21 @@ let p = <Poisoned x/>;
//// [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 <div>Hello</div>;

View file

@ -16,16 +16,21 @@ let p = <Poisoned x/>;
//// [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 <div>Hello</div>;

View file

@ -16,16 +16,21 @@ let p = <Poisoned x/>;
//// [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 <div>Hello</div>;

View file

@ -60,8 +60,8 @@ var selfClosed7 = <div x={p} y='p' />;
>selfClosed7 : JSX.Element
><div x={p} y='p' /> : JSX.Element
>div : any
>x : undefined
>p : undefined
>x : any
>p : any
>y : string
var openClosed1 = <div></div>;
@ -82,7 +82,7 @@ var openClosed3 = <div n='m'>{p}</div>;
><div n='m'>{p}</div> : JSX.Element
>div : any
>n : string
>p : undefined
>p : any
>div : any
var openClosed4 = <div n='m'>{p < p}</div>;

View file

@ -62,8 +62,8 @@ var selfClosed7 = <div x={p} y='p' b />;
>selfClosed7 : JSX.Element
><div x={p} y='p' b /> : JSX.Element
>div : any
>x : undefined
>p : undefined
>x : any
>p : any
>y : string
>b : true
@ -85,7 +85,7 @@ var openClosed3 = <div n='m'>{p}</div>;
><div n='m'>{p}</div> : JSX.Element
>div : any
>n : string
>p : undefined
>p : any
>div : any
var openClosed4 = <div n='m'>{p < p}</div>;

View file

@ -34,3 +34,4 @@ var spread1 = <div x='' {...foo} y='' />;
>x : string
>foo : any
>y : string

View file

@ -16,16 +16,21 @@ let y = <Poisoned />;
//// [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 <div>Hello</div>;

View file

@ -26,16 +26,21 @@ let y3 = <Opt x />;
//// [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 <div>Hello</div>;

View file

@ -34,11 +34,16 @@ let x5 = <OverWriteAttr {...anyobj} />
//// [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 <div>Hello</div>;

View file

@ -33,11 +33,16 @@ let x2 = <OverWriteAttr {...anyobj} x={3} />
//// [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 <div>Hello</div>;

View file

@ -22,16 +22,21 @@ let z = <Poisoned x 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 <div>Hello</div>;

View file

@ -24,16 +24,21 @@ let y = <Poisoned x="hi" y={2} />;
//// [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 <div>Hello</div>;

View file

@ -23,16 +23,21 @@ let p = <Poisoned {...obj} />;
//// [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 <div>Hello</div>;

View file

@ -23,16 +23,21 @@ let p = <Poisoned {...obj} />;
//// [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 <div>Hello</div>;

View file

@ -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 <span>Some Text..</span>;

View file

@ -27,16 +27,21 @@ let y2 = <TextComponent {...textPropsTrue} />
//// [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 <span>Some Text..</span>;

View file

@ -29,11 +29,16 @@ let x1 = <OverWriteAttr {...obj1} {...obj3} />
//// [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 <div>Hello</div>;

View file

@ -27,16 +27,21 @@ let y3 = <Opt x={2} />;
//// [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 <div>Hello</div>;

View file

@ -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))

View file

@ -71,11 +71,11 @@ function TodoList({ todos }: TodoListProps) {
>todo : TodoProp
><Todo key={todo.id} todo={todo.todo}/> : 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

View file

@ -105,7 +105,7 @@ const c7 = <OneThing {...defaultObj} yy {...obj} />; // No error. should pick s
>c7 : JSX.Element
><OneThing {...defaultObj} yy {...obj} /> : JSX.Element
>OneThing : { (): JSX.Element; (l: { yy: number; yy1: string; }): JSX.Element; }
>defaultObj : undefined
>defaultObj : any
>yy : true
>obj : { yy: number; yy1: string; }

View file

@ -43,7 +43,7 @@ const two3 = <ZeroThingOrTwoThing {...obj2} />; // it is just any so we allow i
>two3 : JSX.Element
><ZeroThingOrTwoThing {...obj2} /> : JSX.Element
>ZeroThingOrTwoThing : { (): JSX.Element; (l: { yy: number; yy1: string; }, context: Context): JSX.Element; }
>obj2 : undefined
>obj2 : any
const two4 = <ZeroThingOrTwoThing yy={1000} {...obj2} />; // it is just any so we allow it to pass through
>two4 : JSX.Element
@ -51,13 +51,13 @@ const two4 = <ZeroThingOrTwoThing yy={1000} {...obj2} />; // 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 = <ZeroThingOrTwoThing {...obj2} yy={1000} />; // it is just any so we allow it to pass through
>two5 : JSX.Element
><ZeroThingOrTwoThing {...obj2} yy={1000} /> : 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 = <ThreeThing {...obj2} y2={10} />; // it is just any so we allow
>three3 : JSX.Element
><ThreeThing {...obj2} y2={10} /> : 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

View file

@ -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 = <MainButton {...obj3} to />; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed
const b5 = <MainButton {...{ onclick(){} }} />; // 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 = <MainButton {...{ onclick(){} }} children={10} />; // 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 = <MainButton {...{ onclick(){} }} children="hello" className />; // 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 = <MainButton data-format />; // incorrect type for specified hyphanted name
const b4 = <MainButton {...obj3} to />; // Should error because Incorrect type; but attributes are any so everything is allowed
const b5 = <MainButton {...{ onClick(e: any) { } }} {...obj0} />; // 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 = <MainButton {...{ onClick(e: any){} }} children={10} />; // 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 = <MainButton {...{ onClick(e: any){} }} children="hello" className />; // 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 = <MainButton data-format />; // 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'.

View file

@ -51,11 +51,11 @@ const b0 = <MainButton to='/some/path' onClick={(e)=>{}}>GO</MainButton>; // ex
const b1 = <MainButton onClick={(e: any)=> {}} {...obj0}>Hello world</MainButton>; // extra property;
const b2 = <MainButton {...{to: "10000"}} {...obj2} />; // extra property
const b3 = <MainButton {...{to: "10000"}} {...{onClick: (k) => {}}} />; // extra property
const b4 = <MainButton {...obj3} to />; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed
const b5 = <MainButton {...{ onclick(){} }} />; // Spread doesn't retain method declaration
const b6 = <MainButton {...{ onclick(){} }} children={10} />; // incorrect type for optional attribute
const b7 = <MainButton {...{ onclick(){} }} children="hello" className />; // incorrect type for optional attribute
const b8 = <MainButton data-format />; // incorrect type for specified hyphanted name
const b4 = <MainButton {...obj3} to />; // Should error because Incorrect type; but attributes are any so everything is allowed
const b5 = <MainButton {...{ onClick(e: any) { } }} {...obj0} />; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes
const b6 = <MainButton {...{ onClick(e: any){} }} children={10} />; // incorrect type for optional attribute
const b7 = <MainButton {...{ onClick(e: any){} }} children="hello" className />; // incorrect type for optional attribute
const b8 = <MainButton data-format />; // 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 = <MainButton onClick={function (e) { }} {...obj0}>Hello world</MainButton>; // extra property;
var b2 = <MainButton {...{ to: "10000" }} {...obj2}/>; // extra property
var b3 = <MainButton {...{ to: "10000" }} {...{ onClick: function (k) { } }}/>; // extra property
var b4 = <MainButton {...obj3} to/>; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed
var b5 = <MainButton {...{ onclick: function () { } }}/>; // Spread doesn't retain method declaration
var b6 = <MainButton {...{ onclick: function () { } }} children={10}/>; // incorrect type for optional attribute
var b7 = <MainButton {...{ onclick: function () { } }} children="hello" className/>; // incorrect type for optional attribute
var b8 = <MainButton data-format/>; // incorrect type for specified hyphanted name
var b4 = <MainButton {...obj3} to/>; // Should error because Incorrect type; but attributes are any so everything is allowed
var b5 = <MainButton {...{ onClick: function (e) { } }} {...obj0}/>; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes
var b6 = <MainButton {...{ onClick: function (e) { } }} children={10}/>; // incorrect type for optional attribute
var b7 = <MainButton {...{ onClick: function (e) { } }} children="hello" className/>; // incorrect type for optional attribute
var b8 = <MainButton data-format/>; // incorrect type for specified hyphanated name
});

View file

@ -49,7 +49,7 @@ const b4 = <MainButton {...obj1} />; // any; just pick the first overload
const b5 = <MainButton {...obj1} to="/to/somewhere" />; // should pick the second overload
const b6 = <MainButton {...obj2} />;
const b7 = <MainButton {...{onClick: () => { console.log("hi") }}} />;
const b8 = <MainButton {...obj} {...{onClick() {}}} />; // OK; method declaration get discarded
const b8 = <MainButton {...{onClick() {}}} />; // OK; method declaration get retained (See GitHub #13365)
const b9 = <MainButton to='/some/path' extra-prop>GO</MainButton>;
const b10 = <MainButton to='/some/path' children="hi" >GO</MainButton>;
const b11 = <MainButton onClick={(e) => {}} className="hello" data-format>Hello world</MainButton>;
@ -86,7 +86,7 @@ define(["require", "exports", "react"], function (require, exports, React) {
var b5 = <MainButton {...obj1} to="/to/somewhere"/>; // should pick the second overload
var b6 = <MainButton {...obj2}/>;
var b7 = <MainButton {...{ onClick: function () { console.log("hi"); } }}/>;
var b8 = <MainButton {...obj} {...{ onClick: function () { } }}/>; // OK; method declaration get discarded
var b8 = <MainButton {...{ onClick: function () { } }}/>; // OK; method declaration get retained (See GitHub #13365)
var b9 = <MainButton to='/some/path' extra-prop>GO</MainButton>;
var b10 = <MainButton to='/some/path' children="hi">GO</MainButton>;
var b11 = <MainButton onClick={function (e) { }} className="hello" data-format>Hello world</MainButton>;

View file

@ -155,11 +155,10 @@ const b7 = <MainButton {...{onClick: () => { console.log("hi") }}} />;
>console : Symbol(console, Decl(lib.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
const b8 = <MainButton {...obj} {...{onClick() {}}} />; // OK; method declaration get discarded
const b8 = <MainButton {...{onClick() {}}} />; // 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 = <MainButton to='/some/path' extra-prop>GO</MainButton>;
>b9 : Symbol(b9, Decl(file.tsx, 51, 5))

View file

@ -156,13 +156,13 @@ const b4 = <MainButton {...obj1} />; // any; just pick the first overload
>b4 : JSX.Element
><MainButton {...obj1} /> : JSX.Element
>MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; (hyphenProps: HyphenProps): JSX.Element; }
>obj1 : undefined
>obj1 : any
const b5 = <MainButton {...obj1} to="/to/somewhere" />; // should pick the second overload
>b5 : JSX.Element
><MainButton {...obj1} to="/to/somewhere" /> : JSX.Element
>MainButton : { (buttonProps: ButtonProps): JSX.Element; (linkProps: LinkProps): JSX.Element; (hyphenProps: HyphenProps): JSX.Element; }
>obj1 : undefined
>obj1 : any
>to : string
const b6 = <MainButton {...obj2} />;
@ -184,11 +184,10 @@ const b7 = <MainButton {...{onClick: () => { console.log("hi") }}} />;
>log : (message?: any, ...optionalParams: any[]) => void
>"hi" : "hi"
const b8 = <MainButton {...obj} {...{onClick() {}}} />; // OK; method declaration get discarded
const b8 = <MainButton {...{onClick() {}}} />; // OK; method declaration get retained (See GitHub #13365)
>b8 : JSX.Element
><MainButton {...obj} {...{onClick() {}}} /> : JSX.Element
><MainButton {...{onClick() {}}} /> : 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

View file

@ -55,8 +55,8 @@ const b0 = <MainButton to='/some/path' onClick={(e)=>{}}>GO</MainButton>; // ex
const b1 = <MainButton onClick={(e: any)=> {}} {...obj0}>Hello world</MainButton>; // extra property;
const b2 = <MainButton {...{to: "10000"}} {...obj2} />; // extra property
const b3 = <MainButton {...{to: "10000"}} {...{onClick: (k) => {}}} />; // extra property
const b4 = <MainButton {...obj3} to />; // Shoudld erro because Incorrect type; but attributes are any so everything is allowed
const b5 = <MainButton {...{ onclick(){} }} />; // Spread doesn't retain method declaration
const b6 = <MainButton {...{ onclick(){} }} children={10} />; // incorrect type for optional attribute
const b7 = <MainButton {...{ onclick(){} }} children="hello" className />; // incorrect type for optional attribute
const b8 = <MainButton data-format />; // incorrect type for specified hyphanted name
const b4 = <MainButton {...obj3} to />; // Should error because Incorrect type; but attributes are any so everything is allowed
const b5 = <MainButton {...{ onClick(e: any) { } }} {...obj0} />; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes
const b6 = <MainButton {...{ onClick(e: any){} }} children={10} />; // incorrect type for optional attribute
const b7 = <MainButton {...{ onClick(e: any){} }} children="hello" className />; // incorrect type for optional attribute
const b8 = <MainButton data-format />; // incorrect type for specified hyphanated name

View file

@ -53,7 +53,7 @@ const b4 = <MainButton {...obj1} />; // any; just pick the first overload
const b5 = <MainButton {...obj1} to="/to/somewhere" />; // should pick the second overload
const b6 = <MainButton {...obj2} />;
const b7 = <MainButton {...{onClick: () => { console.log("hi") }}} />;
const b8 = <MainButton {...obj} {...{onClick() {}}} />; // OK; method declaration get discarded
const b8 = <MainButton {...{onClick() {}}} />; // OK; method declaration get retained (See GitHub #13365)
const b9 = <MainButton to='/some/path' extra-prop>GO</MainButton>;
const b10 = <MainButton to='/some/path' children="hi" >GO</MainButton>;
const b11 = <MainButton onClick={(e) => {}} className="hello" data-format>Hello world</MainButton>;

View file

@ -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 = <O/*one*/pt />;
//// let opt1 = <Op/*two*/t pr/*p1*/opx={100} />;
//// let opt2 = <Op/*three*/t propx={100} opt/*p2*/ional />;

View file

@ -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 = <Main/*firstTarget*/Button />;
//// let opt = <Main/*secondTarget*/Button children="chidlren" />;
//// let opt = <Main/*thirdTarget*/Button onClick={()=>{}} />;