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 build error in rc.{3-5}

See original GitHub issue

Bug report

Describe the bug

Using TypeScript with strict mode on, this internal error comes up.

node_modules/@chakra-ui/system/dist/types/forward-ref.d.ts:10:186 - error TS2344: Type 'T' does not satisfy the constraint '"symbol" | "object" | "button" | "meter" | "textarea" | "style" | "progress" | "text" | "ruby" | "table" | "small" | "sub" | "circle" | "embed" | "pre" | "caption" | "menu" | "menuitem" | ... 158 more ... | (new (props: any) => Component<...>)'.
  Type 'As' is not assignable to type '"symbol" | "object" | "button" | "meter" | "textarea" | "style" | "progress" | "text" | "ruby" | "table" | "small" | "sub" | "circle" | "embed" | "pre" | "caption" | "menu" | "menuitem" | ... 158 more ... | (new (props: any) => Component<...>)'.
    Type 'string' is not assignable to type '"symbol" | "object" | "button" | "meter" | "textarea" | "style" | "progress" | "text" | "ruby" | "table" | "small" | "sub" | "circle" | "embed" | "pre" | "caption" | "menu" | "menuitem" | ... 158 more ... | (new (props: any) => Component<...>)'.
      Type 'T' is not assignable to type '"view"'.
        Type 'As' is not assignable to type '"view"'.
          Type 'string' is not assignable to type '"view"'.

10 declare type PropsOf<T extends As> = T extends React.ComponentClass<infer P> ? React.PropsWithoutRef<P> & React.RefAttributes<InstanceType<T>> : React.PropsWithRef<React.ComponentProps<T>>;

Minimal reproduction

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
joelgallantcommented, Oct 22, 2020

I think so, working on it now.

0reactions
ljosberinncommented, Oct 22, 2020

yeah that explains it - you mentioned a PR :] already know the solution by any chance?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript file in __tests__ with incorrect ... - GitHub
Move the .ts file out of the tests folder into a regular folder and yarn build then correctly gives an error due to...
Read more >
TypeScript getting error TS2304: cannot find name ' require'
I am getting the error "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node.js page. I have...
Read more >
TypeScript: JavaScript With Syntax For Types.
TypeScript is JavaScript with syntax for types. TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at ......
Read more >
Visual Studio 2017 15.9 Release Notes - Microsoft Learn
New Release Icon 15.9.35 Visual Studio 2017 version 15.9.35 ... Fix for HRESULT E_FAIL build error in some C++ projects when upgrading to ......
Read more >
How to use ESLint with TypeScript | Khalil Stemmler
When you set the rule to error - 2 , it means that you don't want the code that breaks your coding conventions...
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