Skip to content

Commit

Permalink
docs(readme): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Mar 31, 2024
1 parent c89f9d9 commit 26ed6e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ const App = () => {

#### Parameters

| Name | Type | Description |
| Parameter | Type | Description |
| --------- | ------ | ---------------------- |
| `type` | enums | Transport port type |
| `options` | object | Transport port options |

#### Returns

| Name | Type | Description |
| ------------------ | -------- | -------------------------- |
| `transport.emit` | function | Emit a message |
| `transport.listen` | hook | Listen a message with deps |
| Return | Type | Description |
| ------------------ | ----------------------------------------------------------------- | -------------------- |
| `transport.emit` | (name: string \| options, ...args: any[]) => any | Emit a message |
| `transport.listen` | (name: string, fn: (...args: any[]) => any, deps?: any[]) => void | Listen for a message |

> The `use-transport` hook returns a transport instance. more API details can be found in the [data-transport](https://github.com/unadlib/data-transport) documentation.
Expand Down

0 comments on commit 26ed6e9

Please sign in to comment.