mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
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:
1 parent
6d523096ce
commit
5ec7c9f99c
7 files changed
+25
-39
No files matched your search
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user