Fix typings, because compile:cli fails with errors

This commit is contained in:
Siarhei Bautrukevich 2019-02-04 09:39:55 +03:00
parent d197c0feda
commit 09139766bd

View File

@ -61,15 +61,17 @@ YargsParser.command(
return yargs; return yargs;
}, },
async argv => { async argv => {
const port = Number(argv.port);
const spec = String(argv.spec);
const config = { const config = {
ssr: argv.ssr, ssr: Boolean(argv.ssr),
watch: argv.watch, watch: Boolean(argv.watch),
templateFileName: argv.template, templateFileName: String(argv.template),
redocOptions: argv.options || {}, redocOptions: argv.options || {},
}; };
try { try {
await serve(argv.port, argv.spec, config); await serve(port, spec, config);
} catch (e) { } catch (e) {
handleError(e); handleError(e);
} }
@ -108,10 +110,10 @@ YargsParser.command(
async argv => { async argv => {
const config = { const config = {
ssr: true, ssr: true,
output: argv.o, output: String(argv.o),
cdn: argv.cdn, cdn: Boolean(argv.cdn),
title: argv.title, title: String(argv.title),
templateFileName: argv.template, templateFileName: String(argv.template),
redocOptions: argv.options || {}, redocOptions: argv.options || {},
}; };