• 0 Posts
  • 100 Comments
Joined 2 years ago
cake
Cake day: August 19th, 2023

help-circle







  • Gradually typed is a great description because it’s neither fully static or dynamic. TS does allow you to circumvent the types too easily to be called statically typed.

    const strings: string[] = ([1] as any[])
    

    Is ok in TS land so the type of strings is not really static so to speak because you can assign whatever to it. Writing this in Dart would give

    error - The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<string>'. - argument_type_not_assignable
    

    if I’m not mistaken.