Flatten the Djblets.Config.* namespace.
Review Request #13849 — Created May 10, 2024 and submitted
TypeScript gets unhappy if you're mixing what it considers to be a
"namespace" with ES modules, and can end up discarding a lot of type
checking as a result. Their recommendation is that everything these days
should be modules.Before we switched to modules, we were starting to try to namespace our
code more thoroughly, and therefore everything inside the Djblets
configForms bundle was namespaced intoDjblets.Config.*
.This change makes it so we export two names for each top-level item,
Djblets.Config.*
andDjblets.Config*
. This allows us to import the
ConfigForms*
names fromdjblets/configForms
without getting any warnings.
- Ran js-tests.
- Verified that the compiled configForms index.js file only had one copy
of the definitions for the classes but was exporting them under both
names.
Summary | ID |
---|---|
3c7425c5ef7d2924195d410d7ffe8cad82bccbf5 |
Description | From | Last Updated |
---|---|---|
This should be in the expanded, one-type-per-line form. |
chipx86 |
- Change Summary:
-
Switch to
ConfigForms*
for names. - Description:
-
TypeScript gets unhappy if you're mixing what it considers to be a
"namespace" with ES modules, and can end up discarding a lot of type checking as a result. Their recommendation is that everything these days should be modules. Before we switched to modules, we were starting to try to namespace our
code more thoroughly, and therefore everything inside the Djblets configForms bundle was namespaced into Djblets.Config.*
.This change makes it so we export two names for each top-level item,
Djblets.Config.*
andDjblets.Config*
. This allows us to import the~ Config*
names fromdjblets/configForms
without getting any warnings.~ ConfigForms*
names fromdjblets/configForms
without getting any warnings. - Commits:
-
Summary ID 5f1a96e33fa1a97588fec883fcbd01cc462970cb 3c7425c5ef7d2924195d410d7ffe8cad82bccbf5 - Diff:
-
Revision 2 (+254 -170)