0

Hello I have searched everywhere and installed every package/type i find at google.

But TypeScript dont get my JavaScript Table

var datatable = $('#dc-data-table').dataTable(dataTableOptions) ; //red line in this row
        datatable.fnDraw(false);
        function RefreshTable() {
          dc.events.trigger(function () {
            datatable.api()
              .clear()
              .rows.add( tierDim.top(Infinity) )
              .draw() ;
          });
        }
        for (var i = 0; i < dc.chartRegistry.list().length; i++) {
          var chartI = dc.chartRegistry.list()[i];
          chartI.on("filtered", RefreshTable);
        }
        RefreshTable() ;

<div class="row" id="table">
  <div class="col-md-12 " id="">
    <h2>
      List of all 
    </h2>
    <table class="table table-hover table-condensed" id="dc-data-table"></table>
  </div>
</div>

I get always the issue: Supplied parameters do not match any signature of call target.

BVB1392
  • 175
  • 1
  • 1
  • 11
  • you have to use type definition for jquery to import `$` in your typescript file. BTW there are other awesome library for typescript which handles the datatable/grid. – Niladri Jan 08 '18 at 15:26
  • check this question https://stackoverflow.com/questions/32050645/how-to-use-jquery-with-typescript – Niladri Jan 08 '18 at 15:27
  • 1
    Possible duplicate of [How to use jQuery with TypeScript](https://stackoverflow.com/questions/32050645/how-to-use-jquery-with-typescript) – Mathieu de Lorimier Jan 08 '18 at 16:07

0 Answers0