Skip to content

Commit

Permalink
update types with completeCmd + minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
int0h committed Sep 16, 2019
1 parent eed960c commit 356406d
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,22 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.0

/**
* Install option
*
* @param name is a name of the cli command
* @param completer Somethings, you want to complete another program that's where the `completer` option might come handy.
*/
/// <reference types="node" />

export type InstallOption = {
/** name is a name of the cli command */
name: string;
/** Somethings, you want to complete another program that's where the `completer` option might come handy. */
completer: string;
/** the first argument to be passed to a completer by shell script. The default value is `completion`. */
completeCmd?: string;
};

/**
* Uninstall option
*
* @param name is a name of the cli command
*/
export type UninstallOption = {
/** name is a name of the cli command */
name: string;
};

/**
* This type represent object (Json object)
*/
export type Json = {
[key: string]: string;
};

/**
* Tabtab environment data that return from {@link parseEnv} method
*
Expand Down Expand Up @@ -123,7 +112,7 @@ export function uninstall(option: UninstallOption): Promise<void>;
* @example
* const env = tabtab.parseEnv(process.env);
*/
export function parseEnv(env: Json): TabtabEnv;
export function parseEnv(env: typeof process.env): TabtabEnv;

/**
* Helper to normalize String and Objects when logging out.
Expand Down

0 comments on commit 356406d

Please sign in to comment.