@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
16 lines (14 loc) • 343 B
text/typescript
import type {
WidgetCallbackAction,
WidgetRuntimeAction,
} from '@wordpress/widget-primitives';
/**
* Whether a callback fulfills the action.
*
* @param {WidgetRuntimeAction} action The action to test.
*/
export function isCallbackAction(
action: WidgetRuntimeAction
): action is WidgetCallbackAction {
return 'callback' in action;
}