🎯 System typów
Type guards (is)
if (value is string) { ... }
if (value is number) { ... }
if (value is bool) { ... }
if (value is list) { ... }
if (value is map) { ... }
if (value is function) { ... }
if (value is null) { ... }
Type cast (as! / as?)
let num = "42" as! number;
let maybe = "abc" as? number;
Type alias
type UserId = number;
type Email = string;
type UserList = list;
ensure (runtime check)
ensure age is number;
ensure name is string, "name must be string";