Merge pull request #832 from skovhus/correct-flow-string-types
Flow: Use literal values for strings
This commit is contained in:
commit
7be16a4429
|
@ -123,7 +123,7 @@ export default class RemoteConfig extends ModuleBase {
|
|||
* "source" : OneOf<String>(remoteConfigSourceRemote|remoteConfigSourceDefault|remoteConfigSourceStatic)
|
||||
* }
|
||||
*/
|
||||
getValue(key: String) {
|
||||
getValue(key: string) {
|
||||
return getNativeModule(this)
|
||||
.getValue(key || '')
|
||||
.then(this._nativeValueToJS);
|
||||
|
@ -160,7 +160,7 @@ export default class RemoteConfig extends ModuleBase {
|
|||
* @param prefix: The key prefix to look for. If prefix is nil or empty, returns all the keys.
|
||||
* @returns {*|Promise.<Array<String>>}
|
||||
*/
|
||||
getKeysByPrefix(prefix?: String) {
|
||||
getKeysByPrefix(prefix?: string) {
|
||||
return getNativeModule(this).getKeysByPrefix(prefix);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ export default class RemoteConfig extends ModuleBase {
|
|||
* Sets default configs from plist for default namespace;
|
||||
* @param resource: The plist file name or resource ID
|
||||
*/
|
||||
setDefaultsFromResource(resource: String | number) {
|
||||
setDefaultsFromResource(resource: string | number) {
|
||||
getNativeModule(this).setDefaultsFromResource(resource);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ class EventEmitter {
|
|||
* }); // removes the listener if already registered
|
||||
*
|
||||
*/
|
||||
removeListener(eventType: String, listener) {
|
||||
removeListener(eventType: string, listener) {
|
||||
const subscriptions: ?[EmitterSubscription] = (this._subscriber.getSubscriptionsForType(eventType): any);
|
||||
if (subscriptions) {
|
||||
for (let i = 0, l = subscriptions.length; i < l; i++) {
|
||||
|
|
|
@ -282,7 +282,7 @@ export function typeOf(value: any): string {
|
|||
// * @param string
|
||||
// * @return {string}
|
||||
// */
|
||||
// export function capitalizeFirstLetter(string: String) {
|
||||
// export function capitalizeFirstLetter(string: string) {
|
||||
// return `${string.charAt(0).toUpperCase()}${string.slice(1)}`;
|
||||
// }
|
||||
|
||||
|
|
Loading…
Reference in New Issue