Skip to content

Type the operand of ValueProxy.eq and ValueProxy.ne #47

Closed

Description

@Upd4ting

The guardrail ratchet of @antelopejs/interface-database (main at fc1ba44) holds two contract findings in the published ValueProxy class (/valueproxy and /staged-query subpaths):

file:line rule exported item proposed change why a refactor cannot do it
src/staged-query/valueproxy.ts:124 anti-slop/no-unknown-parameters ValueProxy<T>.eq(value: unknown) eq(value: ValueProxyOrValue<T>) (or the package's Value type over T), like gt/lt already constrain their operand the parameter is in the published declaration; narrowing it rejects callers comparing across types, so it is a breaking change for consumers (new minor)
src/staged-query/valueproxy.ts:134 anti-slop/no-unknown-parameters ValueProxy<T>.ne(value: unknown) same as eq same

The other five ratcheted findings are legitimate and stay:

  • src/staged-query/datum.ts:23, src/staged-query/stream.ts:24, src/staged-query/valueproxy.ts:69 (no-chained-type-assertions): cast<U>() returns the same object retyped; a single as fails TS2352 and a fresh object would change identity.
  • src/tests/atomic_mutation.test.ts:109, :202 (require-safety-comment-for-type-assertion): deliberately invalid inputs that prove ValidateAtomicMutation throws at run time.

Activity

  1. Upd4ting commented on Nov 4, 2026

    @Upd4ting
    MemberAuthor

    Fixed by #62 (typed query operands), on main in 1cf8db2 (#71). ValueProxy.eq and ne now take EqualityOperand<T> (src/staged-query/valueproxy.ts:121 and :131). Checked by reading main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions