Skip to content

refactor(asset): unify subclass fields via parameter properties#95

Merged
krdlab merged 1 commit into
masterfrom
refactor/asset-parameter-properties
May 9, 2026
Merged

refactor(asset): unify subclass fields via parameter properties#95
krdlab merged 1 commit into
masterfrom
refactor/asset-parameter-properties

Conversation

@krdlab
Copy link
Copy Markdown
Owner

@krdlab krdlab commented May 9, 2026

Summary

Unify how HaxeAsset and NekoAsset declare their constructor-derived fields. The nightly field, previously declared as nightly = false; and assigned in the constructor body, is now a protected readonly parameter property — matching the existing force32 style on NekoAsset. No behavior change.

  • Drops the redundant default initializer and this.nightly = nightly assignment.
  • Tightens visibility from implicit public to protected readonly (no external readers exist).
  • Regenerates dist/index.js to keep the bundle in sync (CI enforces this).

Test plan

  • npm run build (tsc) passes
  • npm test passes (58/58 in asset.test.ts)
  • dist/ sync check passes (re-bundled via npm run dist)

@krdlab krdlab merged commit 3969f8e into master May 9, 2026
13 checks passed
@krdlab krdlab deleted the refactor/asset-parameter-properties branch May 9, 2026 09:09
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.

1 participant