-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require Node.js 8, add TypeScript definition (#9)
- Loading branch information
1 parent
1757b07
commit 976c7ba
Showing
5 changed files
with
112 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- '12' | ||
- '10' | ||
- '8' | ||
- '6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import yes = require('./yes.json'); | ||
import no = require('./no.json'); | ||
|
||
declare const yesNoWords: { | ||
/** | ||
Yes like words. | ||
@example | ||
``` | ||
import yesNoWords = require('yes-no-words'); | ||
yesNoWords.yes; | ||
//=> ['Absolutely', 'Ack', …] | ||
``` | ||
*/ | ||
readonly yes: Readonly<typeof yes>; | ||
|
||
/** | ||
No like words. | ||
@example | ||
``` | ||
import yesNoWords = require('yes-no-words'); | ||
yesNoWords.no; | ||
//=> ['Absolutely not', 'Ahhh nah', …] | ||
``` | ||
*/ | ||
readonly no: Readonly<typeof no>; | ||
|
||
/** | ||
Both yes and no like words. | ||
@example | ||
``` | ||
import yesNoWords = require('yes-no-words'); | ||
yesNoWords.all; | ||
//=> ['Absolutely', 'Absolutely not', 'Ack', …] | ||
``` | ||
*/ | ||
readonly all: Readonly<typeof yes> & Readonly<typeof no>; | ||
|
||
/** | ||
Random yes like words. | ||
@example | ||
``` | ||
import yesNoWords = require('yes-no-words'); | ||
yesNoWords.yesRandom(); | ||
//=> 'Yisss' | ||
``` | ||
*/ | ||
yesRandom(): string; | ||
|
||
/** | ||
Random no like words. | ||
@example | ||
``` | ||
import yesNoWords = require('yes-no-words'); | ||
yesNoWords.noRandom(); | ||
//=> 'Forget it' | ||
``` | ||
*/ | ||
noRandom(): string; | ||
|
||
/** | ||
Random yes or no like words. | ||
@example | ||
``` | ||
import yesNoWords = require('yes-no-words'); | ||
yesNoWords.allRandom(); | ||
//=> 'NEIN NEIN NEIN' | ||
``` | ||
*/ | ||
allRandom(): string; | ||
}; | ||
|
||
export = yesNoWords; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {expectType} from 'tsd'; | ||
import yesNoWords = require('.'); | ||
|
||
expectType<readonly string[]>(yesNoWords.yes); | ||
expectType<readonly string[]>(yesNoWords.no); | ||
expectType<readonly string[]>(yesNoWords.all); | ||
expectType<string>(yesNoWords.yesRandom()); | ||
expectType<string>(yesNoWords.noRandom()); | ||
expectType<string>(yesNoWords.allRandom()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters