File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -406,12 +406,17 @@ function runService(): void {
406406 return serviceRemote as Service ;
407407 }
408408
409- async function getAppInfo ( appId : string ) : Promise < Record < string , any > > {
410- const appList = await asyncCall < { apps : { id : string } [ ] } > (
411- getInstallerService ( ) ,
412- 'luna://com.webos.applicationManager/dev/listApps' ,
413- { } ,
414- ) ;
409+ interface AppInfo {
410+ id : string ;
411+ title : string ;
412+ type : string ;
413+ folderPath : string ;
414+ }
415+ interface AppsList {
416+ apps : AppInfo [ ] ;
417+ }
418+ async function getAppInfo ( appId : string ) : Promise < AppInfo > {
419+ const appList = await asyncCall < AppsList > ( getInstallerService ( ) , 'luna://com.webos.applicationManager/dev/listApps' , { } ) ;
415420 const appInfo = appList . apps . find ( ( app ) => app . id === appId ) ;
416421 if ( ! appInfo ) throw new Error ( `Invalid appId, or unsupported application type: ${ appId } ` ) ;
417422 return appInfo ;
@@ -491,7 +496,7 @@ function runService(): void {
491496
492497 try {
493498 const appInfo = await getAppInfo ( installedPackageId ) ;
494- await createToast ( `Application installed: ${ appInfo [ ' title' ] } ` , service ) ;
499+ await createToast ( `Application installed: ${ appInfo . title } ` , service ) ;
495500 } catch ( err : unknown ) {
496501 console . warn ( 'appinfo fetch failed:' , err ) ;
497502 await createToast ( `Application installed: ${ installedPackageId } ` , service ) ;
You can’t perform that action at this time.
0 commit comments