ride() Function
Overrides a method named methodName
on the object
with the result from calling the callback
function with the original method.
Signature
export declare function ride<T extends object, K extends keyof T>(object: T, methodName: K, decorator: Decorator<T, T[K]>): void;
Parameters
Parameter | Type | Description |
---|---|---|
object | T | The object with the method that you want to override. |
methodName | K | The name of the method to override. |
decorator | Decorator<T, T[K]> | The function that should return the overridden method. |
(Returns) | void |