We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript doesn't allow to access the constructor of any of the browser's events.
event constructor
I just came across it because I was trying to create a cloned event as seen here:
https://github.com/mui-org/material-ui/blob/master/packages/mui-core/src/SliderUnstyled/SliderUnstyled.js#L246-L254
Playground link with relevant code
const evt = new InputEvent('input'); const cloneEvt = new evt.constructor(evt.type, evt); // possible in JS, but is a Type error here.
type errors when accessing a constructor of an event object.
no type errors when creating a new event from the original event's constructor.
The text was updated successfully, but these errors were encountered:
Duplicate of #32452.
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
Bug Report
Typescript doesn't allow to access the constructor of any of the browser's events.
🔎 Search Terms
event
constructor
🕗 Version & Regression Information
I just came across it because I was trying to create a cloned event as seen here:
https://github.com/mui-org/material-ui/blob/master/packages/mui-core/src/SliderUnstyled/SliderUnstyled.js#L246-L254
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
type errors when accessing a constructor of an event object.
🙂 Expected behavior
no type errors when creating a new event from the original event's constructor.
The text was updated successfully, but these errors were encountered: