TypeScript: Incorrect typing for Editor’s mode() method
TypeScript: Incorrect typing for Editor’s mode() method
in Editor
Link to test case: https://stackblitz.com/edit/vitejs-vite-hvmmyifr?file=package.json,src%2Fmain.ts
Hi,
I'm using DataTables 3.1.4 and Editor 3.1.1 with TypeScript.
The return type of editor.mode() is currently:
null | 'bubble' | 'inline' | 'main'
According to the documentation, it should be:
null | 'create' | 'edit' | 'remove'
It looks like the declaration uses the display mode type instead of the operation type. The setter overload appears to have the same issue.
This question has an accepted answers - jump to answer
Answers
Thank you for letting me know about that error. I've committed a fix and tightened up the typing in that area now. The fix will be in the next patch which I'll release soon.
Regards,
Allan