• kkj@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    24 hours ago

    So, an equivalent to C#'s Type? or Python’s Optional[Type]? That’s still a lot better than nothing. You aren’t going to get an array when you asked for a float, for example.

    • Zarobi@aussie.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      17 hours ago

      You still might. Typescript is just a fancy linter, it doesn’t actually stop anything from happening. If a backend API changes to give you an array, you will get an array, and it will be a disaster