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.

how to handle typescript issue

See original GitHub issue

Hi,

Maybe someone met this before: image

I really like this plugin comparing to the className, but as long as I started to use it together with typescript - I see this message.

Maybe there are known ways to fix it?

Regards,

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
bySabicommented, Oct 19, 2019

and to put in the typings folder:

import "react";

declare module "react" {
  interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
    // extends React's HTMLAttributes
    class?: string;
  }
}

Tested with a next.js based project

0reactions
bySabicommented, Oct 19, 2019

@tkrotoff maybe this is useful to you too. Related to https://github.com/Microsoft/TypeScript/issues/9327

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · microsoft/TypeScript - GitHub
TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Issues · microsoft/TypeScript.
Read more >
Improving TypeScript error handling with exhaustive type ...
In this article, we'll cover a few of the most common approaches for error handling in TypeScript (TS). We'll talk about most common...
Read more >
TypeScript errors and how to fix them
Common Errors​​ Below you find a list of common TypeScript errors along with the buggy code and its fixed version.
Read more >
Documentation - Understanding Errors - TypeScript
Whenever TypeScript finds an error, it tries to explain what went wrong in as much detail as possible. Because its type system is...
Read more >
Get a catch block error message with TypeScript - Kent C. Dodds
Most of the time it absolutely is possible for the unexpected to happen and TypeScript does a pretty good job of forcing you...
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