@real-router/types 0.1.0
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 +42 -0
- package/dist/cjs/index.d.ts +1490 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/metafile-cjs.json +1 -0
- package/dist/esm/index.d.mts +1490 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/metafile-esm.json +1 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @real-router/types
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://www.typescriptlang.org/)
|
|
5
|
+
|
|
6
|
+
TypeScript type definitions for Real-Router ecosystem. Provides shared types used by all `@real-router/*` packages.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
This package is automatically installed as a dependency of `@real-router/core`. Direct installation is only needed for advanced use cases.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @real-router/types
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
// Most users should import types from @real-router/core
|
|
20
|
+
import type { Router, State, Params } from "@real-router/core";
|
|
21
|
+
|
|
22
|
+
// Direct import is available for type-only scenarios
|
|
23
|
+
import type { State, Params, NavigationOptions } from "@real-router/types";
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why This Package?
|
|
27
|
+
|
|
28
|
+
This package solves TypeScript type compatibility issues between `@real-router/*` packages:
|
|
29
|
+
|
|
30
|
+
- **Single source of truth** — all packages share identical type definitions
|
|
31
|
+
- **No type duplication** — types are not inlined into each package's `.d.ts`
|
|
32
|
+
- **Module augmentation works** — plugins can extend Router interface correctly
|
|
33
|
+
|
|
34
|
+
## Related Packages
|
|
35
|
+
|
|
36
|
+
- [@real-router/core](https://www.npmjs.com/package/@real-router/core) — Core router
|
|
37
|
+
- [@real-router/react](https://www.npmjs.com/package/@real-router/react) — React bindings
|
|
38
|
+
- [@real-router/browser-plugin](https://www.npmjs.com/package/@real-router/browser-plugin) — Browser History API
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT © [Oleg Ivanov](https://github.com/greydragon888)
|