inventoresed
Version:
Z-Wave driver written entirely in JavaScript/TypeScript
15 lines (12 loc) • 330 B
text/typescript
import { CommandClass } from "./CommandClass";
export interface ICommandClassContainer {
command: CommandClass;
}
/**
* Tests if the given message contains a CC
*/
export function isCommandClassContainer<T>(
msg: T | undefined,
): msg is T & ICommandClassContainer {
return (msg as any)?.command instanceof CommandClass;
}