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/addStyle-args-type #28

Merged
merged 1 commit into from
Dec 27, 2021

Conversation

crimson968
Copy link
Contributor

When the second input parameter of the addStyle function is passed into an empty object, TS will report an error

const scrollStyles = momentum
        ? {
            'transition-duration': `${TRANSITION_DURATION}ms`,
            'transition-timing-function': BEZIER || ''
          }
        : {};

addStyle(handleRef.current, scrollStyles);

@SevenOutman
Copy link
Member

Hi @crimson968, could you provide the TS error message? I couldn't get an error with the snippet you provided, and didn't see how this edit can fix a potential error.

@crimson968
Copy link
Contributor Author

Hi @crimson968, could you provide the TS error message? I couldn't get an error with the snippet you provided, and didn't see how this edit can fix a potential error.

OK
12-27
12-27-2

@SevenOutman
Copy link
Member

I see, thanks!

@SevenOutman SevenOutman merged commit a68ac2a into rsuite:master Dec 27, 2021
@github-actions
Copy link

🎉 This PR is included in version 3.1.0 🎉

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.

None yet

2 participants