diff options
author | Aylur <[email protected]> | 2024-07-20 14:05:47 +0200 |
---|---|---|
committer | Aylur <[email protected]> | 2024-07-20 14:05:47 +0200 |
commit | 1c9377ec696c1f8269bf30a7af1e4a9566d55625 (patch) | |
tree | 2a9a7e445b8e999f3fdac326d2386459d26868da /gjs/src/application.ts | |
parent | a1f9272f4576fd3c366581464223e08a35ccf99f (diff) |
update eslint, ts-for-gir
Diffstat (limited to 'gjs/src/application.ts')
-rw-r--r-- | gjs/src/application.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gjs/src/application.ts b/gjs/src/application.ts index 606bf30..d1bc13f 100644 --- a/gjs/src/application.ts +++ b/gjs/src/application.ts @@ -33,7 +33,8 @@ class AstalJS extends Astal.Application { fn()() .then(res) .catch(rej) - } catch (error) { + } + catch (error) { rej(error) } }) @@ -43,12 +44,13 @@ class AstalJS extends Astal.Application { vfunc_request(msg: string, conn: Gio.SocketConnection): void { if (typeof this.requestHandler === "function") { - this.requestHandler(msg, response => { + this.requestHandler(msg, (response) => { Astal.write_sock(conn, String(response), (_, res) => Astal.write_sock_finish(res), ) }) - } else { + } + else { super.vfunc_request(msg, conn) } } @@ -68,7 +70,6 @@ class AstalJS extends Astal.Application { this.requestHandler = requestHandler this.connect("activate", () => { - // @ts-expect-error missing url type const path: string[] = import.meta.url.split("/").slice(3) const file = path.at(-1)!.replace(".js", ".css") const css = `/${path.slice(0, -1).join("/")}/${file}` @@ -92,4 +93,4 @@ class AstalJS extends Astal.Application { } } -export default new AstalJS +export default new AstalJS() |