as<T extends CborObject<Object?>> method

T as<T extends CborObject<Object?>>({
  1. String? operation,
})

Implementation

T as<T extends CborObject>({String? operation}) {
  if (this is! T) {
    throw CborSerializableException.castingFailed<T>(
      value,
      operation: operation,
    );
  }
  return this as T;
}