File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 */
112112export 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
You can’t perform that action at this time.
0 commit comments