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

Commit

Permalink
Remove TypeSafeStream
Browse files Browse the repository at this point in the history
  • Loading branch information
leafpetersen committed Mar 2, 2018
1 parent 95f3667 commit 023eb0d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 750 deletions.
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

Deprecate `DelegatingStream.typed`, and make it redirect to `Stream.cast`.

## 2.0.5

* Fix Dart 2.0 [runtime cast errors][sdk#27223] in `StreamQueue`.
Expand Down
8 changes: 4 additions & 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,8 @@ 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);
/// The [typed] method is deprecated. The `cast` or `retype` method on
/// [stream] should be used directly instead.
@deprecated
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
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

0 comments on commit 023eb0d

Please sign in to comment.