• @qqq@lemmy.world
    link
    fedilink
    13
    edit-2
    23 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
      link
      fedilink
      120 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. ❤️