import { isNumber , isString , or } from '@typed/logic' ; import { JsonRpcRequest } from '../../model' ; import { isNotification } from './isNotification' ; const isId = or ( isString , isNumber ) ; export function isRequest ( x ) { return isNotification ( x ) && isId ( ( x as JsonRpcRequest ) . id ) ; }