Open rkirov opened 10 years ago
:+1: to add a String
type and throw if not String
.
It don't think it would make sense to add support for num
(same for List
, Map
& user defined objects) because you'll always get a String
back. To support this usages the users should use a (de)serialization library.
Currently, setting non-string values to Cookies like
cookies['a'] = 3
silently steps over due to: https://github.com/angular/angular.dart/blob/b43de31d2a9f1c0274f659ada77714e63a6d0c6a/lib/core_dom/cookies.dart#L78This has already confused somebody: http://stackoverflow.com/questions/23051222/how-to-use-cookies-in-angulardart
We should either take any value and call toString() or annotate the appropriate methods with String so static type checking catches this.