Search code examples
javascripttypescripthandsontable

Can i use handsontable in typescript


Trying to use handsontable in typescript without a definition file

$("#myTable").handsontable({...})

this causes the complier to complain "The property handsontable does not exist on value of type Jquery"

how can i declare handsontable ?


Solution

  • You can extend JQuery in this way:

    interface JQuery {
        handsontable(): JQuery;
    }