Skip to content

singleDispatch

singleDispatch<T>(func: T): T & object

Defined in: packages/pythonlib/src/functools.ts:173

Transform a function into a single-dispatch generic function This is a simplified version - full singleDispatch would require runtime type checking

Type Parameters

Type Parameter
T extends (…args: unknown[]) => unknown

Parameters

ParameterType
funcT

Returns

T & object