Skip to content

Commit ebd5074

Browse files
grypezclaude
andcommitted
fix(sheaves): drop extra context arg from noopPolicy call in leastAuthority
noopPolicy takes one argument; passing context caused a TS2554 build error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 919be7a commit ebd5074

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/sheaves/src/compose.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,19 @@ export const withRanking =
106106
* identical and the key is collapsed to constraints) are treated as 0.5.
107107
*
108108
* @param candidates - Candidates to rank and yield.
109-
* @param context - The policy context (passed through to noopPolicy).
109+
* @param _context - The policy context (unused; present to satisfy the Policy signature).
110110
* @yields Candidates sorted ascending by authority.
111111
*/
112112
export async function* leastAuthority<M extends Record<string, unknown>>(
113113
candidates: Candidate<Partial<M>>[],
114-
context: PolicyContext<M>,
114+
_context: PolicyContext<M>,
115115
): AsyncGenerator<Candidate<Partial<M>>, void, unknown[]> {
116116
yield* noopPolicy(
117117
[...candidates].sort((a, b) => {
118118
const aAuth = (a.metadata as { authority?: number }).authority ?? 0.5;
119119
const bAuth = (b.metadata as { authority?: number }).authority ?? 0.5;
120120
return aAuth - bAuth;
121121
}),
122-
context,
123122
);
124123
}
125124

0 commit comments

Comments
 (0)