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

Bug: Updating typing of playSegments method #560

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Bug: Updating typing of playSegments method #560

merged 1 commit into from
Sep 2, 2024

Conversation

brandondv
Copy link
Contributor

@brandondv brandondv commented Aug 16, 2024

The typing of playSegments is slightly off currently. So hereby a small PR to fix that :)

  • expected usage according to docs: [1, 10] / [[1, 10]] / [[1, 10], [11, 20], ... ]
  • actual usage according to typings: [[1, 10], [11, 20]] / [[1, 10]]

Both types work and are correct according to https://github.com/airbnb/lottie-web/blob/0d658b34c40d4e81eafdccbf698815346454a899/index.d.ts#L91

Summary by Sourcery

Update the typing of the playSegments method to align with expected usage, allowing it to accept either a single AnimationSegment or an array of AnimationSegments.

Enhancements:

  • Update the typing of the playSegments method to accept both a single AnimationSegment and an array of AnimationSegments.

@brandondv brandondv requested a review from megasanjay as a code owner August 16, 2024 15:44
Copy link

vercel bot commented Aug 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vue3-lottie ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 16, 2024 3:45pm

Copy link

sourcery-ai bot commented Aug 16, 2024

Reviewer's Guide by Sourcery

This pull request updates the typing of the playSegments method in the vue3-lottie component. The change modifies the type definition of the segments parameter to allow for more flexible input, aligning it with the expected usage according to the documentation and the actual implementation in the lottie-web library.

File-Level Changes

Files Changes
packages/vue3-lottie/src/vue3-lottie.vue Updated the type definition of the segments parameter in the playSegments method from AnimationSegment[] to `AnimationSegment

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @brandondv - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@brandondv brandondv changed the title Chore: Updating typing of playSegments method Bug: Updating typing of playSegments method Aug 16, 2024
@megasanjay
Copy link
Owner

Thank you for the PR. Will release soon

@megasanjay megasanjay merged commit ca059a7 into megasanjay:main Sep 2, 2024
6 checks passed
@brandondv brandondv deleted the patch-1 branch November 6, 2024 15:05
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.

2 participants