@innet/server 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/action/Action/Action.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -795,14 +795,14 @@ async function Body () {
|
|
|
795
795
|
}
|
|
796
796
|
```
|
|
797
797
|
|
|
798
|
-
##
|
|
798
|
+
## useRouter
|
|
799
799
|
|
|
800
800
|
You can get router data in a component
|
|
801
801
|
|
|
802
802
|
```typescript jsx
|
|
803
803
|
import { useRouter } from '@innet/server'
|
|
804
804
|
|
|
805
|
-
|
|
805
|
+
function Router () {
|
|
806
806
|
const { prefix, params } = useRouter()
|
|
807
807
|
|
|
808
808
|
return <success>{{ prefix, params }}</success>
|
|
@@ -17,9 +17,9 @@ export declare type Files = Record<string, File | File[]>;
|
|
|
17
17
|
export declare type Request = IncomingMessage;
|
|
18
18
|
export declare type Response = ServerResponse;
|
|
19
19
|
export interface ActionOptions {
|
|
20
|
+
search: Search;
|
|
21
|
+
cookies: Cookies;
|
|
20
22
|
body?: Body;
|
|
21
|
-
search?: Search;
|
|
22
|
-
cookies?: Cookies;
|
|
23
23
|
files?: Files;
|
|
24
24
|
}
|
|
25
25
|
export declare type Resources = Exclude<keyof ActionOptions, undefined>;
|