Remove redundant @param types, and tidy.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by John Gee · committed by John Gee · parent 3baa16f · Browse files · 1 file·+27 added−44 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+27 added−44 removed
- other:+27 added−44 removed
Provenance
- Commit
f119fc7- Tree
c03ba64- Author
John Gee <john@ruru.gen.nz>- Committer
John Gee <john@ruru.gen.nz>- Parent
3baa16f
1 file changed+27 added−44 removed
modified:typings/index.d.ts+27 added-44 removed
1-// Type definitions for commander 2.112-// Project: https://github.com/visionmedia/commander.js3-// Definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>4-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped1+// Type definitions for commander2+// Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>3 4 ///<reference types="node" />5 6 declare namespace commander {29 unmodified lines36 * This method auto-registers the "-V, --version" flag37 * which will print the version number when passed.38 * 39 * You can optionally supply the flags and description to override the defaults.42- *40 */41 version(str: string, flags?: string, description?: string): Command;42 43 /**39 unmodified lines83 84 /**85 * Define argument syntax for the top-level command.86 *90- * @param {string} desc91- * @returns {Command} for chaining87+ * @returns Command for chaining88 */89 arguments(desc: string): Command;90 91 /**92 * Parse expected `args`.93 *94 * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.95 *100- * @param {string[]} args101- * @returns {Command} for chaining96+ * @returns Command for chaining97 */98 parseExpectedArgs(args: string[]): Command;99 100 /**11 unmodified lines112 * .action(function() {113 * // output help here114 * });115 *121- * @param {(...args: any[]) => void} fn122- * @returns {Command} for chaining116+ * @returns Command for chaining117 */118 action(fn: (...args: any[]) => void): Command;119 120 /**35 unmodified lines156 *157 * // optional argument158 * program.option('-c, --cheese [type]', 'add cheese [marble]');159 *166- * @param {string} flags167- * @param {string} [description]168- * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default169- * @param {*} [defaultValue]170- * @returns {Command} for chaining160+ * @returns Command for chaining161 */162 option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command;163 option(flags: string, description?: string, defaultValue?: any): Command;164 8 unmodified lines173 174 /**175 * Allow unknown options on the command line.176 *187- * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options.188- * @returns {Command} for chaining177+ * @param [arg] if `true` or omitted, no error will be thrown for unknown options.178+ * @returns Command for chaining179 */180 allowUnknownOption(arg?: boolean): Command;181 182 /**183 * Parse `argv`, settings options and invoking commands when defined.184 *195- * @param {string[]} argv185 * @returns {Command} for chaining186 */187 parse(argv: string[]): Command;188 189 /**190 * Parse options from `argv` returning `argv` void of these options.202- *203- * @param {string[]} argv204- * @returns {ParseOptionsResult}191 */192 parseOptions(argv: string[]): commander.ParseOptionsResult;193 194 /**195 * Return an object containing options as key-value pairs210- *211- * @returns {{[key: string]: any}}196 */197 opts(): { [key: string]: any };198 199 /**216- * Set the description to `str`.217- *218- * @param {string} str219- * @param {{[argName: string]: string}} argsDescription220- * @return {(Command | string)}200+ * Set the description.201+ * 202+ * @returns Command for chaining203 */204 description(str: string, argsDescription?: {[argName: string]: string}): Command;205+ /**206+ * Get the description.207+ */208 description(): string;209 210 /**211 * Set an alias for the command.227- *228- * @param {string} alias229- * @return {(Command | string)}212+ * 213+ * @returns Command for chaining214 */215 alias(alias: string): Command;216+ /**217+ * Get alias for the command.218+ */219 alias(): string;220 221 /**235- * Set or get the command usage.236- *237- * @param {string} str238- * @return {(Command | string)}222+ * Set the command usage.223+ * 224+ * @returns Command for chaining225 */226 usage(str: string): Command;227+ /**228+ * Get the command usage.229+ */230 usage(): string;231 232 /**233 * Set the name of the command.245- *246- * @param {string} str247- * @return {Command}234+ * 235+ * @returns Command for chaining236 */237 name(str: string): Command;250-238 /**239 * Get the name of the command.253- *254- * @return {string}240 */241 name(): string;242 243 /**244 * Output help information for this command.245 *246 * When listener(s) are available for the helpLongFlag247 * those callbacks are invoked.263- * 264- * @param {(str: string) => string} [cb]248 */249 outputHelp(cb?: (str: string) => string): void;250 251 /**34 unmodified lines