mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
node-getopt: Fix type of create
This commit is contained in:
2
types/node-getopt/index.d.ts
vendored
2
types/node-getopt/index.d.ts
vendored
@@ -122,7 +122,7 @@ declare class Getopt {
|
||||
* equals new Getopt(options)
|
||||
* @param options
|
||||
*/
|
||||
static create(options: string[]): Getopt;
|
||||
static create(options: string[][]): Getopt;
|
||||
}
|
||||
|
||||
export = Getopt;
|
||||
|
||||
@@ -34,7 +34,7 @@ function help() {
|
||||
|
||||
function onedragon() {
|
||||
// examples/onedragon.js
|
||||
var opt = require('node-getopt').create([
|
||||
var opt = Getopt.create([
|
||||
['s' , '' , 'short option.'],
|
||||
['' , 'long' , 'long option.'],
|
||||
['S' , 'short-with-arg=ARG' , 'option with argument'],
|
||||
@@ -52,7 +52,7 @@ function onedragon() {
|
||||
|
||||
function online(){
|
||||
// node-getopt oneline example.
|
||||
var opt = require('..').create([
|
||||
var opt = Getopt.create([
|
||||
['s' , '' , 'short option.'],
|
||||
['' , 'long' , 'long option.'],
|
||||
['S' , 'short-with-arg=ARG' , 'option with argument'],
|
||||
|
||||
Reference in New Issue
Block a user