Getter methods on web plugin return wrong types
Describe the bug
Web version getter methods return different type (e.g. Promise<string|int|boolean>) than native versions (e.g. Promise<RCReturnData>).
To Reproduce
- Call
FirebaseRemoteConfig.getStringon web version => returnsPromise<string> - Call
FirebaseRemoteConfig.getStringon iOS version => returnsPromise<RCReturnData>
Expected behavior
Return the same type regardless the platform.
FirebaseRemoteConfig.getString should return Promise
It should return a Promise<type> with a consistent type and not Promise<string> on one platform and Promise<RCReturnData> on another...
@mic345 Sorry for my first msg. It was badly formatted, and gh removed the <string> part...
But yes, that's what I'm saying, and specificaly: the Promise<type>, should NOT be Promise<RCReturnData> when the method is getString...
=> It should be Promise<String> for getString, and Promise<boolean> for getBoolean, etc...
Even getValue could use generic to return the type.
getValue<T>(key: string): Promise<T>;
Also, there is no use for passing an object in getter. Instead of getBoolean({key: string}): Promise<boolean>;, method should be getBoolean(key: string): Promise<boolean>; (same for others getter)
And you are right, it should be consistent for every platform, be it WEB or Android, or IOS.
Sorry for my first msg.
No worries 😊