Skip to content

Commit

Permalink
Add TSDoc comments to the runAsync functions
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Nov 27, 2023
1 parent 1b9dadc commit a0e6b94
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/lib/src/injection/classes/gjs/gio-2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ const runAsyncMethod: InjectionFunction = {
type: 'Promise<number>',
},
],
doc: {
text: "Similar to `Gio.Application.run` but return a Promise which resolves when the main loop ends, instead of blocking while the main loop runs.\nThis helps avoid the situation where Promises never resolved if you didn't run the application inside a callback.",
tags: [
{
tagName: 'param',
paramName: 'argv',
text: 'Commandline arguments.',
},
{
tagName: 'returns',
paramName: '',
text: 'The exit status of the application.',
},
],
},
}

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/lib/src/injection/classes/gjs/glib-2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const runAsyncMethod: InjectionFunction = {
type: 'Promise<void>',
},
],
doc: {
text: "Similar to `GLib.MainLoop.run` but return a Promise which resolves when the main loop ends, instead of blocking while the main loop runs.\nThis helps avoid the situation where Promises never resolved if you didn't run the main loop inside a callback.",
tags: [],
},
}

export const classesGLib20Gjs: InjectionClass[] = [
Expand Down

0 comments on commit a0e6b94

Please sign in to comment.