Skip to content

Commit 0749050

Browse files
committed
fix: remove type keys
1 parent c452029 commit 0749050

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

packages/react-sdk/src/index.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,33 @@ type ProviderContextType = {
139139

140140
const 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+
*/
142159
type 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
*/
157170
function 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
*/
297297
export type ReflagBootstrappedProps = Omit<
298298
InitOptionsBootstrapped,
299-
"bootstrappedFlags"
299+
"bootstrappedFlags" | keyof ReflagContext
300300
> &
301301
ReflagPropsBase & {
302302
/**

0 commit comments

Comments
 (0)