You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[`@typescript-package/map`](https://github.com/typescript-package/map)| A lightweight **TypeScript** library for enhanced `map` management. |
50
+
|[`@typescript-package/set`](https://github.com/typescript-package/set)| A lightweight **TypeScript** library for enhanced `set` management. |
51
+
51
52
## Installation
52
53
53
54
```bash
@@ -66,6 +67,8 @@ import {
66
67
67
68
// Class.
68
69
Data,
70
+
ImmutableData,
71
+
ReadonlyData,
69
72
Value,
70
73
71
74
// `WeakData`.
@@ -77,33 +80,6 @@ import {
77
80
} from'@typescript-package/data';
78
81
```
79
82
80
-
`Map`.
81
-
82
-
```typescript
83
-
import {
84
-
// Abstract.
85
-
CoreMap,
86
-
87
-
// Class.
88
-
DataMap,
89
-
FactoryMap,
90
-
WeakDataMap,
91
-
} from'@typescript-package/data';
92
-
```
93
-
94
-
`Set`.
95
-
96
-
```typescript
97
-
import {
98
-
// Abstract.
99
-
CoreSet,
100
-
101
-
// Class.
102
-
DataSet,
103
-
ImmutableSet,
104
-
} from'@typescript-package/data';
105
-
```
106
-
107
83
Constant
108
84
109
85
```typescript
@@ -170,11 +146,11 @@ class StringData extends Data<string> {
170
146
const data =newStringData("Hello, world!");
171
147
172
148
// Access the current value
173
-
console.log(data.value); //Output: Hello, world!
149
+
console.log(data.value); //➝ Hello, world!
174
150
175
151
// Update the value
176
152
data.set("New value");
177
-
console.log(data.value); //Output: New value
153
+
console.log(data.value); //➝ New value
178
154
179
155
// Destroy the value
180
156
data.destroy();
@@ -187,234 +163,47 @@ The class to manage the value of generic type variable `Type`.
187
163
188
164
```typescript
189
165
import { Value } from'@typescript-package/data';
190
-
```
191
-
192
-
### Map
193
-
194
-
### `CoreMap`
195
-
196
-
The abstract core class is designed for building `Map` and `DataCore` related classes.
The `DataMap` is a concrete class that extends `Map` and encapsulates its data within a `DataCore` store, providing additional data management capabilities.
The `DataSet` is a concrete class that extends `CoreSet` and encapsulates its data within a `DataCore` store, providing additional data management capabilities.
-**[@typescript-package/affix](https://github.com/typescript-package/affix)**: A **lightweight TypeScript** library for the affix - prefix and suffix.
545
334
-**[@typescript-package/are](https://github.com/typescript-package/are)**: Type-safe `are` checkers for validating value types in TypeScript.
335
+
336
+
546
337
-**[@typescript-package/descriptor](https://github.com/typescript-package/descriptor)**: A **lightweight TypeScript** library for property descriptor.
547
338
-**[@typescript-package/guard](https://github.com/typescript-package/guard)**: Type-safe guards for guarding the value types in TypeScript.c
548
339
-**[@typescript-package/history](https://github.com/typescript-package/history)**: A **TypeScript** package for tracking history of values.
0 commit comments