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.

Typescript errors after upgrading to 0.3.0

See original GitHub issue

After upgrading from 0.2.0 to 0.3.0 I am seeing the following typescript errors.

Expression produces a union type that is too complex to represent on

    <Menu.Item>
      Test
    </Menu.Item>

And

    <Switch
      checked={true}
    >
      <span css={tw`sr-only`}>test</span>
      <span></span>
    </Switch>

Also seeing Binding element 'open' implicitly has an 'any' type. on the following

      <Menu>
        {({ open }) => <>{open}</>}
      </Menu>

I am currently using typescript 4.1.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

12reactions
anarkcommented, Feb 13, 2021

I was still seeing this after upgrading to 0.3.1, however I have narrowed it down to a conflict with @emotion/styled.

I had the following lines in my tsconfig.json

    "jsx": "react-jsxdev",
    "jsxImportSource": "@emotion/react",

After removing the following which seems to no longer be needed for @emotion/react.

    "jsxImportSource": "@emotion/react",

The warning is gone.

0reactions
jabczykcommented, Jun 7, 2022

I encountered the same issue with Dialog. Couldn’t remove the jsxImportSource line because it breaks the css prop, so I used @ts-expect-error as a workaround:

const Modal: React.FC = () => {
  return (
    // @ts-expect-error
    <Dialog />
  )
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple Typescript errors after upgrading from Angular 2.3.0 ...
I upgraded from Angular 2.3.0 to Angular 4.3.0 and it broke my app. Here are the errors I'm getting. I'm getting several hundred...
Read more >
Show Typescript errors in console during development
Hi, we are trying to improve out development practices and make sure we don't miss any typescript errors that we might get in...
Read more >
TS2300 and other typescript errors, TS stops compiling
Bowden, we have a similar issue. We dont get any TS2300 errors but typescript stops compiling on save. Running the full VS build...
Read more >
Typescript compile fails in build - works locally - CircleCI Discuss
Hi, I'm getting the following build failures - which don't appear locally: npm test door-key@1.0.6 test /home/ubuntu/door-key tsc ...
Read more >
Type Error when building package that uses @prismicio/helpers
Hi, well, I've checked with our dev team, and for us upgrading TypeScript should have fixed the issue, but it's possible you have...
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