this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Simplify SubscriptionHandler type

futur 25f2cab5 8c1f9680

+4 -6
+1 -4
src/LabelerServer.ts
··· 330 330 /** 331 331 * Handler for [com.atproto.label.subscribeLabels](https://github.com/bluesky-social/atproto/blob/main/lexicons/com/atproto/label/subscribeLabels.json). 332 332 */ 333 - subscribeLabelsHandler: SubscriptionHandler<{ Querystring: { cursor?: string } }> = ( 334 - ws, 335 - req, 336 - ) => { 333 + subscribeLabelsHandler: SubscriptionHandler<{ cursor?: string }> = (ws, req) => { 337 334 const cursor = parseInt(req.query.cursor ?? "NaN", 10); 338 335 339 336 if (!Number.isNaN(cursor)) {
+3 -2
src/util/types.ts
··· 53 53 RawReplyDefaultExpression, 54 54 { Body: T } 55 55 >; 56 - export type SubscriptionHandler<T extends RequestGenericInterface = RequestGenericInterface> = 57 - WebsocketHandler<RawServerDefault, RawRequestDefaultExpression, T>; 56 + export type SubscriptionHandler< 57 + T extends RequestGenericInterface["Querystring"] = RequestGenericInterface["Querystring"], 58 + > = WebsocketHandler<RawServerDefault, RawRequestDefaultExpression, { Querystring: T }>;