Skip to content
Permalink
Browse files
fix(types): allow readonly arrays for data matcher in types (#2215)
  • Loading branch information
laurence-myers committed Jul 4, 2021
1 parent c852f79 commit 940f4b7912905523508ec15fadad8666e4b8c6cc
Showing with 3 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 types/index.d.ts
  3. +1 −1 types/tests.ts
@@ -1,4 +1,5 @@
.cache
.idea
.nyc_output
.vscode
coverage
@@ -52,7 +52,7 @@ declare namespace nock {
| RegExp
| DataMatcherArray
| DataMatcherMap
interface DataMatcherArray extends Array<DataMatcher> {}
interface DataMatcherArray extends ReadonlyArray<DataMatcher> {}
interface DataMatcherMap {
[key: string]: DataMatcher
}
@@ -40,7 +40,7 @@ inst = scope.post(str, objWithUndefinedValue)
inst = scope.post(str, str)
inst = scope.post(str, strings)
inst = scope.post(str, [num, str, regex])
inst = scope.post(str, [num, num, num])
inst = scope.post(str, [num, num, num] as const)
inst = scope.post(str, regex)
inst = scope.post(str, buffer)
inst = scope.post(str, true) // $ExpectError

0 comments on commit 940f4b7

Please sign in to comment.