cast method
Implementation
T cast(Object? o) {
var jsObj = o.asJSObject;
if (jsObj == null) throw ArgumentError("Can't cast `null` to type `$name`");
return _cast(jsObj) ??
(throw ArgumentError("Can't cast `$o` to type `$name`"));
}
T cast(Object? o) {
var jsObj = o.asJSObject;
if (jsObj == null) throw ArgumentError("Can't cast `null` to type `$name`");
return _cast(jsObj) ??
(throw ArgumentError("Can't cast `$o` to type `$name`"));
}