Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: lib/src/stream_channel_transformer.dart

Issue 1966893002: Fix all strong-mode errors and warnings. (Closed) Base URL: git@github.com:dart-lang/stream_channel.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/json_document_transformer.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/stream_channel_transformer.dart
diff --git a/lib/src/stream_channel_transformer.dart b/lib/src/stream_channel_transformer.dart
index be032c60dcc40d507fe982d7fe384d381df378af..ac980859daa2f48564a2ebc391cedd3537c3ddd8 100644
--- a/lib/src/stream_channel_transformer.dart
+++ b/lib/src/stream_channel_transformer.dart
@@ -19,10 +19,10 @@ import '../stream_channel.dart';
/// Transformers must be able to have `bind` called multiple times.
class StreamChannelTransformer<S, T> {
/// The transformer to use on the channel's stream.
- final StreamTransformer _streamTransformer;
+ final StreamTransformer<T, S> _streamTransformer;
/// The transformer to use on the channel's sink.
- final StreamSinkTransformer _sinkTransformer;
+ final StreamSinkTransformer<S, T> _sinkTransformer;
/// Creates a [StreamChannelTransformer] from existing stream and sink
/// transformers.
@@ -35,8 +35,9 @@ class StreamChannelTransformer<S, T> {
/// and all output from its stream is decoded using [Codec.decoder].
StreamChannelTransformer.fromCodec(Codec<S, T> codec)
: this(
- codec.decoder,
- new StreamSinkTransformer.fromStreamTransformer(codec.encoder));
+ typedStreamTransformer(codec.decoder),
+ StreamSinkTransformer.typed(
+ new StreamSinkTransformer.fromStreamTransformer(codec.encoder)));
/// Transforms the events sent to and emitted by [channel].
///
« no previous file with comments | « lib/src/json_document_transformer.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698