@moneko/react 1.7.1 → 1.7.2
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/lib/link.d.tsx +3 -2
- package/lib/parse-reserved-word.d.ts +5 -2
- package/lib/use-navgate.d.ts +7 -3
- package/package.json +1 -1
package/lib/link.d.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Link as ReactRouterLink, type LinkProps as ReactRouterLinkProps } from 'react-router-dom';
|
|
3
|
-
import parseToByReservedWord from './parse-reserved-word.js';
|
|
4
|
-
export interface LinkProps extends ReactRouterLinkProps {
|
|
3
|
+
import parseToByReservedWord, { type IPath } from './parse-reserved-word.js';
|
|
4
|
+
export interface LinkProps extends Omit<ReactRouterLinkProps, 'to'> {
|
|
5
5
|
reserved?: string | string[];
|
|
6
|
+
to: string | IPath;
|
|
6
7
|
}
|
|
7
8
|
declare const Link: React.FC<LinkProps>;
|
|
8
9
|
export default Link;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Path } from 'react-router-dom';
|
|
2
2
|
declare function parse(reserved?: string | string[]);
|
|
3
3
|
declare function parseReservedWord(reserved?: string | string[]): string[];
|
|
4
|
-
|
|
4
|
+
export interface IPath extends Partial<Omit<Path, 'search'>> {
|
|
5
|
+
search?: string | URLSearchParams | string[][] | Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
declare const parseToByReservedWord: (to: string | IPath, reserved?: string | string[]) => any;
|
|
5
8
|
export default parseToByReservedWord;
|
package/lib/use-navgate.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import parseToByReservedWord from './parse-reserved-word.js';
|
|
3
|
-
|
|
1
|
+
import { type NavigateOptions, type To, useNavigate as useNavigateReactRouter } from 'react-router-dom';
|
|
2
|
+
import parseToByReservedWord, { type IPath } from './parse-reserved-word.js';
|
|
3
|
+
interface NavigateFunction {
|
|
4
|
+
(to: string | IPath, options?: NavigateOptions) : void;
|
|
5
|
+
(delta: number) : void;
|
|
6
|
+
}
|
|
7
|
+
declare const useNavigate: (reserved?: string | string[]) => any;
|
|
4
8
|
export default useNavigate;
|