Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Jul 4, 2021
Merged

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

merged 2 commits into from Jul 4, 2021

Conversation

laurence-myers
Copy link
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
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
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
Member

gr2m commented Jul 4, 2021

@all-contributors add @laurence-myers for code

@allcontributors
Copy link
Contributor

@gr2m

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

@github-actions
Copy link

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