From f5dafce88caf14cb3d4da4eb384b4603f2c2fca4 Mon Sep 17 00:00:00 2001 From: RA80533 <32469082+RA80533@users.noreply.github.com> Date: Sun, 21 Mar 2021 00:04:47 -0400 Subject: [PATCH] Use `Record` instead of `any` --- src/commands/compile.ts | 4 ++-- src/commands/hello.ts | 4 ++-- test/commands/compile.spec.ts | 4 ++-- test/commands/hello.spec.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 9b30f84..de01c2c 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -1,10 +1,10 @@ -import type { Arguments } from 'yargs' +import type { Arguments, Options } from 'yargs' import Eta = require('eta') import * as fs from 'fs' -export default (testing: boolean): [string, string, any, (args: Arguments) => string | void] => { +export default (testing: boolean): [string, string, Record, (args: Arguments) => string | void] => { return [ 'compile', 'compile template into function', diff --git a/src/commands/hello.ts b/src/commands/hello.ts index fcb15bd..35624c9 100644 --- a/src/commands/hello.ts +++ b/src/commands/hello.ts @@ -1,6 +1,6 @@ -import type { Arguments } from 'yargs' +import type { Arguments, Options } from 'yargs' -export default (testing: boolean): [string, string, any, (args: Arguments) => string | void] => { +export default (testing: boolean): [string, string, Record, (args: Arguments) => string | void] => { return [ 'hello', 'say hello', diff --git a/test/commands/compile.spec.ts b/test/commands/compile.spec.ts index 99099bb..63bd241 100644 --- a/test/commands/compile.spec.ts +++ b/test/commands/compile.spec.ts @@ -1,10 +1,10 @@ import parse = require('yargs-parser') -import type { Arguments } from 'yargs' +import type { Arguments, Options } from 'yargs' import CompileCommand from '../../src/commands/compile' -let command: [string, string, any, (args: Arguments) => void] +let command: [string, string, Record, (args: Arguments) => void] describe('HelloCommand', () => { it('should be a function', () => { diff --git a/test/commands/hello.spec.ts b/test/commands/hello.spec.ts index 2d26d3b..de73a06 100644 --- a/test/commands/hello.spec.ts +++ b/test/commands/hello.spec.ts @@ -1,10 +1,10 @@ import parse = require('yargs-parser') -import type { Arguments } from 'yargs' +import type { Arguments, Options } from 'yargs' import HelloCommand from '../../src/commands/hello' -let command: [string, string, any, (args: Arguments) => void] +let command: [string, string, Record, (args: Arguments) => void] describe('HelloCommand', () => { it('should be a function', () => {