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 | 1x 1x 4x 4x 1x 365x | const symbol = Symbol('Command Options'); export type CommandOptions<T> = T & { readonly [symbol]: true }; export function commandOptions<T>(options: T): CommandOptions<T> { (options as any)[symbol] = true; return options as CommandOptions<T>; } export function isCommandOptions<T>(options: any): options is CommandOptions<T> { return options && options[symbol] === true; } |