@@ -74,13 +74,13 @@ export default class DBFolderPlugin extends Plugin {
7474 await this . loadServices ( ) ;
7575 addIcon ( DB_ICONS . NAME , DB_ICONS . ICON ) ;
7676 this . registerEvent (
77- app . workspace . on ( 'window-open' , ( _ : any , win : Window ) => {
77+ app . workspace . on ( 'window-open' , ( _ : unknown , win : Window ) => {
7878 this . mount ( win ) ;
7979 } )
8080 ) ;
8181
8282 this . registerEvent (
83- app . workspace . on ( 'window-close' , ( _ : any , win : Window ) => {
83+ app . workspace . on ( 'window-close' , ( _ : unknown , win : Window ) => {
8484 this . unmount ( win ) ;
8585 } )
8686 ) ;
@@ -112,7 +112,7 @@ export default class DBFolderPlugin extends Plugin {
112112 unload ( ) : void {
113113 Promise . all (
114114 app . workspace . getLeavesOfType ( DatabaseCore . FRONTMATTER_KEY ) . map ( ( leaf ) => {
115- this . databaseFileModes [ ( leaf as any ) . id ] = 'markdown' ;
115+ this . databaseFileModes [ leaf . id ] = 'markdown' ;
116116 return this . setMarkdownView ( leaf ) ;
117117 } )
118118 ) . then ( ( ) => {
@@ -134,7 +134,7 @@ export default class DBFolderPlugin extends Plugin {
134134 this . windowRegistry . clear ( ) ;
135135 this . databaseFileModes = { } ;
136136
137- ( app . workspace as any ) . unregisterHoverLinkSource ( DatabaseCore . FRONTMATTER_KEY ) ;
137+ app . workspace . unregisterHoverLinkSource ( DatabaseCore . FRONTMATTER_KEY ) ;
138138 }
139139
140140 /** Update plugin settings. */
@@ -179,7 +179,7 @@ export default class DBFolderPlugin extends Plugin {
179179
180180 viewStateReceivers : Array < ( views : DatabaseView [ ] ) => void > = [ ] ;
181181
182- addView ( view : DatabaseView , data : string ) {
182+ addView ( view : DatabaseView ) {
183183 const win = view . getWindow ( ) ;
184184 const reg = this . windowRegistry . get ( win ) ;
185185
@@ -371,7 +371,7 @@ export default class DBFolderPlugin extends Plugin {
371371 . setIcon ( DB_ICONS . NAME )
372372 . setSection ( 'pane' )
373373 . onClick ( ( ) => {
374- this . databaseFileModes [ ( leaf as any ) . id || file . path ] =
374+ this . databaseFileModes [ leaf . id || file . path ] =
375375 DatabaseCore . FRONTMATTER_KEY ;
376376 this . setDatabaseView ( leaf ) ;
377377 } ) ;
@@ -392,7 +392,7 @@ export default class DBFolderPlugin extends Plugin {
392392 . setIcon ( DB_ICONS . NAME )
393393 . setSection ( 'pane' )
394394 . onClick ( ( ) => {
395- this . databaseFileModes [ ( leaf as any ) . id || file . path ] =
395+ this . databaseFileModes [ leaf . id || file . path ] =
396396 DatabaseCore . FRONTMATTER_KEY ;
397397 this . setDatabaseView ( leaf ) ;
398398 } ) ;
@@ -406,7 +406,7 @@ export default class DBFolderPlugin extends Plugin {
406406 */
407407 this . registerEvent (
408408 app . metadataCache . on ( "dataview:index-ready" , async ( ) => {
409- for ( const [ win , { viewMap } ] of Array . from ( this . windowRegistry . entries ( ) ) ) {
409+ for ( const [ , { viewMap } ] of Array . from ( this . windowRegistry . entries ( ) ) ) {
410410 // Refresh all database views
411411 for ( const view of viewMap . values ( ) ) {
412412 await view . reloadDatabase ( ) ;
@@ -537,7 +537,7 @@ export default class DBFolderPlugin extends Plugin {
537537 }
538538
539539 showRibbonIcon ( ) {
540- this . ribbonIcon = this . addRibbonIcon ( DB_ICONS . NAME , t ( "ribbon_icon_title" ) , async ( e ) => {
540+ this . ribbonIcon = this . addRibbonIcon ( DB_ICONS . NAME , t ( "ribbon_icon_title" ) , async ( ) => {
541541 new DatabaseHelperCreationModal ( this . settings . local_settings ) . open ( )
542542 } ) ;
543543 }
@@ -607,7 +607,7 @@ export default class DBFolderPlugin extends Plugin {
607607 self . databaseFileModes [ this . id || state . state . file ] !== 'markdown'
608608 ) {
609609 // Then check for the database frontMatterKey
610- const cache = self . app . metadataCache . getCache ( state . state . file ) ;
610+ const cache = app . metadataCache . getCache ( state . state . file ) ;
611611
612612 if ( cache ?. frontmatter && cache . frontmatter [ DatabaseCore . FRONTMATTER_KEY ] ) {
613613 // If we have it, force the view type to database
0 commit comments