Skip to content

Support InputEvent interface in libs #29441

Closed
@Christian24

Description

@Christian24

Search Terms

input event
InputEvent

Suggestion

TypeScript so far does not have a type definition of InputEvent (https://developer.mozilla.org/en-US/docs/Web/API/InputEvent). Even though there are some bugs concerning browser support, I would still say it is supported widely enough (https://caniuse.com/#feat=input-event) to be part of TypeScript's libs. So, far there only is a type definition available through @types/dom-inputevent

Use Cases

Working with input elements in HTML5. It's a feature of HTML5 and thus should be supported.

Examples

(event: InputEvent) => this.value = event.currentTarget.value;

Checklist

My suggestion meets these guidelines:

  • [x ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [ x] This wouldn't change the runtime behavior of existing JavaScript code
  • [x ] This could be implemented without emitting different JS based on the types of the expressions
  • [x ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • [ x] This feature would agree with the rest of TypeScript's Design Goals.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions