MCPcopy
hub / github.com/reduxjs/redux / isAction

Function isAction

src/utils/isAction.ts:4–10  ·  view source on GitHub ↗
(action: unknown)

Source from the content-addressed store, hash-verified

2import isPlainObject from './isPlainObject'
3
4export default function isAction(action: unknown): action is Action<string> {
5 return (
6 isPlainObject(action) &&
7 'type' in action &&
8 typeof (action as Record<'type', unknown>).type === 'string'
9 )
10}

Callers

nothing calls this directly

Calls 1

isPlainObjectFunction · 0.85

Tested by

no test coverage detected