question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unnecessary error when using css helper function

See original GitHub issue

This is related to https://github.com/Microsoft/typescript-styled-plugin/issues/74

When using the css helper function inline on a component prop, typescript-styled-plugin throws 2 unnecessary errors:

<Component animation={css`${condition ? animation1 : animation2} 1s linear`} />

image

image

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
karolisgrinkeviciuscommented, Nov 20, 2018

I’m also getting this kind of error even when using "tags": ["styled"] in tsconfig.

0reactions
EricVanDerDijscommented, Nov 20, 2018

No, i’m using a simple styled(Component) STYLES ; function, but have a similar error, and recently others have reported a similar error message (“expected }” on files that don’t have syntax error) like #83 (others that seems alike are #82 #51 ). should I start a new issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using helpers inside css erb file gives undefined method
When I call the helper function from the view, the output is expected (a string containing the URL for of the image). However,...
Read more >
Why We're Breaking Up with CSS-in-JS - DEV Community ‍ ‍
Hi, I'm Sam — software engineer at Spot and the 2nd most active maintainer of Emotion, a widely-popular CSS-in-JS library for React.
Read more >
9 tricks to eliminate render blocking resources - LogRocket Blog
Identify your render blocking resources; Don't add CSS with the @import rule; Use the media ... Find and remove unused CSS and JavaScript ......
Read more >
Remove Unused CSS - WP Rocket Knowledge Base
Remove Unused CSS is the recommended method of optimizing your CSS. If you have trouble with this option, check the status page, ...
Read more >
How whitespace is handled by HTML, CSS, and in the DOM
Whitespace helper functions. The JavaScript code below defines several functions that make it easier to deal with whitespace in the DOM: /** * ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found