assertTyped<T> function
Implementation
T assertTyped<T>(dynamic val, {String name = 'value'}) {
if (!(val is T)) {
throw TypeAssertionError(T, val.runtimeType);
}
return val;
}
T assertTyped<T>(dynamic val, {String name = 'value'}) {
if (!(val is T)) {
throw TypeAssertionError(T, val.runtimeType);
}
return val;
}