MCPcopy
hub / github.com/clientIO/joint / isSetter

Function isSetter

packages/joint-react/src/utils/is.ts:10–13  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

8export type Setter<Value> = (item: Value) => Value;
9
10export function isSetter(value: unknown): value is Setter<unknown> {
11 // check if value is a function and there is parameter
12 return typeof value === 'function' && value.length === 1;
13}
14
15export function isDiaId(value: unknown): value is dia.Cell.ID {
16 return util.isString(value) || util.isNumber(value);

Callers 1

setCellHelperFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected