Goal
The interpreter-side twin of Epic 5: the runtime value-type wrappers (SharpTS*) were authored by copy-paste and need shared bases/helpers. The Intl family, crypto family, typed-array subclasses, and stream write-side each re-roll coercion, encoding, options-parsing, and member dispatch. Some copies have already diverged (e.g. Decipher.FormatOutput has a utf8 case Cipher lacks; forked ToDouble defaults) — an active latent-bug hazard, not cosmetic.
Start with the zero-risk static-helper extractions, then the abstract bases.
Sub-issues (rough priority order)
Working agreement for every child PR
- Green on
dotnet test, SharpTS.Test262, and SharpTS.TypeScriptConformance (no baseline regression).
- Interpreter and compiled output must remain behaviourally identical; add dual-mode tests where applicable.
- Standalone compiled DLLs must not gain a
SharpTS.dll dependency (see CLAUDE.md "Standalone DLL Constraint").
Source: codebase-wide maintainability audit, 2026-06-29.
Goal
The interpreter-side twin of Epic 5: the runtime value-type wrappers (
SharpTS*) were authored by copy-paste and need shared bases/helpers. The Intl family, crypto family, typed-array subclasses, and stream write-side each re-roll coercion, encoding, options-parsing, and member dispatch. Some copies have already diverged (e.g.Decipher.FormatOutputhas autf8caseCipherlacks; forkedToDoubledefaults) — an active latent-bug hazard, not cosmetic.Start with the zero-risk static-helper extractions, then the abstract bases.
Sub-issues (rough priority order)
ToDouble/ToInt(6 copies reinventInterpreter.ToNumber). Zero-risk start.SharpTSAesBase(Cipher/Decipher already diverged; encoder ×7).SharpTSIntlFormatterBase(8 formatters repeat locale/options/coercion).Slice/Subarrayto the base (~260 lines ×11).WritableCoreshared by Writable/Duplex (~200 lines re-implemented).GetMembernon-virtual, ~25newshadows). Stage it.Working agreement for every child PR
dotnet test,SharpTS.Test262, andSharpTS.TypeScriptConformance(no baseline regression).SharpTS.dlldependency (see CLAUDE.md "Standalone DLL Constraint").Source: codebase-wide maintainability audit, 2026-06-29.