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

refactor: Return ReactSDKClient interface from createInstance instead of implementation class #148

Merged
merged 7 commits into from
Feb 4, 2022

Conversation

shaharyar123
Copy link
Contributor

@shaharyar123 shaharyar123 commented Feb 1, 2022

Summary

Return type of createInstance was OptimizelyReactSDKClient which is the implementation class. Changed it to the ReactSDKClient interface instead.

Test Plan

  • Manually tested thoroughly.
  • All existing unit tests pass.

Issues

#49

Copy link
Contributor

@zashraf1985 zashraf1985 left a comment

Choose a reason for hiding this comment

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

LGTM! Great Work! This looks good and i am approving it but dont merge it yet. I will do some testing myself to be sure.

Comment on lines +21 to +24
interface MockedReactSDKClient extends ReactSDKClient {
client: optimizely.Client;
initialConfig: optimizely.Config;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is clever. Great Job!

@zashraf1985 zashraf1985 changed the title fix: Exported correct type from createInstance fix: Return ReactSDKClient interface from createInstance instead of implementation class Feb 4, 2022
@zashraf1985 zashraf1985 changed the title fix: Return ReactSDKClient interface from createInstance instead of implementation class refactor: Return ReactSDKClient interface from createInstance instead of implementation class Feb 4, 2022
@zashraf1985 zashraf1985 merged commit 864fdcc into master Feb 4, 2022
@zashraf1985 zashraf1985 deleted the sherry/export-OptimizelyReactSDKClient branch February 4, 2022 20:33
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.

3 participants