• qqq@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    21 hours ago

    Could be a variable from somewhere else in the code. It should throw type error of some sort if it’s not going to handle a float correctly

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      18 hours ago

      Agreed, functions in general should do this, and some do. But it should probably be automatic. And the variable argument is a good one, a very good argument for TypeScript. ❤️