@@ -51,7 +51,7 @@ export const _ = {
51
51
. filter ( Boolean )
52
52
. reduce (
53
53
// @ts -expect-error implicit any on res[key]
54
- ( res , key ) => ( res ! == null && res !== undefined ? res [ key ] : res ) ,
54
+ ( res : object | undefined , key ) => ( res == null ? res : res [ key ] ) ,
55
55
obj ,
56
56
) ;
57
57
const result = travel ( / [ , [ \] ] + ?/ ) || travel ( / [ , . [ \] ] + ?/ ) ;
@@ -351,6 +351,7 @@ export default class PromptsRunner<A extends Answers> {
351
351
cleanupSignal = undefined ;
352
352
} ;
353
353
354
+ // eslint-disable-next-line @typescript-eslint/use-unknown-in-catch-callback-variable
354
355
activePrompt . run ( ) . then ( resolve , reject ) . finally ( cleanup ) ;
355
356
} )
356
357
: prompt ;
@@ -360,7 +361,7 @@ export default class PromptsRunner<A extends Answers> {
360
361
if ( moduleSignal ?. aborted ) {
361
362
this . abortController . abort ( moduleSignal . reason ) ;
362
363
} else if ( moduleSignal ) {
363
- const abort = ( ) => this . abortController ? .abort ( moduleSignal . reason ) ;
364
+ const abort = ( ) => this . abortController . abort ( moduleSignal . reason ) ;
364
365
moduleSignal . addEventListener ( 'abort' , abort ) ;
365
366
cleanupModuleSignal = ( ) => {
366
367
moduleSignal . removeEventListener ( 'abort' , abort ) ;
@@ -384,7 +385,7 @@ export default class PromptsRunner<A extends Answers> {
384
385
* Close the interface and cleanup listeners
385
386
*/
386
387
close = ( ) => {
387
- this . abortController ? .abort ( ) ;
388
+ this . abortController . abort ( ) ;
388
389
} ;
389
390
390
391
private shouldRun = async ( question : Question < A > ) : Promise < boolean > => {
0 commit comments