Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) => (
ToggledComponent: React.ComponentType
): React.ComponentType =>
// @ts-ignore
flowRight(
setDisplayName(wrapDisplayName(ToggledComponent, 'branchOnFeatureToggle')),
injectFeatureToggle(flag),
branchOnFeatureToggle(
UntoggledComponent,
DEFAULT_FLAG_PROP_KEY,
variation
)
)(ToggledComponent);
) => (WrappedComponent: ComponentType<$Diff>) =>
flowRight(
setDisplayName(wrapDisplayName(WrappedComponent, 'branchOnFeatureToggle')),
injectFeatureToggle(flag),
branchOnFeatureToggle(UntoggledComponent, DEFAULT_FLAG_PROP_KEY, variation)
)(WrappedComponent);
) => (Component: React.ComponentType) =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'branchOnFeatureToggle')),
injectFeatureToggle(flag),
branchOnFeatureToggle(UntoggledComponent, DEFAULT_FLAG_PROP_KEY, variation)
)(Component);
) => (WrappedComponent: ComponentType<$Diff>) =>
flowRight(
setDisplayName(wrapDisplayName(WrappedComponent, 'branchOnFeatureToggle')),
injectFeatureToggle(flag),
branchOnFeatureToggle(UntoggledComponent, DEFAULT_FLAG_PROP_KEY, variation)
)(WrappedComponent);