Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Deprecate DelegatingStream.typed and make it delegate to Stream.cast #54

Merged
merged 11 commits into from
Mar 3, 2018
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.6

* Add further support for Dart 2.0 library changes to `Stream`.

## 2.0.5

* Fix Dart 2.0 [runtime cast errors][sdk#27223] in `StreamQueue`.
Expand Down
5 changes: 1 addition & 4 deletions lib/src/delegate/stream.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import 'dart:async';

import '../typed/stream.dart';

/// Simple delegating wrapper around a [Stream].
///
/// Subclasses can override individual methods, or use this to expose only the
Expand All @@ -23,6 +21,5 @@ class DelegatingStream<T> extends StreamView<T> {
/// original generic type, by asserting that its events are instances of `T`
/// whenever they're provided. If they're not, the stream throws a
/// [CastError].
static Stream<T> typed<T>(Stream stream) =>
stream is Stream<T> ? stream : new TypeSafeStream<T>(stream);
static Stream<T> typed<T>(Stream stream) => stream.cast();
}
135 changes: 0 additions & 135 deletions lib/src/typed/stream.dart

This file was deleted.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: async
version: 2.0.5
version: 2.0.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this available in -dev.23?

Do we need to bump the SDK constraint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these APIs were available in dev.23, and all tests for this package pass with dev.23.

author: Dart Team <misc@dartlang.org>
description: Utility functions and classes related to the 'dart:async' library.
homepage: https://www.github.com/dart-lang/async
Expand Down
Loading