≡

TypeScript: Incorrect typing for Editor’s mode() method

TypeScript: Incorrect typing for Editor’s mode() method

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

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

  • allanallan Posts: 66,162Questions: 1Answers: 11,033 Site admin
    Answer ✓

    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

Sign In or Register to comment.