This experimental codemod replaces function calls in a for of await functionName(featureFlagName), where:
functionNameis the target function name (default:isFlagEnabled),featureFlagNameis the target feature flag name.
You need to pass these arguments using the Codemod Arguments' settings or using the Codemod CLI.
Example
Before:
tsxconst [a, b] = await Promise.all([ Promise.resolve("a"), isFlagEnabled("featureFlag"), ]); const x = b && c; const y = <A b={b} />;
After:
tsxconst a = await Promise.resolve("a"); const x = c; const y = <A b={true} />;