I'm working with a code snippet that looks like this:
import { ApolloClient } from '@apollo/client';
type F = typeof FeaturesManager.features.warrants
export class FeaturesManager {
static features = {
warrants: Symbol('WARRANTS'),
};
client: ApolloClient<{}>;
constructor({ client }: { client: ApolloClient<{}> }) {
this.client = client;
}
getFeatureAvailability(feature: F) {
}
}
new FeaturesManager(new ApolloClient()).getFeatureAvailability(FeaturesManager.features.warrants)
Whenever I update FeaturesManager.features
, I also have to change F
. What's the best way to address this issue in the code?
UPDATE