Core API Overview > @adpt/core > useMethod
useMethod() function
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Signature:
export declare function useMethod<Initial, H extends Handle, Instance = HandleInstanceType<H>, MethodName extends MethodNames<Instance> = MethodNames<Instance>, Ret = ReturnTypeOrNever<Instance[MethodName]>>(hand: H | null, initial: Initial, method: MethodName, ...args: any[]): Ret | Initial;
Parameters
Parameter | Type | Description |
---|---|---|
hand | H | null | |
initial | Initial | |
method | MethodName | |
args | any[] |
Returns:
Ret | Initial