Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x 7x | export const commandKeywords = [ 'pause', 'goto', 'terminate', 'resume', 'debug' ]; export interface Command { keyword: (typeof commandKeywords)[number]; id: string; // a unique id for each command, to make sure each one get only performed once (even in polling mode) arguments: string[]; timestamp?: number; } export function isCommand(arg: any): arg is Command { return (arg.keyword !== undefined) && (arg.id !== undefined) && (arg.arguments !== undefined); } |