ktmud opened a new pull request #13679: URL: https://github.com/apache/superset/pull/13679
### SUMMARY Feature flag typing [has been added to `@superset-ui/core`](https://github.com/apache-superset/superset-ui/pull/982), since there is now two copies of the same typing, sometimes it leads to TS errors when `npm link` is used or when in Jest. This change means all future feature flags used in the front-end have to be added to `@superset-ui` and go through the npm publish process. This is inconvenient but probably necessary to ensure correctness and consistency. Considering we are merging `superset-ui` to this repo soon, this should not be that much of a problem. cc @graceguo-supercat @villebro ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A ### TEST PLAN 1. `npm link ../superset-ui/packages/superset-ui-core` 2. `npm run type` 3. You will see this error in `master`: ``` node_modules/@superset-ui/core/src/utils/featureFlags.ts:53:5 - error TS2717: Subsequent property declarations must have the same type. Property 'featureFlags' must be of type 'FeatureFlagMap', but here has type 'FeatureFlagMap'. 53 featureFlags: FeatureFlagMap; ~~~~~~~~~~~~ src/featureFlags.ts:54:5 54 featureFlags: FeatureFlagMap; ~~~~~~~~~~~~ 'featureFlags' was also declared here. Found 1 error. ``` This PR should fix it. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [x] Has associated issue: https://github.com/apache-superset/superset-ui/pull/982 - [ ] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
