mobal mobal - 1 year ago 171
TypeScript Question

possible bug in typescript JQuery.html()


let $div = $("div");
let $p = $("p");

gives this error:

Supplied parameters do not match any signature of call target.

in plain js/jquery this is working. An equivalent (in final result) to the following (still in typescript):

let $div = $("div");
let $p = $("p");

Does the typescript definition of
is wrong or did i made a mistake somewhere ?

Answer Source

Signature that you are looking for is missing in typescript definition (as it is not documented), but you can add it manually:

interface JQuery{
    html(obj:JQuery): JQuery;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download