export class CustomInMemoryProvider<
T extends Record<string, InMemoryFlagVariants<string>> = Record<string, InMemoryFlagVariants<string>>,
> extends TypedInMemoryProvider<T> {
constructor(flagConfiguration: InMemoryFlagConfiguration<T>) {
super(flagConfiguration);
// custom logic ...
}
override async putConfiguration<
U extends Record<string, InMemoryFlagVariants<string>> = Record<string, InMemoryFlagVariants<string>>,
>(flagConfiguration: InMemoryFlagConfiguration<U>) {
await super.putConfiguration(flagConfiguration);
// custom logic ...
}
}
The variants object for a flag in the TypedInMemoryProvider, containing all possible variants and their associated values.
Can be used in combination with InMemoryFlagConfiguration to preserve type-safety when extending the provider class.