Merge pull request #19855 from valeriangalliat/docopt-export

Fix docopt export format
This commit is contained in:
Benjamin Lichtman
2017-09-25 08:39:04 -07:00
committed by GitHub
2 changed files with 3 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import docopt = require("docopt");
import { docopt } from "docopt";
var doc = `
Usage:

View File

@@ -6,11 +6,9 @@
/**
* @param doc should be a string with the help message, written according to rules of the docopt language.
*/
declare function docopt(doc: string, options: DocoptOption): any;
export function docopt(doc: string, options: DocoptOption): any;
export = docopt;
interface DocoptOption {
export interface DocoptOption {
/** is an optional argument vector. It defaults to the arguments passed to your program (process.argv[2..]). You can also supply it with an array of strings, as with process.argv. For example: ['--verbose', '-o', 'hai.txt'] */
argv?: Array<string>,
/** (default:true) specifies whether the parser should automatically print the help message (supplied as doc) in case -h or --help options are encountered. After showing the usage-message, the program will terminate. If you want to handle -h or --help options manually (the same as other options), set help=false. */