Skip to content

Commit

Permalink
feat(types): Add Typescript definitions. (#1676)
Browse files Browse the repository at this point in the history
Fixes: #1670

Copies over the existing types and tests from DefinitelyTyped.
Includes updates to bring them up to date with 11.0

Remove `getTotalDelay` and `shouldPersist`, as they're considered private.
  • Loading branch information
mastermatt committed Aug 20, 2019
1 parent 688b3e3 commit 2e56fb0
Show file tree
Hide file tree
Showing 9 changed files with 1,845 additions and 649 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
node_js: lts/*
env: linting
# Show prettier errors, even if lint fails.
script: run-s --silent --continue-on-error lint prettier:check
script: run-s --silent --continue-on-error lint prettier:check dtslint
- stage: test
node_js: 12
- node_js: 10
Expand Down
4 changes: 4 additions & 0 deletions lib/interceptor.js
Expand Up @@ -572,6 +572,10 @@ module.exports = class Interceptor {
return this
}

/**
* @private
* @returns {number}
*/
getTotalDelay() {
return this.delayInMs + this.delayConnectionInMs
}
Expand Down
4 changes: 4 additions & 0 deletions lib/scope.js
Expand Up @@ -239,6 +239,10 @@ class Scope extends EventEmitter {
return this
}

/**
* @private
* @returns {boolean}
*/
shouldPersist() {
return this._persist
}
Expand Down

0 comments on commit 2e56fb0

Please sign in to comment.