mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-25 16:11:24 +08:00
Merge pull request #19855 from valeriangalliat/docopt-export
Fix docopt export format
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import docopt = require("docopt");
|
||||
import { docopt } from "docopt";
|
||||
|
||||
var doc = `
|
||||
Usage:
|
||||
|
||||
6
types/docopt/index.d.ts
vendored
6
types/docopt/index.d.ts
vendored
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user