@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 ADDED
@@ -0,0 +1,42 @@
1
+ # @real-router/types
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](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)