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 definitions are incorrect.

See original GitHub issue

onOpen and onClose does not take the popup as their argument, this should be updated in the definitions file.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
torkelrogstadcommented, Nov 8, 2019

After wrapping my modals in sweetalert2-react-content the onOpen and onClose functions no longer received the modals as their argument, and I had to call Swal.getPopup to get a hold of if. So what I’m trying to say, is that this package should redefine the onOpen and onClose signatures to be () => void instead of HTMLElement => void. Similar to what you do for the other changed props: https://github.com/sweetalert2/sweetalert2-react-content/blob/master/src/sweetalert2-react-content.d.ts#L36

0reactions
limontecommented, Nov 8, 2019

🎉 This issue has been resolved in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to overwrite incorrect TypeScript type definition installed ...
A way that is not mentioned here is to put a type declaration in a index.d.ts file. For my case, the types from...
Read more >
Typescript definitions are incorrect for YAxis.showLastLabel
This value can be a boolean (as in version 10.2.0). Actual behaviour. At the moment I get this error: Error: src/stk-charts/configs ...
Read more >
Surviving the TypeScript Ecosystem — Part 4 - Medium
One thing to remember is that the type definition files in DefinitelyTyped are community sourced. In most cases they are not written by...
Read more >
Incorrect type resolution from typings in a case of multiple type ...
It looks like type is incorrectly being resolved from typings definition in a case if there is multiple type definitions are available for...
Read more >
TypeScript - CustomStore - Incorrect typing definition for the ...
In our solution we created a custom store, that is reused by different components. We found the issue as we added tests for...
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