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
Despite BarComponent still being used in the body of the render function, the import statement for the 'bar' module is elided and BarComponent will be undefined. Seems like a serious correctness issue.
The culprit appears to be the JSX rest spread. If the JSX rest spread is removed from the div element, the output is correct:
TypeScript Version: 2.3.1 and 2.3.2
Code
Compile the following with
tsc a.tsx --jsx react
:Expected behavior:
In TS 2.3.0, this results in the following correct output:
Note that module
'bar'
is imported andBarComponent
is defined correctly.Actual behavior:
Compile again with TS 2.3.1 and re-run:
Despite
BarComponent
still being used in the body of the render function, the import statement for the'bar'
module is elided andBarComponent
will be undefined. Seems like a serious correctness issue.The culprit appears to be the JSX rest spread. If the JSX rest spread is removed from the
div
element, the output is correct:Input
Output, TS 2.3.1
The text was updated successfully, but these errors were encountered: