F
after
Runs a callback after a method, which can replace its result by returning a value.
function after<M extends PatchParent, P extends string>(parent: M, method: P, callback: AfterCallback<ArgsOf<M[P]>, ResultOf<M[P]>, SelfOf<M, M[P]>>, options?: PatchOptions): () => voidParameters
| Name | Type | Description |
|---|---|---|
| parent | M | The object holding the method. |
| method | P | The method's key. |
| callback | AfterCallback<ArgsOf<M[P]>, ResultOf<M[P]>, SelfOf<M, M[P]>> | Receives the patch context. |
| options? | PatchOptions | Patch options. |
Returns
() => voidA function removing the patch.