@@ -84,7 +84,7 @@ export namespace CommandArguments {
8484
8585function pluralizedContextLabel ( singular : string , plural : string ) {
8686 return ( args : any ) => {
87- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
87+ const { files } = args as any as CommandArguments . IGitContextAction ;
8888 if ( files . length > 1 ) {
8989 return plural ;
9090 } else {
@@ -423,7 +423,7 @@ export function addCommands(
423423 label : trans . __ ( 'Show Diff' ) ,
424424 caption : trans . __ ( 'Display a file diff.' ) ,
425425 execute : async args => {
426- const { model, isText } = ( args as any ) as {
426+ const { model, isText } = args as any as {
427427 model : Git . Diff . IModel < string > ;
428428 isText ?: boolean ;
429429 } ;
@@ -516,7 +516,7 @@ export function addCommands(
516516 trans . __ ( 'Open selected files' )
517517 ) ,
518518 execute : async args => {
519- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
519+ const { files } = args as any as CommandArguments . IGitContextAction ;
520520 for ( const file of files ) {
521521 const { x, y, to } = file ;
522522 if ( x === 'D' || y === 'D' ) {
@@ -549,7 +549,7 @@ export function addCommands(
549549 trans . __ ( 'Diff selected files' )
550550 ) ,
551551 execute : async args => {
552- const { files } = ( args as any ) as CommandArguments . IGitFileDiff ;
552+ const { files } = args as any as CommandArguments . IGitFileDiff ;
553553 for ( const file of files ) {
554554 const { context, filePath, isText, status } = file ;
555555
@@ -656,7 +656,7 @@ export function addCommands(
656656 trans . __ ( 'Stage or track the changes of selected files' )
657657 ) ,
658658 execute : async args => {
659- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
659+ const { files } = args as any as CommandArguments . IGitContextAction ;
660660 for ( const file of files ) {
661661 await gitModel . add ( file . to ) ;
662662 }
@@ -671,7 +671,7 @@ export function addCommands(
671671 trans . __ ( 'Stage the changes of selected files' )
672672 ) ,
673673 execute : async args => {
674- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
674+ const { files } = args as any as CommandArguments . IGitContextAction ;
675675 for ( const file of files ) {
676676 await gitModel . add ( file . to ) ;
677677 }
@@ -686,7 +686,7 @@ export function addCommands(
686686 trans . __ ( 'Start tracking selected files' )
687687 ) ,
688688 execute : async args => {
689- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
689+ const { files } = args as any as CommandArguments . IGitContextAction ;
690690 for ( const file of files ) {
691691 await gitModel . add ( file . to ) ;
692692 }
@@ -701,7 +701,7 @@ export function addCommands(
701701 trans . __ ( 'Unstage the changes of selected files' )
702702 ) ,
703703 execute : async args => {
704- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
704+ const { files } = args as any as CommandArguments . IGitContextAction ;
705705 for ( const file of files ) {
706706 if ( file . x !== 'D' ) {
707707 await gitModel . reset ( file . to ) ;
@@ -727,7 +727,7 @@ export function addCommands(
727727 trans . __ ( 'Delete these files' )
728728 ) ,
729729 execute : async args => {
730- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
730+ const { files } = args as any as CommandArguments . IGitContextAction ;
731731 const fileList = representFiles ( files ) ;
732732
733733 const result = await showDialog ( {
@@ -770,7 +770,7 @@ export function addCommands(
770770 trans . __ ( 'Discard recent changes of selected files' )
771771 ) ,
772772 execute : async args => {
773- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
773+ const { files } = args as any as CommandArguments . IGitContextAction ;
774774 const fileList = representFiles ( files ) ;
775775
776776 const result = await showDialog ( {
@@ -828,7 +828,7 @@ export function addCommands(
828828 trans . __ ( 'Ignore these files (add to .gitignore)' )
829829 ) ,
830830 execute : async args => {
831- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
831+ const { files } = args as any as CommandArguments . IGitContextAction ;
832832 for ( const file of files ) {
833833 if ( file ) {
834834 await gitModel . ignore ( file . to , false ) ;
@@ -839,7 +839,7 @@ export function addCommands(
839839
840840 commands . addCommand ( ContextCommandIDs . gitIgnoreExtension , {
841841 label : args => {
842- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
842+ const { files } = args as any as CommandArguments . IGitContextAction ;
843843 const extensions = files
844844 . map ( file => PathExt . extname ( file . to ) )
845845 . filter ( extension => extension . length > 0 ) ;
@@ -855,7 +855,7 @@ export function addCommands(
855855 trans . __ ( 'Ignore these files extension (add to .gitignore)' )
856856 ) ,
857857 execute : async args => {
858- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
858+ const { files } = args as any as CommandArguments . IGitContextAction ;
859859 for ( const selectedFile of files ) {
860860 if ( selectedFile ) {
861861 const extension = PathExt . extname ( selectedFile . to ) ;
@@ -879,7 +879,7 @@ export function addCommands(
879879 }
880880 } ,
881881 isVisible : args => {
882- const { files } = ( args as any ) as CommandArguments . IGitContextAction ;
882+ const { files } = args as any as CommandArguments . IGitContextAction ;
883883 return files . some ( selectedFile => {
884884 const extension = PathExt . extname ( selectedFile . to ) ;
885885 return extension . length > 0 ;
@@ -967,22 +967,22 @@ export function addMenuItems(
967967 if ( command === ContextCommandIDs . gitFileDiff ) {
968968 contextMenu . addItem ( {
969969 command,
970- args : ( {
970+ args : {
971971 files : selectedFiles . map ( file => {
972972 return {
973973 filePath : file . to ,
974974 isText : ! file . is_binary ,
975975 status : file . status
976976 } ;
977977 } )
978- } as CommandArguments . IGitFileDiff ) as any
978+ } as CommandArguments . IGitFileDiff as any
979979 } ) ;
980980 } else {
981981 contextMenu . addItem ( {
982982 command,
983- args : ( {
983+ args : {
984984 files : selectedFiles
985- } as CommandArguments . IGitContextAction ) as any
985+ } as CommandArguments . IGitContextAction as any
986986 } ) ;
987987 }
988988 } ) ;
@@ -1148,7 +1148,7 @@ namespace Private {
11481148 switch ( operation ) {
11491149 case Operation . Clone :
11501150 // eslint-disable-next-line no-case-declarations
1151- const { path, url } = ( args as any ) as IGitCloneArgs ;
1151+ const { path, url } = args as any as IGitCloneArgs ;
11521152 result = await model . clone ( path , url , authentication ) ;
11531153 break ;
11541154 case Operation . Pull :
0 commit comments