Skip to content

Commit

Permalink
Make conversion helpers can be async
Browse files Browse the repository at this point in the history
lejard-h#174 
- locally tested
  • Loading branch information
Study-Log committed Sep 20, 2020
1 parent 01173b6 commit d691f22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chopper/lib/src/annotations.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:async';
import 'package:meta/meta.dart';
import 'request.dart';
import 'response.dart';
Expand Down Expand Up @@ -261,8 +262,8 @@ class Head extends Method {
);
}

typedef ConvertRequest = Request Function(Request request);
typedef ConvertResponse<T> = Response Function(Response response);
typedef ConvertRequest = FutureOr<Request> Function(Request request);
typedef ConvertResponse<T> = FutureOr<Response> Function(Response response);

@immutable
class FactoryConverter {
Expand Down

0 comments on commit d691f22

Please sign in to comment.