Skip to content

refactoring observer options#826

Merged
Yuyz0112 merged 1 commit intomasterfrom
seq-id-plugin
Feb 5, 2022
Merged

refactoring observer options#826
Yuyz0112 merged 1 commit intomasterfrom
seq-id-plugin

Conversation

@Yuyz0112
Copy link
Member

@Yuyz0112 Yuyz0112 commented Feb 4, 2022

This PR does not have any functional change to the library, just a code refactoring to the rrweb's observer module.

Previously, we are repeating the type of parameters many times across the code base, after the refactoring, most parameters are using the same interface.

Also, we are changing the function parameters from multiple arguments into a single object argument and using destructing to access the properties, which reduces the mistakes of passing arguments with the same type in the wrong order.

Copy link
Member

@Juice10 Juice10 left a comment

Choose a reason for hiding this comment

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

This is great! So much cleaner, less repetitive and much easier to add something without having to change it in 4 or 5 places. Well done!

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