timing-provider
Version:
An implementation of the timing provider specification.
7 lines (6 loc) • 316 B
text/typescript
export const isPeerToPeerMessageTuple = <FirstValue, SecondValue>(
tuple: readonly [FirstValue, SecondValue]
): tuple is [
FirstValue,
SecondValue extends (...args: any[]) => any ? never : SecondValue extends Record<any, any> ? SecondValue : never
] => tuple[1] !== null && typeof tuple[1] === 'object';