From 58d639e690fa350c3c3aa14b8d435f85fbbe6f65 Mon Sep 17 00:00:00 2001 From: MichaelVerdon Date: Fri, 24 Oct 2025 10:44:16 +0100 Subject: [PATCH 1/2] fix(remote config, web): More explicit interop types --- .../firebase_remote_config_interop.dart | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart b/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart index 445913d55442..efca26c7611e 100644 --- a/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart +++ b/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart @@ -21,7 +21,7 @@ external JSPromise activate(RemoteConfigJsImpl remoteConfig); @JS() @staticInterop -external JSPromise ensureInitialized(RemoteConfigJsImpl remoteConfig); +external JSPromise ensureInitialized(RemoteConfigJsImpl remoteConfig); @JS() @staticInterop @@ -29,7 +29,7 @@ external JSPromise fetchAndActivate(RemoteConfigJsImpl remoteConfig); @JS() @staticInterop -external JSPromise fetchConfig(RemoteConfigJsImpl remoteConfig); +external JSPromise fetchConfig(RemoteConfigJsImpl remoteConfig); @JS() @staticInterop @@ -66,11 +66,7 @@ external JSPromise setCustomSignals( @staticInterop external void setLogLevel(RemoteConfigJsImpl remoteConfig, JSString logLevel); -@JS('RemoteConfig') -@staticInterop -abstract class RemoteConfigJsImpl {} - -extension RemoteConfigJsImplExtension on RemoteConfigJsImpl { +extension type RemoteConfigJsImpl._(JSObject _) implements JSObject { external AppJsImpl get app; external SettingsJsImpl get settings; external set settings(SettingsJsImpl value); @@ -80,24 +76,15 @@ extension RemoteConfigJsImplExtension on RemoteConfigJsImpl { external JSString get lastFetchStatus; } -@JS() -@staticInterop -@anonymous -abstract class ValueJsImpl {} - -extension ValueJsImplExtension on ValueJsImpl { +extension type ValueJsImpl._(JSObject _) implements JSObject { external JSBoolean asBoolean(); external JSNumber asNumber(); external JSString asString(); external JSString getSource(); } -@JS() -@staticInterop -@anonymous -abstract class SettingsJsImpl {} -extension SettingsJsImplExtension on SettingsJsImpl { +extension type SettingsJsImpl._(JSObject _) implements JSObject { external JSNumber get minimumFetchIntervalMillis; external set minimumFetchIntervalMillis(JSNumber value); external JSNumber get fetchTimeoutMillis; @@ -121,12 +108,7 @@ extension ConfigUpdateObserverJsImpl on ConfigUpdateObserver { external JSAny get complete; } -@JS() -@staticInterop -@anonymous -abstract class ConfigUpdateJsImpl {} - -extension ConfigUpdateJsImplExtension on ConfigUpdateJsImpl { +extension type ConfigUpdateJsImpl._(JSObject _) implements JSObject { external JSSet getUpdatedKeys(); } From a1579cde66f825576412b9e2e77eef3b2c060cb5 Mon Sep 17 00:00:00 2001 From: MichaelVerdon Date: Fri, 24 Oct 2025 10:47:33 +0100 Subject: [PATCH 2/2] fix: more types --- .../lib/src/interop/firebase_remote_config_interop.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart b/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart index efca26c7611e..0efb10dc0130 100644 --- a/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart +++ b/packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config_interop.dart @@ -33,7 +33,7 @@ external JSPromise fetchConfig(RemoteConfigJsImpl remoteConfig); @JS() @staticInterop -external JSAny getAll(RemoteConfigJsImpl remoteConfig); +external JSObject getAll(RemoteConfigJsImpl remoteConfig); @JS() @staticInterop @@ -53,7 +53,7 @@ external ValueJsImpl getValue(RemoteConfigJsImpl remoteConfig, JSString key); @JS() @staticInterop -external JSPromise isSupported(); +external JSPromise isSupported(); @JS() @staticInterop