1.2.0 • Published 3 months ago
@types/mri v1.2.0
Installation
npm install --save @types/mri
Summary
This package contains type definitions for mri (https://github.com/lukeed/mri).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mri.
index.d.ts
// Type definitions for mri 1.1
// Project: https://github.com/lukeed/mri
// Definitions by: Brendan Forster <https://github.com/shiftkey>, Jed Fox <https://github.com/j-f1>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
export = mri;
declare function mri(args: ReadonlyArray<string>, options?: mri.Options): mri.Argv;
declare namespace mri {
const prototype: {
};
/** A string or array of strings */
type ArrayOrString = string | ReadonlyArray<string>;
/** An object with any keys whose values conform to a specific type */
interface DictionaryObject<T = any> {
[key: string]: T;
}
interface Options {
/** Additional aliases for specific flags */
alias?: DictionaryObject<ArrayOrString> | undefined;
/** A flag or array of flags whose values are boolean */
boolean?: ArrayOrString | undefined;
/** Default values for flags */
default?: DictionaryObject | undefined;
string?: ArrayOrString | undefined;
unknown?: ((flag: string) => void) | undefined;
}
interface Argv extends DictionaryObject {
/** anything after `--` or between options */
_: ReadonlyArray<string>;
}
}
Additional Details
- Last updated: Thu, 08 Jul 2021 18:51:01 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Brendan Forster, and Jed Fox.