diff --git a/lib/hooks.dart b/lib/hooks.dart index c1013952..691a8a31 100644 --- a/lib/hooks.dart +++ b/lib/hooks.dart @@ -47,6 +47,10 @@ HookedServiceEventListener toJson() { }; } +/// Mutates `e.data` or `e.result` using the given [transformer]. +HookedServiceEventListener transform(transformer(obj)) { +} + /// Transforms `e.data` or `e.result` into an instance of the given [type], /// if it is not already. HookedServiceEventListener toType(Type type) {