-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed as not planned
Closed as not planned
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: TransformsRelates to the public transform APIRelates to the public transform APIHelp WantedYou can do thisYou can do thisRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms:
Debug Failure. False expression., typescript transformer, jsx element
Code
- clone
https://github.com/madou/untitled-css-in-js-project
- run
git checkout b229dc749e4614bb8d9194c8de340a82f10c8f8a
- run
yarn
- run
yarn test
- notice one test fails
should not blow up when transforming with const
- notice a similar test but with
var
instead ofconst
passes
the node transformation is done here - if i return the original jsx element node then the test passes. but then that defeats the purpose of the transformer.. 😛
the code is essentially transforming
const Component = () => <div css={{ fontSize: '20px' }}>hello world</div>;
to
const Component = () => (
<>
<style>{'.a { font-size: 20px; } '}</style>
<div className="a">hello world</div>
</>
);
Expected behavior:
it works no error thrown
Actual behavior:
"Debug Failure. False expression."
error thrown. also tried with nightly typescript version - same error.
Related Issues:
😄 would love to get this figured out! hoping it's just something i've done wrong. make from this twitter thread https://twitter.com/orta/status/1206139333448732672
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: TransformsRelates to the public transform APIRelates to the public transform APIHelp WantedYou can do thisYou can do thisRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone