From 26ed6e9345e9970fb4906ee1a3e6e09244963ce8 Mon Sep 17 00:00:00 2001 From: unadlib Date: Sun, 31 Mar 2024 23:59:51 +0800 Subject: [PATCH] docs(readme): update docs --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bf32d84..abcbcc4 100644 --- a/README.md +++ b/README.md @@ -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.