You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import*asReactfrom"react";importAfrom"./A";exportdefaultclassTestextendsReact.PureComponent<any,void>{render(){const{ a, ...b}=this.props;return(<div{...b}><A/><div>Test</div></div>);}}
in version 2.3.2, compile the finished code is wrong:
"use strict";// var __extends = (this && this.__extends) || function (d, b) {...Object.defineProperty(exports,"__esModule",{value: true});varReact=require("react");varTest=(function(_super){__extends(Test,_super);functionTest(){return_super!==null&&_super.apply(this,arguments)||this;}Test.prototype.render=function(){var_a=this.props,a=_a.a,b=__rest(_a,["a"]);return(React.createElement("div",__assign({},b),React.createElement(A_1.default,null),React.createElement("div",null,"Test")));};returnTest;}(React.PureComponent));exports.default=Test;
A module is not compiled.
in version 2.1.6,compile the finished code is right:
"use strict";// var __extends = (this && this.__extends) || function (d, b) {...varReact=require("react");varA_1=require("./A");varTest=(function(_super){__extends(Test,_super);functionTest(){return_super!==null&&_super.apply(this,arguments)||this;}Test.prototype.render=function(){var_a=this.props,a=_a.a,b=__rest(_a,["a"]);return(React.createElement("div",__assign({},b),React.createElement(A_1.default,null),React.createElement("div",null,"Test")));};returnTest;}(React.PureComponent));Object.defineProperty(exports,"__esModule",{value: true});exports.default=Test;
Duplicate of #15469. should be fixed in TS 2.3 (out later this week). the fix should already be in typescript@next please give it a try and let us know if you still running into issues.
TypeScript Version: 2.3.2
Code
in version
2.3.2
, compile the finished code is wrong:A
module is not compiled.in version
2.1.6
,compile the finished code is right:Test Source Code
OS: win10 build 1703
nodeJS: v6.10.3
The text was updated successfully, but these errors were encountered: