Fix bad typings in lib

These were missed or broken in the in the inital porting of lib to
TypeScript.
This commit is contained in:
Hornwitser committed 2023-08-12 19:59:44 +02:00
1 parent 6d523096ce
commit 5ec7c9f99c
7 files changed
+25 -39

No files matched your search

+4 -4
View File
@@ -9,10 +9,10 @@
import * as libData from "./data";
import * as libErrors from "./errors";
import type { Link } from "./link";
import type { Argv } from "yargs";
export type CommandHandler = (args: Record<string, unknown>, control: Link) => Promise<void>;
export type CommandDefinition = [string | string[], string?, Function?];
export type CommandHandler = (args: any, control: any) => Promise<void>;
export type CommandDefinition = [string | string[], string?, ((yargs: Argv) => void)?];
/**
* Represents a command that can be runned by clusterioctl
@@ -80,7 +80,7 @@ export class CommandTree {
* @param cmd.description -
* Descripton to provide for this command tree node.
*/
constructor({ name, alias, description }: { name: string, alias: string[], description: string }) {
constructor({ name, alias, description }: { name: string, alias?: string[], description: string }) {
if (typeof name !== "string") {
throw new Error("name must be a string");
}