Skip to content

Commit 2e56fb0

Browse files
authored
feat(types): Add Typescript definitions. (#1676)
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.
1 parent 688b3e3 commit 2e56fb0

File tree

9 files changed

+1845
-649
lines changed

9 files changed

+1845
-649
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
node_js: lts/*
3333
env: linting
3434
# Show prettier errors, even if lint fails.
35-
script: run-s --silent --continue-on-error lint prettier:check
35+
script: run-s --silent --continue-on-error lint prettier:check dtslint
3636
- stage: test
3737
node_js: 12
3838
- node_js: 10

lib/interceptor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ module.exports = class Interceptor {
572572
return this
573573
}
574574

575+
/**
576+
* @private
577+
* @returns {number}
578+
*/
575579
getTotalDelay() {
576580
return this.delayInMs + this.delayConnectionInMs
577581
}

lib/scope.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ class Scope extends EventEmitter {
239239
return this
240240
}
241241

242+
/**
243+
* @private
244+
* @returns {boolean}
245+
*/
242246
shouldPersist() {
243247
return this._persist
244248
}

0 commit comments

Comments
 (0)