asOrThrow<T extends CollectionOptions> method
T
asOrThrow<T extends CollectionOptions>()
Implementation
T asOrThrow<T extends CollectionOptions>() {
if (this is! T) {
throw ArgumentError('Expected ${T.toString()}, got ${runtimeType.toString()}.');
}
return this as T;
}