Repository navigation
refactor(controller): read controller fields through fieldsOf - #86
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Antony's goal: delete every AntelopeJS
guardrails.ratchet.jsonthrough verified PRs on campaign/integration, each contract change proven by tarball against every consumer, with no fallback. interface-api#68 defaultsControllerClasstoobject, so interface-data-api no longer compiles: it indexes controller instances by string in ten places (Checks: 7 passed, 2 failed.in the proof against the tarball).What changed
fcc62d229e78d7584ec696495cff2bafe32d5e24, sha2561a29379d519467fdd438ee411a93519956f1e024d4f457f0d447cac67af61099, packed 0.3.0).fieldsOf(instance)insrc/internal/prototypes.tsnarrows a controller instance to the existingRowFields, whose values areunknown. Reads ofmeta.modelKeyand modifier key fields, and the writes on the{ ...obj }copy, go through it. It returns the same object, so inherited accessors still run on the instance.c.prototype[key] = funcbecomesObject.assign(c.prototype, { [key]: func }), which performs the same[[Set]].Proofs
pnpm run checksin CI state, after merging integration 65afb35 (chore(ratchet): delete the interface-data-api guardrail ratchet #85, ratchet deleted):Checks: 8 passed, 0 failed.@internaldeclaration,fieldsOfindist/internal/prototypes.d.ts;runtime export keys identical: 4 entries. api-diff cannot judge this PR because its base half does not build against the new pin (TS7053 in the base worktree).Attention
fieldsOfadds no new dictionary type or suppression:RowFieldscarries the counted disable chore(ratchet): delete the interface-data-api guardrail ratchet #85 landed. It is named for table rows and used here for controller fields, because both hold values of unknown type. A verifier should judge that reuse.holdsFieldsnarrows toRowFieldsafter only an object check. That holds because any object answers any string key.fieldsOfthrows for a function, where the old index read did not. A controller instance is never a function.