Typescript throwing errors on selected and Buttons extension

Typescript throwing errors on selected and Buttons extension

joed67joed67 Posts: 14Questions: 6Answers: 1

I'm using DataTables in Typescript. All was going well, until....

I am using the Buttons extension and installed using npm from here:

npm install datatables.net-buttons
npm install datatables.net-buttons-dt

I have these imports in my code:

import 'datatables.net';
import 'datatables.net-buttons';

Although I am importing datatables-buttons, it causes errors when compiling.

**Object literal may only specify known properties, and 'buttons' does not exist in type 'Settings'.**

Shouldn't that be all I need for Typescript?

This question has an accepted answers - jump to answer

Answers

  • joed67joed67 Posts: 14Questions: 6Answers: 1
    Answer ✓

    Never mind on this... it was a missed typo.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Thanks for the update - good to hear you got it fixed.

    Allan

  • wskwsk Posts: 1Questions: 0Answers: 0
    edited May 30

    I've the same requirements and did everything that I could find on this forum or imagine but could not show button in datatable using typescript, however it works in javascript.
    Can somebody point to or post a simple example of having datatables with custom button in typescript? Thanks.

Sign In or Register to comment.