fix: Update type in hooks, match the variable types between examples.ts and hooks.ts
This commit is contained in:
		
							parent
							
								
									833a7ee8ec
								
							
						
					
					
						commit
						b0010ee8c7
					
				@ -91,7 +91,7 @@ function onShutdown(): void {
 | 
				
			|||||||
async function onNotify(
 | 
					async function onNotify(
 | 
				
			||||||
  event: string,
 | 
					  event: string,
 | 
				
			||||||
  type: string,
 | 
					  type: string,
 | 
				
			||||||
  ids: Array<string>,
 | 
					  ids: Array<string> | Array<number>,
 | 
				
			||||||
  extraData: { [key: string]: any }
 | 
					  extraData: { [key: string]: any }
 | 
				
			||||||
) {
 | 
					) {
 | 
				
			||||||
  // You can add your code to the corresponding notify type
 | 
					  // You can add your code to the corresponding notify type
 | 
				
			||||||
 | 
				
			|||||||
@ -33,7 +33,7 @@ export class BasicExampleFactory {
 | 
				
			|||||||
          this.unregisterNotifier(notifierID);
 | 
					          this.unregisterNotifier(notifierID);
 | 
				
			||||||
          return;
 | 
					          return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        addon.hooks.onNotify(event, type, ids as string[], extraData);
 | 
					        addon.hooks.onNotify(event, type, ids, extraData);
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user