PHP WebShell

Текущая директория: /opt/BitGoJS/modules/utxo-bin/src/args

Просмотр файла: format.ts

export type FormatTreeOrJson = 'tree' | 'json';

export const formatTreeOrJson = {
  type: 'string',
  choices: ['tree', 'json'] as const,
  default: 'tree',
  coerce(arg: string): 'tree' | 'json' {
    if (arg !== 'tree' && arg !== 'json') {
      throw new Error(`invalid format ${arg}`);
    }
    return arg;
  },
} as const;

Выполнить команду


Для локальной разработки. Не используйте в интернете!