From 40dc2228bbe159d809df1201db27bec81cd7c483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Galliat?= Date: Mon, 18 Sep 2017 16:57:29 -0400 Subject: [PATCH 1/2] docopt: fix export format --- types/docopt/docopt-tests.ts | 2 +- types/docopt/index.d.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/types/docopt/docopt-tests.ts b/types/docopt/docopt-tests.ts index 8d68355b27..fee97222ca 100644 --- a/types/docopt/docopt-tests.ts +++ b/types/docopt/docopt-tests.ts @@ -1,4 +1,4 @@ -import docopt = require("docopt"); +import { docopt } from "docopt"; var doc = ` Usage: diff --git a/types/docopt/index.d.ts b/types/docopt/index.d.ts index 8d8b23a0c0..24e19d5ea8 100644 --- a/types/docopt/index.d.ts +++ b/types/docopt/index.d.ts @@ -6,9 +6,7 @@ /** * @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 = docopt; +export function docopt(doc: string, options: DocoptOption): any; 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'] */ From b07f7501df27a075c1e9b912684b57bd5ff26caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Galliat?= Date: Mon, 25 Sep 2017 10:34:14 -0400 Subject: [PATCH 2/2] docopt: export DocoptOption --- types/docopt/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/docopt/index.d.ts b/types/docopt/index.d.ts index 24e19d5ea8..b70ff5d5fc 100644 --- a/types/docopt/index.d.ts +++ b/types/docopt/index.d.ts @@ -8,7 +8,7 @@ */ export function docopt(doc: string, options: DocoptOption): any; -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, /** (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. */