Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(socket-node): remove unused import #672

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions npm/packages/@socketsupply/socket-node/API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### [`send(options)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L168)
### [`send(options)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L190)

Send event to webview via IPC

Expand All @@ -13,15 +13,15 @@ Send event to webview via IPC
| :--- | :--- | :--- |
| Not specified | Promise<Error \| undefined> | |

### [`heartbeat()`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L198)
### [`heartbeat()`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L220)

Send the heartbeat event to the webview.

| Return Value | Type | Description |
| :--- | :--- | :--- |
| Not specified | Promise<Error \| undefined> | |

### [`addListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L209)
### [`addListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L231)

Adds a listener to the window.

Expand All @@ -30,7 +30,7 @@ Adds a listener to the window.
| event | string | | false | the event to listen to |
| cb | function(*): void | | false | the callback to call |

### [`on(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L220)
### [`on(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L242)

Adds a listener to the window. An alias for `addListener`.

Expand All @@ -39,7 +39,7 @@ Adds a listener to the window. An alias for `addListener`.
| event | string | | false | the event to listen to |
| cb | function(*): void | | false | the callback to call |

### [`once(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L230)
### [`once(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L252)

Adds a listener to the window. The listener is removed after the first call.

Expand All @@ -48,7 +48,7 @@ Adds a listener to the window. The listener is removed after the first call.
| event | string | | false | the event to listen to |
| cb | function(*): void | | false | the callback to call |

### [`removeListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L240)
### [`removeListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L262)

Removes a listener from the window.

Expand All @@ -57,15 +57,15 @@ Removes a listener from the window.
| event | string | | false | the event to remove the listener from |
| cb | function(*): void | | false | the callback to remove |

### [`removeAllListeners(event)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L249)
### [`removeAllListeners(event)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L271)

Removes all listeners from the window.

| Argument | Type | Default | Optional | Description |
| :--- | :--- | :---: | :---: | :--- |
| event | string | | false | the event to remove the listeners from |

### [`off(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L260)
### [`off(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L282)

Removes a listener from the window. An alias for `removeListener`.

Expand Down
1 change: 0 additions & 1 deletion npm/packages/@socketsupply/socket-node/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-check
import { format } from 'node:util'
import { EventEmitter } from 'node:events'

const MAX_MESSAGE_KB = 512 * 1024
Expand Down
Loading