[enzyme] fix broken usage of React.HTMLAttributes interface due to recent changes to [react] - #18269
Merged
weswigham merged 1 commit intoJul 21, 2017
Conversation
…ibutes interface introduced in @types/react-15.0.38
Member
|
types/enzyme/index.d.ts to authors (@MarianPalkus @NoHomey @jwbay @huhuanming @MartynasZilinskas Cap3 (account can't be detected)). Could you review this PR? Checklist
|
Contributor
|
👍 |
Contributor
|
Approved by a listed owner. PR appears ready to merge pending express review by a maintainer. |
NoHomey
approved these changes
Jul 21, 2017
MartynasZilinskas
approved these changes
Jul 21, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run lint package-name(ortscif notslint.jsonis present).If changing an existing definition:
tslint.jsoncontaining{ "extends": "dtslint/dt.json" }.The interface for
React.HTMLAttributeshas been broken apart into multiple interfaces (as of@types/react-15.0.38), each specific to a particular DOM element type (SelectHTMLAttributes,TdHTMLAttributes, etc), and the unified interface with all of the possible DOM element attributes is nowAllHTMLAttributes. When running.find()with a selector the returned object, which could be any element, has a type with the declared properties ofHTMLAttributeswhich is now limited to only those props in common between all DOM elements. By changing the interface imported from React as the "default" collection of attributes this PR preserves the generic return type of.find()and other functions.This is my first PR to DefinitelyTyped. I've tried to follow the template and README but if there's anything else I should do please let me know and I'll take care of it immediately.