Broken API return type (3.0.4)
Broken API return type (3.0.4)
sebastianbarth
Posts: 74Questions: 16Answers: 0
Hello Allan,
My previous discussion 'Export of additional typescript types (3.0.4)' somehow disappeared. To not wait for its reappearance (I guess it is just not yet reviewed), I want to right away ask you about a specific isolated use case.
We are doing the following:
const columnMethods = dataTable.column(headerCell); // headerCell is a HTMLTableCellElement
const bodyCells = columnMethods.nodes().toArray();
bodyCells is returned as HTMLTableCellElements[] (expected), but now, with 3.0.4 (different to 2.3.8) the inferred type is HTMLTableCellElement[][].
I guess the type is wrong?
Best regards,
Sebastian
This question has an accepted answers - jump to answer
Answers
Same with:
@allan Do discussion posts disappear on edit? (In regard to my missing post 'Export of additional typescript types (3.0.4)', which I actually did edit)
Hi Sebastian,
Many thanks! You are absolutely right, I had an error in the type for the
column().nodes()method. I've committed the fix and it will be in 3.1.2 when released.Regarding your disappearing post - it was caught up in the spam filter unfortunately (no idea why!). I've marked your account so it shouldn't happen again
Allan
Thanks Allan. Looking forward to that patch.
Does that mean I need to rewrite my post (it was huge) or is it now in edit review, in addition?
Ah sorry - I didn't look at it properly. I've released it from the spam queue. I'll reply back there soon.
Allan