≡

Broken API return type (3.0.4)

Broken API return type (3.0.4)

sebastianbarthsebastianbarth Posts: 72Questions: 15Answers: 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

  • sebastianbarthsebastianbarth Posts: 72Questions: 15Answers: 0

    Same with:

      "datatables.net": "3.1.1"
      "datatables.net-dt": "3.1.1"
      "datatables.net-fixedcolumns": "6.1.0"
      "datatables.net-scroller": "3.1.0"
      "datatables.net-scroller-dt": "3.1.0"
    
  • sebastianbarthsebastianbarth Posts: 72Questions: 15Answers: 0

    @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)

  • allanallan Posts: 66,073Questions: 1Answers: 11,004 Site admin
    Answer ✓

    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

  • sebastianbarthsebastianbarth Posts: 72Questions: 15Answers: 0

    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?

  • allanallan Posts: 66,073Questions: 1Answers: 11,004 Site admin
    edited September 23

    Ah sorry - I didn't look at it properly. I've released it from the spam queue. I'll reply back there soon.

    Allan

Sign In or Register to comment.