-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed
Obj
suffix from class names; typings added
- Loading branch information
Showing
12 changed files
with
128 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage/** | ||
ts-node-*/** | ||
**/*.d.ts | ||
**/*-ts.js |
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,22 @@ | ||
// npm i -g eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard | ||
|
||
module.exports = { | ||
env: { node: true }, | ||
extends: 'standard', | ||
globals: { | ||
And: true, | ||
After: true, | ||
Before: true, | ||
Feature: true, | ||
Given: true, | ||
Scenario: true, | ||
Then: true, | ||
When: true | ||
}, | ||
rules: { | ||
indent: ['error', 2, { flatTernaryExpressions: true, MemberExpression: 0, SwitchCase: 1 }], | ||
'no-cond-assign': [2, 'except-parens'], | ||
'no-multi-spaces': ['error', { ignoreEOLComments: true }], | ||
'one-var-declaration-per-line': 2 | ||
} | ||
} |
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,6 +1,15 @@ | ||
*-ts.js | ||
|
||
*.tgz | ||
|
||
ts-node-* | ||
|
||
/coverage/ | ||
/node_modules/ | ||
|
||
/.nyc_output/ | ||
|
||
/.tags | ||
/.tern-project | ||
|
||
/package-lock.json |
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,4 @@ | ||
* | ||
!/index.js | ||
!/tsconfig.json | ||
!/lib/* |
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,3 +1,5 @@ | ||
{ | ||
"nodeArgs": ["--harmony"], | ||
"color": false, | ||
"nodeArgs": [], | ||
"reporter": "classic" | ||
} |
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,16 +1,37 @@ | ||
sudo: false | ||
|
||
language: node_js | ||
|
||
matrix: | ||
include: | ||
- node_js: "8" | ||
env: | ||
- TAP_RCFILE=./.taprc | ||
|
||
- node_js: "7" | ||
env: | ||
- TAP_RCFILE=./.taprc | ||
|
||
- node_js: "6" | ||
env: | ||
- TAP_RCFILE=./.taprc | ||
|
||
- node_js: "5" | ||
env: TAP_RCFILE=./.taprc | ||
env: | ||
- TAP_ARGS="--strict --harmony" | ||
- TAP_RCFILE=./.taprc | ||
|
||
- node_js: "4" | ||
env: TAP_RCFILE=./.taprc | ||
env: | ||
- TAP_ARGS="--strict --harmony" | ||
- TAP_RCFILE=./.taprc | ||
|
||
install: | ||
- npm install | ||
- if [ -n "$NPM_INSTALL_PACKAGES" ]; then npm install $NPM_INSTALL_PACKAGES; fi | ||
- npm install typescript tslint tslint-config-standard | ||
|
||
script: | ||
- npm run ${NPM_RUN_SCRIPT:-test} | ||
- npm run ${NPM_RUN_SCRIPT:-test} -- $TAP_ARGS | ||
- node_modules/.bin/tsc | ||
- node_modules/.bin/tslint -t stylish -p . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/// <reference types="node" /> | ||
|
||
export type TimerCallback = (...args: any[]) => void | ||
|
||
export class Immediate { | ||
readonly timer: NodeJS.Timer | ||
constructor (callback: TimerCallback, ...args: any[]) | ||
remove (): void | ||
} | ||
|
||
export class Interval { | ||
readonly timer: NodeJS.Timer | ||
constructor (delay: number, callback: TimerCallback, ...args: any[]) | ||
remove (): void | ||
} | ||
|
||
export class Timeout { | ||
readonly timer: NodeJS.Timer | ||
constructor (delay: number, callback: TimerCallback, ...args: any[]) | ||
remove (): void | ||
} | ||
|
||
export function immediate (callback: TimerCallback, ...args: any[]): Immediate | ||
export function interval (delay: number, callback: TimerCallback, ...args: any[]): Interval | ||
export function timeout (delay: number, callback: TimerCallback, ...args: any[]): Timeout |
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
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,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"noImplicitReturns": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"strict": true, | ||
"target": "ES2017" | ||
} | ||
} |
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,11 @@ | ||
{ | ||
"extends": [ | ||
"tslint:recommended", | ||
"tslint-config-standard" | ||
], | ||
"rules": { | ||
"max-line-length": false, | ||
"no-console": [true, "log"], | ||
"no-unused-variable": false | ||
} | ||
} |