Skip to content

Commit

Permalink
chore(api): generate types + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Mar 12, 2024
1 parent f5e16da commit 5d2fe5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
This is a `VariableDeclaration` named `MAX_WINDOWS` in `api/application.js`, it's exported but undocumented.


## [WindowList](https://github.com/socketsupply/socket/blob/master/api/application.js#L39)
## [ApplicationWindowList](https://github.com/socketsupply/socket/blob/master/api/application.js#L39)

This is a `ClassDeclaration` named `WindowList` in `api/application.js`, it's exported but undocumented.
This is a `ClassDeclaration` named `ApplicationWindowList` in `api/application.js`, it's exported but undocumented.


## [`getCurrentWindowIndex()`](https://github.com/socketsupply/socket/blob/master/api/application.js#L164)
Expand Down Expand Up @@ -90,7 +90,7 @@ Returns the ApplicationWindow instances for the given indices or all windows if

| Return Value | Type | Description |
| :--- | :--- | :--- |
| Not specified | Promise<WindowList> | |
| Not specified | Promise<ApplicationWindowList> | |

## [`getWindow(index)`](https://github.com/socketsupply/socket/blob/master/api/application.js#L377)

Expand Down
1 change: 0 additions & 1 deletion api/async/deferred.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export class Deferred extends EventTarget {
/**
* The promise associated with this Deferred instance.
* @type {Promise<any>}
* @private
*/
get promise () {
return this.#promise
Expand Down
11 changes: 5 additions & 6 deletions api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,8 @@ declare module "socket:async/deferred" {
/**
* The promise associated with this Deferred instance.
* @type {Promise<any>}
* @private
*/
private get promise();
get promise(): Promise<any>;
/**
* A string representation of this Deferred instance.
* @type {string}
Expand Down Expand Up @@ -6144,9 +6143,9 @@ declare module "socket:application" {
* Returns the ApplicationWindow instances for the given indices or all windows if no indices are provided.
* @param {number[]} [indices] - the indices of the windows
* @throws {Error} - if indices is not an array of integer numbers
* @return {Promise<WindowList>}
* @return {Promise<ApplicationWindowList>}
*/
export function getWindows(indices?: number[], options?: any): Promise<WindowList>;
export function getWindows(indices?: number[], options?: any): Promise<ApplicationWindowList>;
/**
* Returns the ApplicationWindow instance for the given index
* @param {number} index - the index of the window
Expand Down Expand Up @@ -6267,8 +6266,8 @@ declare module "socket:application" {
export function setSystemMenuItemEnabled(value: object): Promise<ipc.Result>;
export { menu };
export const MAX_WINDOWS: 32;
export class WindowList {
static from(...args: any[]): exports.WindowList;
export class ApplicationWindowList {
static from(...args: any[]): exports.ApplicationWindowList;
constructor(items: any);
get length(): number;
get size(): number;
Expand Down

0 comments on commit 5d2fe5b

Please sign in to comment.