Skip to content

jQuery TS definitions file doesn't include jqLite version of .on() #2

@bvaughn

Description

@bvaughn

The jquery.d.ts definition of .on() should include a version without the optional selector parameter since specifying that parameter will result in a jqlite runtime error:

jqLite#on() does not support the `selector` or `eventData` parameters

And TypeScript won't compile a jqLite-compatible version of the .on() method with the current definition:

error TS2345: Argument of type 'string' is not assignable to parameter of type '{ [key: string]: any; }'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions