File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,11 @@ export async function getHardwares(sessionID: string): Promise<Hardware[]> {
211211 return data ;
212212}
213213
214+ export interface ScanCardCallback {
215+ onSuccess ( card : Card ) : void ;
216+ onError ( e : AkilesError ) : void ;
217+ }
218+
214219/**
215220 * Scan a card using NFC.
216221 *
@@ -220,10 +225,7 @@ export async function getHardwares(sessionID: string): Promise<Hardware[]> {
220225 *
221226 * @returns A function that cancels the ongoing scanCard operation.
222227 */
223- export function scanCard ( callback : {
224- onSuccess ( card : Card ) : void ;
225- onError ( e : AkilesError ) : void ;
226- } ) {
228+ export function scanCard ( callback : ScanCardCallback ) {
227229 const opId = Akiles . scanCard ( ) ;
228230 const remove = listenEvents ( opId , {
229231 scan_card_success : ( { card } ) => {
You can’t perform that action at this time.
0 commit comments