Conversation
(probably invalid typescript syntax)
c5795ed to
257d42a
Compare
kentcdodds
left a comment
There was a problem hiding this comment.
I'd love it if @maddijoyce could review this as well.
|
@maddijoyce the typescript syntax is almost certainly wrong 😃 |
maddijoyce
left a comment
There was a problem hiding this comment.
The options for getByLabelText need a slight change.
typings/index.d.ts
Outdated
| ) => HTMLElement | null | ||
| getByLabelText: ( | ||
| id: TextMatch, | ||
| options?: {selector: string; TextMatchOptions}, |
There was a problem hiding this comment.
This should probably be
options?: { selector?: string; } & TextMatchOptions
There was a problem hiding this comment.
does that mean "all the keys from TextMatchOptions plus selector?"
There was a problem hiding this comment.
Yeah that's correct, it's a union type. I also made the selector optional, because it's * by default.
|
All looks good there now. As far as separating the types into their respective libraries, I'll put a PR through this week. |
|
The inline type signatures in the README for the wrapped methods don't have the new options yet, but maybe that can be a followup |
|
🎉 This PR is included in version 3.0.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
…her than globally (testing-library#77) You have to handle shims yourself if not using jest without this
chore: 🤖 update @babel/preset-env
Closes #76
What:
Update docs to match dom-testing-library v2 api
Why:
How:
Checklist: