+
Skip to content

refactor: replace const enum #2335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2025
Merged

refactor: replace const enum #2335

merged 2 commits into from
Jun 3, 2025

Conversation

arturovt
Copy link
Member

@arturovt arturovt commented Jun 3, 2025

Angular has a local compilation mode, intended for use with the TypeScript compiler option isolatedModules, which disallows importing const enum. In such cases, we replace it with an enum object.

Resolves #2331

arturovt added 2 commits June 3, 2025 13:16
ngular has a local compilation mode, intended for use with the TypeScript compiler option
`isolatedModules`, which disallows importing `const enum`. In such cases,
we replace it with an `enum` object.
@arturovt arturovt marked this pull request as ready for review June 3, 2025 10:17
@arturovt arturovt merged commit 66f9d76 into master Jun 3, 2025
3 of 6 checks passed
@arturovt arturovt deleted the refactor/enum branch June 3, 2025 10:17
Copy link

nx-cloud bot commented Jun 3, 2025

View your CI Pipeline Execution ↗ for commit 79f0c6d.

Command Status Duration Result
nx run-many --target=test --all --configuration... ✅ Succeeded 1m 13s View ↗
nx lint-types store ✅ Succeeded <1s View ↗
nx run-many --target=lint --all --configuration... ✅ Succeeded 2s View ↗
nx run-many --target=build --all ✅ Succeeded 1m 20s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-03 10:22:50 UTC

Copy link

pkg-pr-new bot commented Jun 3, 2025

Open in StackBlitz

@ngxs/devtools-plugin

npm i https://pkg.pr.new/@ngxs/devtools-plugin@2335

@ngxs/form-plugin

npm i https://pkg.pr.new/@ngxs/form-plugin@2335

@ngxs/hmr-plugin

npm i https://pkg.pr.new/@ngxs/hmr-plugin@2335

@ngxs/router-plugin

npm i https://pkg.pr.new/@ngxs/router-plugin@2335

@ngxs/storage-plugin

npm i https://pkg.pr.new/@ngxs/storage-plugin@2335

@ngxs/store

npm i https://pkg.pr.new/@ngxs/store@2335

@ngxs/websocket-plugin

npm i https://pkg.pr.new/@ngxs/websocket-plugin@2335

commit: 79f0c6d

Copy link

bundlemon bot commented Jun 3, 2025

BundleMon

Unchanged files (6)
Status Path Size Limits
fesm2022/ngxs-store.mjs
100.5KB 105KB / +0.5%
fesm2022/ngxs-store-internals.mjs
13.78KB 15KB / +0.5%
fesm2022/ngxs-store-internals-testing.mjs
10.47KB 13KB / +0.5%
fesm2022/ngxs-store-operators.mjs
6.05KB 7KB / +0.5%
fesm2022/ngxs-store-plugins.mjs
2.38KB 3KB / +0.5%
fesm2022/ngxs-store-experimental.mjs
574B 2KB / +0.5%

No change in files bundle size

Unchanged groups (1)
Status Path Size Limits
@ngxs/store(fesm2022)[gzip]
./fesm2022/*.mjs
32.56KB +1%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

bundlemon bot commented Jun 3, 2025

BundleMon (NGXS Plugins)

Unchanged files (9)
Status Path Size Limits
Plugins(fesm2022)[gzip]
storage-plugin/fesm2022/ngxs-storage-plugin.m
js
3.95KB +0.5%
Plugins(fesm2022)[gzip]
router-plugin/fesm2022/ngxs-router-plugin.mjs
2.96KB +0.5%
Plugins(fesm2022)[gzip]
hmr-plugin/fesm2022/ngxs-hmr-plugin.mjs
2.63KB +0.5%
Plugins(fesm2022)[gzip]
websocket-plugin/fesm2022/ngxs-websocket-plug
in.mjs
2.56KB +0.5%
Plugins(fesm2022)[gzip]
form-plugin/fesm2022/ngxs-form-plugin.mjs
2.46KB +0.5%
Plugins(fesm2022)[gzip]
devtools-plugin/fesm2022/ngxs-devtools-plugin
.mjs
2.14KB +0.5%
Plugins(fesm2022)[gzip]
logger-plugin/fesm2022/ngxs-logger-plugin.mjs
2.01KB +0.5%
Plugins(fesm2022)[gzip]
storage-plugin/fesm2022/ngxs-storage-plugin-i
nternals.mjs
955B +0.5%
Plugins(fesm2022)[gzip]
router-plugin/fesm2022/ngxs-router-plugin-int
ernals.mjs
457B +0.5%

No change in files bundle size

Unchanged groups (1)
Status Path Size Limits
All Plugins(fesm2022)[gzip]
./-plugin/fesm2022/.mjs
20.09KB +0.5%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

bundlemon bot commented Jun 3, 2025

BundleMon (Integration Projects)

Unchanged files (1)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng19/dist-integration/browser/mai
n-(hash).js
66.26KB +1%

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞[BUG]: const enum in @ngxs/storage-plugin causes TS2748 when using isolatedModules: true
1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载