source: node_modules/redux/src/utils/isAction.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 300 bytes
RevLine 
[a762898]1import { Action } from '../types/actions'
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}
Note: See TracBrowser for help on using the repository browser.