File tree Expand file tree Collapse file tree 5 files changed +7
-11
lines changed
Expand file tree Collapse file tree 5 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ describe( 'WPCommand', () => {
105105
106106 // Simulate the SSH connection closing right after the command is executed
107107 dummyStream . emit ( 'close' ) ;
108- } ) as unknown as Client [ 'exec' ] ) ;
108+ } ) as Client [ 'exec' ] ) ;
109109
110110 await cmd . run ( 'plugin list' ) ;
111111
@@ -129,7 +129,7 @@ describe( 'WPCommand', () => {
129129 callback : ( err : Error , stream : Stream ) => void
130130 ) => {
131131 callback ( new Error ( 'ops!' ) , dummyStream ) ;
132- } ) as unknown as Client [ 'exec' ] ) ;
132+ } ) as Client [ 'exec' ] ) ;
133133
134134 const result = cmd . run ( 'plugin list' ) ;
135135
@@ -150,7 +150,7 @@ describe( 'WPCommand', () => {
150150 // Simulate the SSH connection closing right after the command is executed
151151 dummyStream . emit ( 'exit' , 23 ) ;
152152 dummyStream . emit ( 'close' ) ;
153- } ) as unknown as Client [ 'exec' ] ) ;
153+ } ) as Client [ 'exec' ] ) ;
154154
155155 const result = cmd . run ( 'plugin list' ) ;
156156
Original file line number Diff line number Diff line change @@ -387,9 +387,7 @@ export class ExportSQLCommand {
387387 return await this . confirmEnoughStorageHook ( job ) ;
388388 }
389389
390- const storageAvailability = BackupStorageAvailability . createFromDbCopyJob (
391- job as unknown as Job
392- ) ;
390+ const storageAvailability = BackupStorageAvailability . createFromDbCopyJob ( job ) ;
393391 return await storageAvailability . validateAndPromptDiskSpaceWarningForBackupImport ( ) ;
394392 }
395393
Original file line number Diff line number Diff line change @@ -951,7 +951,7 @@ export function fetchVersionList(): Promise< WordPressTag[] > {
951951 // TODO: remove this cast once the typings are fixed
952952 const proxyAgent = createProxyAgent ( url ) as unknown as Agent ;
953953 return fetch ( url , { agent : proxyAgent ?? undefined } ) . then (
954- res => res . json ( ) as unknown as WordPressTag [ ]
954+ res => res . json ( ) as Promise < WordPressTag [ ] >
955955 ) ;
956956}
957957
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ export async function getMediaImportConfig(): Promise< MediaImportConfig | null
2424 fetchPolicy : 'network-only' ,
2525 } ) ;
2626
27- return response ?. data ?. mediaImportConfig as unknown as MediaImportConfig | null ;
27+ return response ?. data ?. mediaImportConfig ?? null ;
2828}
Original file line number Diff line number Diff line change @@ -363,9 +363,7 @@ Downloading errors details from ${ fileErrorsUrl }
363363 progressTracker . print ( ) ;
364364
365365 if ( results . failureDetails ?. fileErrorsUrl ) {
366- await promptFailureDetailsDownload (
367- results . failureDetails . fileErrorsUrl as unknown as string
368- ) ;
366+ await promptFailureDetailsDownload ( results . failureDetails . fileErrorsUrl ) ;
369367 } else if ( 'ABORTED' !== overallStatus ) {
370368 // print report link expired if required
371369 // do not print this message if the import was aborted
You can’t perform that action at this time.
0 commit comments