mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Adjust the type-definition according to dtslint
This commit is contained in:
9
types/inquirer-npm-name/index.d.ts
vendored
9
types/inquirer-npm-name/index.d.ts
vendored
@@ -1,4 +1,11 @@
|
||||
// Type definitions for inquirer-npm-name 3.0
|
||||
// Project: https://github.com/SBoudrias/inquirer-npm-name
|
||||
// Definitions by: manuth <https://github.com/manuth>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Inquirer, Answers, Question } from "inquirer";
|
||||
|
||||
declare function askName(name: string | Question, inquirer: Inquirer): Promise<{ [key: string]: string }>;
|
||||
export = askName;
|
||||
export = askName;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import inquirer = require("inquirer");
|
||||
import askName = require("inquirer-npm-name");
|
||||
|
||||
(async () => {
|
||||
(await askName("name", inquirer)).name.toUpperCase();
|
||||
})();
|
||||
// $ExpectType Promise<{ [key: string]: string; }>
|
||||
askName("moduleName", inquirer);
|
||||
|
||||
// $ExpectType Promise<{ [key: string]: string; }>
|
||||
askName(
|
||||
{
|
||||
name: "moduleName",
|
||||
message: "Whar's the name of your module?"
|
||||
},
|
||||
inquirer);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user