mobal mobal - 6 months ago 53
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 ?


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;