Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82286

Typescript problems with layout functions

$
0
0

I am converting an existing project to typescript modules. Previously I lazily just had DataTable defined as any; now I am importing datatables.net-bs5, etc. (version 2.2.2).

I'm having problems with typescript errors on layout parameters that are functions.
layout: {
topStart: function () {...}
}
is giving the following typescript error:
Type '() => HTMLDivElement' is not assignable to type 'LayoutElement | LayoutFeatures | null | undefined'

None of those types in datatables.net/types/types.d.ts file strike me as mapping to a function, but sometimes those can be hard to parse.

Am I missing a dependency or a particular tsconfig setting?


Viewing all articles
Browse latest Browse all 82286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>