From 008dcf0e7693b47d2079badad5ba038c0f9e82fe Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Mon, 4 Nov 2024 08:48:00 -0800 Subject: [PATCH] fix: Export required types from compat. (#645) This should just make this a little easier to use, only needing to import compat. --- packages/sdk/browser/src/compat/index.ts | 51 +++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/packages/sdk/browser/src/compat/index.ts b/packages/sdk/browser/src/compat/index.ts index 5ef1113be..73b0052a8 100644 --- a/packages/sdk/browser/src/compat/index.ts +++ b/packages/sdk/browser/src/compat/index.ts @@ -5,10 +5,59 @@ * Some code changes may still be required, for example {@link LDOptions} removes * support for some previously available options. */ -import { LDContext, LDOptions } from '..'; +import { + basicLogger, + EvaluationSeriesContext, + EvaluationSeriesData, + Hook, + HookMetadata, + IdentifySeriesContext, + IdentifySeriesData, + IdentifySeriesResult, + IdentifySeriesStatus, + LDContext, + LDContextCommon, + LDContextMeta, + LDEvaluationDetail, + LDEvaluationDetailTyped, + LDEvaluationReason, + LDFlagSet, + LDIdentifyOptions, + LDLogger, + LDLogLevel, + LDMultiKindContext, + LDOptions, + LDSingleKindContext, +} from '..'; import { LDClient } from './LDClientCompat'; import LDClientCompatImpl from './LDClientCompatImpl'; +export type { + LDClient, + LDFlagSet, + LDContext, + LDContextCommon, + LDContextMeta, + LDMultiKindContext, + LDSingleKindContext, + LDLogLevel, + LDLogger, + LDOptions, + LDEvaluationDetail, + LDEvaluationDetailTyped, + LDEvaluationReason, + LDIdentifyOptions, + Hook, + HookMetadata, + EvaluationSeriesContext, + EvaluationSeriesData, + IdentifySeriesContext, + IdentifySeriesData, + IdentifySeriesResult, + IdentifySeriesStatus, + basicLogger, +}; + /** * Creates an instance of the LaunchDarkly client. This version of initialization is for * improved backwards compatibility. In general the `initialize` function from the root packge