diff --git a/src/cli.ts b/src/cli.ts index 8c9c9ce..5f0e7f0 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -17,7 +17,7 @@ if (cmd && cmd[0] !== '-') { if (cmd == helpArg) { cmd = 'default' } else { - const aliases = { + const aliases: Record = { ls: 'list', rm: 'remove', mv: 'move', diff --git a/src/commands/exec.ts b/src/commands/exec.ts index 5ecc9da..9bf55ec 100644 --- a/src/commands/exec.ts +++ b/src/commands/exec.ts @@ -36,6 +36,6 @@ export default async (cfg: RootConfig) => { function injectEnv(cmd: string, env: object) { const envUnixRegex = /\$(\w+)/g return cmd.replace(envUnixRegex, (_, name) => { - return env[name] || '' + return (env as any)[name] || '' }) } diff --git a/src/core/printHelp.ts b/src/core/printHelp.ts index a007896..db41e64 100644 --- a/src/core/printHelp.ts +++ b/src/core/printHelp.ts @@ -23,7 +23,7 @@ export function printHelp(cmdPath: string) { close = opened.length && name == opened[0].name ? '/' : '' } if (close) { - const text = k[opened[0].name]( + const text = k[opened[0].name as 'red']( opened[0].text + rawHelp.slice(opened[0].index, match.index) ) lastIndex = match.index + match[0].length