invariant_future 1.0.3 copy "invariant_future: ^1.0.3" to clipboard
invariant_future: ^1.0.3 copied to clipboard

An extension type `IFuture` adjusting the typing of `Future`. The type parameter is invariant, and some member signatures have more strict static typing than `Future`.

example/example.dart

// Copyright (c) 2024, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'union/example.dart' as union show main;
import 'member/example.dart' as member show main;

void main() async {
  print("--- Try out invariant futures that are union type based.");
  await union.main();
  print("\n--- Try out invariant futures that are member based.");
  await member.main();
}
2
likes
160
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

An extension type `IFuture` adjusting the typing of `Future`. The type parameter is invariant, and some member signatures have more strict static typing than `Future`.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

extension_type_unions

More

Packages that depend on invariant_future