≡

TypeScript: missing Feature export causes errors with Buttons in layout

TypeScript: missing Feature export causes errors with Buttons in layout

peter.brunspeter.bruns Posts: 11Questions: 8Answers: 0

Link to test case: https://stackblitz.com/edit/vitejs-vite-nmcbfq6r?file=src%2Fmain.ts,package.json&terminal=dev
Description of problem:

Hi,

I'm using DataTables 3.1.5 and Buttons 4.1.3 with TypeScript.

TypeScript rejects buttons insidelayout.top1.features and layout.top1.buttons, reporting that it does not exist in the feature type.

Core declares Feature and uses it for the layout types, but doesn’t export it. Adding Feature to the export type list in datatables.net/types/types.d.ts resolves the error.

export type { Feature };

Could this export be included in the next release?

Thanks!

Replies

  • allanallan Posts: 66,158Questions: 1Answers: 11,033 Site admin

    Hi,

    I've got the fix locally, but github git services are currently down as I write this, so I've not been able to push it up yet. It will be in the next release though :).

    Allan

Sign In or Register to comment.