@@ -139,20 +139,33 @@ type ProviderContextType = {
139139
140140const ProviderContext = createContext < ProviderContextType | null > ( null ) ;
141141
142+ /**
143+ * Base props for the ReflagProvider and ReflagBootstrappedProvider.
144+ * @internal
145+ */
146+ export type ReflagPropsBase = {
147+ children ?: ReactNode ;
148+ loadingComponent ?: ReactNode ;
149+ debug ?: boolean ;
150+ newReflagClient ?: (
151+ ...args : ConstructorParameters < typeof ReflagClient >
152+ ) => ReflagClient ;
153+ } ;
154+
155+ /**
156+ * Options for the useReflagProvider hook.
157+ * @internal
158+ */
142159type UseReflagProviderOptions = {
143- config : Omit < InitOptions , keyof ReflagContext > & {
144- debug ?: boolean ;
145- newReflagClient ?: (
146- ...args : ConstructorParameters < typeof ReflagClient >
147- ) => ReflagClient ;
148- } ;
160+ config : Omit < InitOptions , keyof ReflagContext > & ReflagPropsBase ;
149161 context ?: ReflagContext ;
150162 bootstrappedFlags ?: FetchedFlags ;
151163 isBootstrapped ?: boolean ;
152164} ;
153165
154166/**
155167 * Shared hook that handles the common logic for both ReflagProvider and ReflagBootstrappedProvider
168+ * @internal
156169 */
157170function useReflagProvider ( {
158171 config,
@@ -247,23 +260,10 @@ function useReflagProvider({
247260 ) ;
248261}
249262
250- /**
251- * Base props for the ReflagProvider and ReflagBootstrappedProvider.
252- * @internal
253- */
254- export type ReflagPropsBase = {
255- children ?: ReactNode ;
256- loadingComponent ?: ReactNode ;
257- debug ?: boolean ;
258- newReflagClient ?: (
259- ...args : ConstructorParameters < typeof ReflagClient >
260- ) => ReflagClient ;
261- } ;
262-
263263/**
264264 * Props for the ReflagProvider.
265265 */
266- export type ReflagProps = InitOptions & ReflagContext & ReflagPropsBase ;
266+ export type ReflagProps = InitOptions & ReflagPropsBase ;
267267
268268/**
269269 * Provider for the ReflagClient.
@@ -296,7 +296,7 @@ export function ReflagProvider({
296296 */
297297export type ReflagBootstrappedProps = Omit <
298298 InitOptionsBootstrapped ,
299- "bootstrappedFlags"
299+ "bootstrappedFlags" | keyof ReflagContext
300300> &
301301 ReflagPropsBase & {
302302 /**
0 commit comments