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..b70ff5d5fc 100644 --- a/types/docopt/index.d.ts +++ b/types/docopt/index.d.ts @@ -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, /** (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. */