-
Notifications
You must be signed in to change notification settings - Fork 946
Implement functions and storage compat interop #4639
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
Conversation
|
3d2f0ec
to
7efda84
Compare
4d63855
to
883c334
Compare
Fixed merge conflicts and updated deprecated TS methods. |
883c334
to
019e945
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to convert StorageReference
related functions too.
packages/storage/exp/api.ts
Outdated
if (serviceOrRef instanceof Reference) { | ||
return refInternal(serviceOrRef as Reference, pathOrUrl); | ||
} else { | ||
return refInternal( | ||
getModularInstance(serviceOrRef) as StorageServiceInternal, | ||
pathOrUrl | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to check whether it's a StorageService
or Reference
. Both of them can be a compat instance, we can just call getModularInstance()
and pass the result to refInternal()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Modify functions and storage exp methods to accept compat instances.