mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Don't forget about spread attributes
This commit is contained in:
parent
fc9b10eeb6
commit
da39a8be10
@ -1425,6 +1425,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.JsxSelfClosingElement:
|
||||
case SyntaxKind.JsxOpeningElement:
|
||||
case SyntaxKind.JsxSpreadAttribute:
|
||||
case SyntaxKind.JsxExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
case SyntaxKind.ParenthesizedExpression:
|
||||
|
||||
@ -11,10 +11,15 @@ declare module 'mod' {
|
||||
import Main from 'mod';
|
||||
declare var Foo, React;
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo handler={Main}></Foo>
|
||||
<Foo handler={Main}></Foo>;
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo {...Main}></Foo>;
|
||||
|
||||
|
||||
|
||||
//// [app.js]
|
||||
var mod_1 = require('mod');
|
||||
// Should see mod_1['default'] in emit here
|
||||
React.createElement(Foo, {"handler": mod_1["default"]});
|
||||
// Should see mod_1['default'] in emit here
|
||||
React.createElement(Foo, React.__spread({}, mod_1["default"]));
|
||||
|
||||
@ -17,7 +17,12 @@ declare var Foo, React;
|
||||
>React : Symbol(React, Decl(app.tsx, 1, 16))
|
||||
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo handler={Main}></Foo>
|
||||
<Foo handler={Main}></Foo>;
|
||||
>Foo : Symbol(Foo, Decl(app.tsx, 1, 11))
|
||||
>handler : Symbol(unknown)
|
||||
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo {...Main}></Foo>;
|
||||
>Foo : Symbol(Foo, Decl(app.tsx, 1, 11))
|
||||
|
||||
|
||||
|
||||
@ -17,10 +17,18 @@ declare var Foo, React;
|
||||
>React : any
|
||||
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo handler={Main}></Foo>
|
||||
<Foo handler={Main}></Foo>;
|
||||
><Foo handler={Main}></Foo> : any
|
||||
>Foo : any
|
||||
>handler : any
|
||||
>Main : any
|
||||
>Foo : any
|
||||
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo {...Main}></Foo>;
|
||||
><Foo {...Main}></Foo> : any
|
||||
>Foo : any
|
||||
>Main : any
|
||||
>Foo : any
|
||||
|
||||
|
||||
|
||||
@ -11,4 +11,7 @@ declare module 'mod' {
|
||||
import Main from 'mod';
|
||||
declare var Foo, React;
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo handler={Main}></Foo>
|
||||
<Foo handler={Main}></Foo>;
|
||||
// Should see mod_1['default'] in emit here
|
||||
<Foo {...Main}></Foo>;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user