/
alt3rmann
/
graphql-engine
Обзор
Документация
Войти
/
alt3rmann
/
graphql-engine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
cli-ext/src/services/sdl/command.ts
17 строк
468 B
Aleksandra Sikora
cli-ext: add typescript support (#4820)
02 июн 2020, 17:11
Не верифицирован
02 июн 2020, 17:11
90dea98
Код
Авторство
О чём код?
const toCommand = require('./to/command'); const fromCommand = require('./from/command'); const command = (subCommands: string[]) => { const rootSubCommand = subCommands[0]; switch (rootSubCommand) { case 'to': const toSubCommands = subCommands.slice(1); return toCommand(toSubCommands); case 'from': const fromSubCommands = subCommands.slice(1); return fromCommand(fromSubCommands); default: } }; module.exports = command;