Skip to content

fix(types): allow readonly arrays for data matcher in types#2215

Merged
gr2m merged 2 commits intonock:mainfrom
laurence-myers:issue-2174-readonly-array-data-matcher
Jul 4, 2021
Merged

fix(types): allow readonly arrays for data matcher in types#2215
gr2m merged 2 commits intonock:mainfrom
laurence-myers:issue-2174-readonly-array-data-matcher

Conversation

@laurence-myers
Copy link
Copy Markdown
Contributor

@laurence-myers laurence-myers commented Jul 3, 2021

fixes #2174

Changes the definition of DataMatcherArray, from this:

interface DataMatcherArray extends Array<DataMatcher> {}

To this:

interface DataMatcherArray extends ReadonlyArray<DataMatcher> {}

Refer to #2174 for details.

I also added .idea to .gitignore, to ignore project files generated by IntelliJ IDEA. (I assume that's okay, since .gitignore already lists .vscode.)

@laurence-myers
Copy link
Copy Markdown
Contributor Author

I wasn't sure which branch to target. The contributing guide says generally to merge to beta, but that branch doesn't seem to exist (anymore).

@gr2m
Copy link
Copy Markdown
Member

gr2m commented Jul 4, 2021

The contributing guide says generally to merge to beta

We should update the contributing guide, we wrote it at a time of big refactoring when beta was the branch we collaborated on, but that's done now

@gr2m gr2m changed the title Fix issue #2174: allow readonly arrays for data matcher in types fix(types): allow readonly arrays for data matcher in types Jul 4, 2021
@gr2m gr2m merged commit 940f4b7 into nock:main Jul 4, 2021
@gr2m
Copy link
Copy Markdown
Member

gr2m commented Jul 4, 2021

@all-contributors add @laurence-myers for code

@allcontributors
Copy link
Copy Markdown
Contributor

@gr2m

I've put up a pull request to add @laurence-myers! 🎉

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 4, 2021

🎉 This PR is included in version 13.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TypeScript] Can't match a request body if it contains a readonly array

2 participants