Skip to content

createFunction<TFunction>

Creates a function from the provided parameters.

Import:

import { createFunction } from 'obsidian-dev-utils/function';

Signature:

function createFunction(params: CreateFunctionArgumentlessParams & Partial<CreateFunctionParams<TFunction>>): TFunction

Parameters:

ParameterTypeDescription
paramsCreateFunctionArgumentlessParams & Partial<CreateFunctionParams<TFunction>>The parameters to create the function with.

Returns: TFunction — A function created from the provided parameters.