TypeChecker.any constructor
const
TypeChecker.any(
- Iterable<
TypeChecker> checkers
Creates a new TypeChecker that delegates to other checkers.
This implementation will return true for type checks if any of the
provided type checkers return true, which is useful for deprecating an
API:
const $Foo = const TypeChecker.fromRuntime(Foo);
const $Bar = const TypeChecker.fromRuntime(Bar);
// Used until $Foo is deleted.
const $FooOrBar = const TypeChecker.forAny(const [$Foo, $Bar]);
Implementation
const factory TypeChecker.any(Iterable<TypeChecker> checkers) =
TypeCheckerImpl.any;