cloneFunction<TFunction>
Clone a function by creating a new function that calls the original function.
This is useful for creating a new instance of a function that has the same behavior but is not strictly equal to the original function.
Import:
import { cloneFunction } from 'obsidian-dev-utils/function';Signature:
function cloneFunction($function: TFunction): TFunctionParameters:
| Parameter | Type | Description |
|---|---|---|
$function | TFunction |
Returns: TFunction — A new function that has the same behavior as the original function.