1+ import type { ContextTimed } from '@matrixai/contexts' ;
2+ import type { JSONValue } from '@matrixai/rpc' ;
13import type {
24 ClientRPCRequestParams ,
35 ClientRPCResponseResult ,
@@ -8,11 +10,11 @@ import type { IdentityId, ProviderId } from '../../ids';
810import type IdentitiesManager from '../../identities/IdentitiesManager' ;
911import type { IdentityData } from '../../identities/types' ;
1012import { ServerHandler } from '@matrixai/rpc' ;
13+ import { validateSync } from '../../validation' ;
14+ import { matchSync } from '../../utils' ;
1115import * as ids from '../../ids' ;
1216import * as identitiesErrors from '../../identities/errors' ;
1317import * as identitiesUtils from '../../identities/utils' ;
14- import { validateSync } from '../../validation' ;
15- import { matchSync } from '../../utils' ;
1618
1719class IdentitiesInfoGet extends ServerHandler <
1820 {
@@ -23,9 +25,9 @@ class IdentitiesInfoGet extends ServerHandler<
2325> {
2426 public handle = async function * (
2527 input : ClientRPCRequestParams < ProviderSearchMessage > ,
26- _cancel ,
27- _meta ,
28- ctx ,
28+ _cancel : ( reason ?: any ) => void ,
29+ _meta : Record < string , JSONValue > ,
30+ ctx : ContextTimed ,
2931 ) : AsyncGenerator < ClientRPCResponseResult < IdentityInfoMessage > > {
3032 if ( ctx . signal . aborted ) throw ctx . signal . reason ;
3133 const { identitiesManager } : { identitiesManager : IdentitiesManager } =
@@ -86,7 +88,7 @@ class IdentitiesInfoGet extends ServerHandler<
8688 input . limit = identities . length ;
8789 }
8890 for ( let i = 0 ; i < input . limit ; i ++ ) {
89- if ( ctx . signal . aborted ) throw ctx . signal . reason ;
91+ ctx . signal . throwIfAborted ( ) ;
9092 const identity = identities [ i ] ;
9193 if ( identity !== undefined ) {
9294 if ( identitiesUtils . matchIdentityData ( identity , searchTerms ) ) {
0 commit comments