Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
11 lines
300 B
Plaintext
11 lines
300 B
Plaintext
import { Action } from '../types/actions'
|
|
import isPlainObject from './isPlainObject'
|
|
|
|
export default function isAction(action: unknown): action is Action<string> {
|
|
return (
|
|
isPlainObject(action) &&
|
|
'type' in action &&
|
|
typeof (action as Record<'type', unknown>).type === 'string'
|
|
)
|
|
}
|