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

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 300 bytes
Line 
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.