TypeChecker.any constructor Null safety

const TypeChecker.any(
  1. 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]);


const factory TypeChecker.any(Iterable<TypeChecker> checkers) = _AnyChecker;