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 ts types #1628

Merged
merged 5 commits into from
Aug 13, 2021
Merged

Fix ts types #1628

merged 5 commits into from
Aug 13, 2021

Conversation

douglowder
Copy link
Contributor

Summary

Fix a large number of errors in TS type generation:

  • Update @types/react and @types/react-native
  • Make required changes in some of the components in src/elements

Test Plan

After the change, npm install succeeds in building the package.

@douglowder
Copy link
Contributor Author

@brentvatne this branch succeeds with npm install and npm test.

Copy link
Contributor

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add back extract for global properties

return (
<RNSVGCircle
ref={this.refMethod}
{...extract(this, props)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe this would break existing functionality -- "global properties" would no longer apply. eg: you're meant to be able to use fill with shapes/text. https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'll fix that and add some tests as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brentvatne I restored the extract(this, props) in the affected elements. Testing with the SVG examples looks good. I'll try to do some snapshot tests to verify that all SVGs are rendered the same as before.

@brentvatne
Copy link
Contributor

brentvatne commented Aug 13, 2021

any idea why the package-lock.json diff is so huge, given that we're just updating two @types packages?

(not a big deal, just being more conservative here since i don't work on this repo)

@douglowder
Copy link
Contributor Author

I had to delete it in order to run npm install. There were missing package files and conflicts if I didn't do that.

@brentvatne brentvatne merged commit 64c3c9f into software-mansion:develop Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants