11"use client" ;
22
3- import type { ClientCacheState , Config , EvaluationDetails , HookEvents , IAutoPollOptions , IConfigCatClient , IConfigCatClientSnapshot , ILazyLoadingOptions , IManualPollOptions , RefreshResult , SettingKeyValue , SettingTypeOf , SettingValue , User } from "@configcat/sdk" ;
3+ import type { ClientCacheState , Config , EvaluationDetails , HookEvents , IAutoPollOptions , IConfigCatClient , IConfigCatClientSnapshot , ILazyLoadingOptions , IManualPollOptions , IUser , RefreshResult , SettingKeyValue , SettingTypeOf , SettingValue } from "@configcat/sdk" ;
44import { Internals , LocalStorageConfigCache , PollingMode , XmlHttpRequestConfigFetcher } from "@configcat/sdk" ;
55import React , { Component , type PropsWithChildren } from "react" ;
66import { type ConfigCatContextData , ensureConfigCatContext } from "./ConfigCatContext" ;
@@ -124,19 +124,19 @@ export function createConfigCatProviderError(methodName: string, providerId?: st
124124class ConfigCatClientStub implements IConfigCatClient {
125125 readonly isOffline = true ;
126126
127- getValueAsync < T extends SettingValue > ( _key : string , _defaultValue : T , _user ?: User ) : Promise < SettingTypeOf < T > > {
127+ getValueAsync < T extends SettingValue > ( _key : string , _defaultValue : T , _user ?: IUser ) : Promise < SettingTypeOf < T > > {
128128 throw serverContextNotSupported ( ) ;
129129 }
130- getValueDetailsAsync < T extends SettingValue > ( _key : string , _defaultValue : T , _user ?: User ) : Promise < EvaluationDetails < SettingTypeOf < T > > > {
130+ getValueDetailsAsync < T extends SettingValue > ( _key : string , _defaultValue : T , _user ?: IUser ) : Promise < EvaluationDetails < SettingTypeOf < T > > > {
131131 throw serverContextNotSupported ( ) ;
132132 }
133133 getAllKeysAsync ( ) : Promise < string [ ] > {
134134 throw serverContextNotSupported ( ) ;
135135 }
136- getAllValuesAsync ( _user ?: User ) : Promise < SettingKeyValue < SettingValue > [ ] > {
136+ getAllValuesAsync ( _user ?: IUser ) : Promise < SettingKeyValue < SettingValue > [ ] > {
137137 throw serverContextNotSupported ( ) ;
138138 }
139- getAllValueDetailsAsync ( _user ?: User ) : Promise < EvaluationDetails < SettingValue > [ ] > {
139+ getAllValueDetailsAsync ( _user ?: IUser ) : Promise < EvaluationDetails < SettingValue > [ ] > {
140140 throw serverContextNotSupported ( ) ;
141141 }
142142 getKeyAndValueAsync ( _variationId : string ) : Promise < SettingKeyValue < SettingValue > | null > {
@@ -151,7 +151,7 @@ class ConfigCatClientStub implements IConfigCatClient {
151151 snapshot ( ) : IConfigCatClientSnapshot {
152152 throw serverContextNotSupported ( ) ;
153153 }
154- setDefaultUser ( _defaultUser : User ) : void {
154+ setDefaultUser ( _defaultUser : IUser ) : void {
155155 throw serverContextNotSupported ( ) ;
156156 }
157157 clearDefaultUser ( ) : void {
0 commit comments