diff options
author | Aylur <[email protected]> | 2024-11-24 00:04:07 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-12-02 22:34:01 +0100 |
commit | 2f09ed83386b334f0dfb7f376b99739b15e49fc9 (patch) | |
tree | 4be7848780c4145310a5fa69c60661a61c69ca47 /lang/gjs/src/file.ts | |
parent | 990f031507b21f8a18c0710016fb76b1f260afe8 (diff) |
gjs gtk4 support
export jsx-runtime
Diffstat (limited to 'lang/gjs/src/file.ts')
-rw-r--r-- | lang/gjs/src/file.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lang/gjs/src/file.ts b/lang/gjs/src/file.ts index 6ad8be3..4220d9d 100644 --- a/lang/gjs/src/file.ts +++ b/lang/gjs/src/file.ts @@ -12,8 +12,7 @@ export function readFileAsync(path: string): Promise<string> { Astal.read_file_async(path, (_, res) => { try { resolve(Astal.read_file_finish(res) || "") - } - catch (error) { + } catch (error) { reject(error) } }) @@ -29,8 +28,7 @@ export function writeFileAsync(path: string, content: string): Promise<void> { Astal.write_file_async(path, content, (_, res) => { try { resolve(Astal.write_file_finish(res)) - } - catch (error) { + } catch (error) { reject(error) } }) |