Skip to content

Commit 9f8d2eb

Browse files
committed
fix: correct FlipFlag constructor options type in context provider
Pass entire config object to FlipFlag constructor instead of manually destructuring properties. This fixes TypeScript errors where pollingInterval and syncInterval were incorrectly treated as unknown properties.
1 parent 270a953 commit 9f8d2eb

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/context.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,7 @@ export function FlipFlagProvider(props: {
127127
WithConfig,
128128
"refreshIntervalMs" | "initialFlags" | "startClient"
129129
>;
130-
managerRef.current = new FlipFlag({
131-
publicKey: config.publicKey,
132-
privateKey: config.privateKey,
133-
apiUrl: config.apiUrl,
134-
configPath: config.configPath,
135-
ignoreMissingConfig: config.ignoreMissingConfig ?? true,
136-
pollingInterval: config.pollingInterval,
137-
syncInterval: config.syncInterval,
138-
});
130+
managerRef.current = new FlipFlag(config);
139131
}
140132
}
141133

0 commit comments

Comments
 (0)