transform hook
This commit is contained in:
parent
44683b8a34
commit
12587bb5a0
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue