Skip to content

[architecture] extract class field loading from member.ts#754

Merged
cs01 merged 3 commits intomainfrom
decompose/extract-class-field-loading
Apr 27, 2026
Merged

[architecture] extract class field loading from member.ts#754
cs01 merged 3 commits intomainfrom
decompose/extract-class-field-loading

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 27, 2026

Before

member.ts is 3588 lines with class field loading logic (loadFieldValue, loadPrimitiveFieldValue, loadCollectionFieldValue, loadFallbackFieldValue, storeInterfaceMetadata, resolveConcreteClassByFields, findClassStructurallyMatchingInterface) embedded as class methods.

After

No user-facing change. Internal refactor only.

member.ts reduced to 3311 lines (-277). Extracted 7 functions into class-field-loading.ts (331 lines) as free functions taking ctx parameter. Class methods become thin delegators.

Description

First extraction PR for #727 (decompose god files). Pure mechanical move — no behavior changes. Follows existing pattern from process-access.ts, property-handlers.ts, chained-access.ts, struct-access.ts.

Renamed findClassStructurallyMatchingInterface to findStructuralClassForField to avoid name collision with same-named function in class-dispatch.ts (ChadScript flat module merging).

@cs01 cs01 force-pushed the decompose/extract-class-field-loading branch from fddb604 to 33f63b5 Compare April 27, 2026 01:01
@cs01 cs01 merged commit 2be8bff into main Apr 27, 2026
9 checks passed
@cs01 cs01 deleted the decompose/extract-class-field-loading branch April 27, 2026 01:15
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