mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
chore: Fix lint issues
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
if (window.Notification.permission !== "default") {
|
||||
return Promise.resolve(window.Notification.permission === "granted");
|
||||
}
|
||||
return __TAURI__.invoke("plugin:notification|is_permission_granted");
|
||||
return window.__TAURI__.invoke("plugin:notification|is_permission_granted");
|
||||
}
|
||||
|
||||
function setNotificationPermission(value) {
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
function requestPermission() {
|
||||
return __TAURI__
|
||||
return window.__TAURI__
|
||||
.invoke("plugin:notification|request_permission")
|
||||
.then(function (permission) {
|
||||
setNotificationPermission(permission);
|
||||
@@ -30,7 +30,7 @@
|
||||
Object.freeze(options);
|
||||
}
|
||||
|
||||
return __TAURI__.invoke("plugin:notification|notify", {
|
||||
return window.__TAURI__.invoke("plugin:notification|notify", {
|
||||
options:
|
||||
typeof options === "string"
|
||||
? {
|
||||
|
||||
@@ -143,9 +143,10 @@ async function execute<O extends IOPayload>(
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
class EventEmitter<E extends Record<string, any>> {
|
||||
/** @ignore */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
||||
private eventListeners: Record<keyof E, Array<(arg: any) => void>> =
|
||||
Object.create(null);
|
||||
|
||||
@@ -320,6 +321,7 @@ class EventEmitter<E extends Record<string, any>> {
|
||||
eventName: N,
|
||||
listener: (arg: E[typeof eventName]) => void
|
||||
): this {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const wrapper = (arg: any): void => {
|
||||
this.removeListener(eventName, wrapper);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
|
||||
Reference in New Issue
Block a user