Open
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