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.

`ts-styled-plugin` error on valid referred component template literal curly brace

See original GitHub issue

Hello, I’m seeing ts-styled-plugin errors while using this plugin (version 0.0.21) and referred components in my application.

I have verified that my code compiles and renders in the browser without issues.

I see the following errors around the two curly braces after the referred component selector.

const ListNoteTitle = styled.span`
  font-weight: bold;
  color: ${props => props.theme.primaryColor};
  ${ListNoteItem}:hover & {
    text-decoration: underline;
  }
`;

screenshot from 2018-07-13 16-49-20

  • [ts-styled-plugin] semi-colon expected on the first curly brace
  • [ts-styled-plugin] at-rule or selector expected on the second curly brace

I think this is a plugin issue. My relevant source code can be found here:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:26
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

65reactions
dwjohnstoncommented, Dec 3, 2018

For anyone who is coming from google - it might also be that you have a stray curly bracket.

10reactions
1mayurcommented, Apr 26, 2019
@page {
    margin: 2mm;
}

throws error

Read more comments on GitHub >

github_iconTop Results From Across the Web

ts-styled-plugin error on valid referred component template ...
I see the following errors around the two curly braces after the referred component selector. const ListNoteTitle = styled.span` font-weight: ...
Read more >
How to escape quotation marks and curly brackets in template ...
My plan is to use a template string to change it, whenever the variable currentLang changes. The problem is, that I can't escape...
Read more >
Template literals in JavaScript | Laurie on Tech
The above code isn't valid. In order to use that string literal, you have to surround it with curly braces. <Component name ...
Read more >
Documentation - TypeScript 3.9
So TypeScript users will get a helpful red squiggle and an error message when ... in a function, especially when adding curly braces...
Read more >
Learn Template Strings – ES6: The Right Parts
Templates Strings are an alternative to string concatenation. ... So if you wanted to do a dollar sign curly brace that wasn't part...
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