refactor(common): Convert HttpStatusCode enum to const object#53753
refactor(common): Convert HttpStatusCode enum to const object#53753JeanMeche wants to merge 1 commit intoangular:mainfrom
HttpStatusCode enum to const object#53753Conversation
|
in this PR #51670 (comment) it is said that esbuild does inline enums? I did find Your Twitt on this PR , and I understand that it is caused by Angualr CLI, but if thats the case probably rest of enums from #51670 could use the same treatment |
02be978 to
11e132c
Compare
|
Yes, this is likely a breaking change for the reason you're mentionning : we can't use it as a type anymore. |
11e132c to
5b67f9b
Compare
daf08f4 to
f83fe00
Compare
|
cc @frigus02 since you worked on the removal of the |
2aa538a to
b372463
Compare
|
Hm, I wasn't aware that you typically feed Angular CLI output to esbuild instead of the TS code directly. It makes sense, though. I see that esbuild explicitly calls out that optimizing the enum emit in JS files is not supported (https://esbuild.github.io/api/#minify-considerations), which is unfortunate but also understandable from their side. This PR seems like a reasonable solution to me. I'm not on the Angular team, though. My opinion doesn't really count 🙂. |
…nums in docs We have a couple of cases now (angular#53753 and angular#54414) where we're forced to redefine enums as object literals. These literals aren't rendered in the best way in the docs so these changes introduce a new `object-literal-as-enum` tag that we can use to mark them so they're treated for documentation purposes.
…nums in docs (#54487) We have a couple of cases now (#53753 and #54414) where we're forced to redefine enums as object literals. These literals aren't rendered in the best way in the docs so these changes introduce a new `object-literal-as-enum` tag that we can use to mark them so they're treated for documentation purposes. PR Close #54487
…nums in docs (#54487) We have a couple of cases now (#53753 and #54414) where we're forced to redefine enums as object literals. These literals aren't rendered in the best way in the docs so these changes introduce a new `object-literal-as-enum` tag that we can use to mark them so they're treated for documentation purposes. PR Close #54487
b372463 to
00bde2d
Compare
Enums are not inlined, this results in the 3Kb minified output for this single enum. This commit tends to optimise that.
00bde2d to
ef26ae4
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |








Enums are not inlined, this results in the 3Kb minified output for this single enum. This commit tends to optimise that.
A presubmit will tell us how breaking this change is.