@isoloop/preact 0.1.0-next.8 → 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 +39 -0
- package/dist/index.d.ts +96 -21
- package/dist/index.js +92 -15
- package/package.json +14 -5
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @isoloop/preact
|
|
2
|
+
|
|
3
|
+
Preact for [Isoloop](https://isoloop.dev): write an isolate as a Preact component, rendered in its worker and drawn on the page.
|
|
4
|
+
|
|
5
|
+
## What you get
|
|
6
|
+
|
|
7
|
+
- **Your components in a worker:** `defineIsolate(Component)` turns a Preact 10 or 11 component into an isolate.
|
|
8
|
+
- **Topics as state:** `useTopic` follows a topic's latest value, read again after a restart with `from: 'earliest'`, and `usePublish` writes to a topic.
|
|
9
|
+
- **The page through hooks:** `useHost` to measure, focus, scroll, navigate and get a canvas, and `useRoute` for the current location.
|
|
10
|
+
- **Portals:** `usePortalRoot` gives modals, tooltips and menus a place inside the isolate.
|
|
11
|
+
- **Errors reach the supervisor:** a render error restarts that isolate, and in a pool only that member.
|
|
12
|
+
- **Request and reply** (experimental): `useRequest`.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install @isoloop/preact @isoloop/runtime preact
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { defineIsolate, usePublish, useTopic } from '@isoloop/preact';
|
|
24
|
+
import { count } from './topics'; // a topic from your contracts
|
|
25
|
+
|
|
26
|
+
function Counter() {
|
|
27
|
+
const n = useTopic(count, { from: 'earliest' }) ?? 0;
|
|
28
|
+
const publish = usePublish(count);
|
|
29
|
+
return <button onClick={() => void publish(n + 1)}>Count: {n}</button>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default defineIsolate(Counter);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Learn more
|
|
36
|
+
|
|
37
|
+
- [Preact isolates](https://isoloop.dev/docs/isolates/#preact) and [the hooks](https://isoloop.dev/docs/isolates/#the-hooks)
|
|
38
|
+
- [What Isoloop can't hide](https://isoloop.dev/docs/limits/)
|
|
39
|
+
- [API reference](https://isoloop.dev/docs/api/preact/)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,120 @@
|
|
|
1
|
-
import { BusError, HostApi, HostApi as HostApi$1, HostCallError, IsolateContext, IsolateContext as IsolateContext$1, IsolateDefinition } from "@isoloop/runtime";
|
|
1
|
+
import { BusError, HostApi, HostApi as HostApi$1, HostCallError, IsolateContext, IsolateContext as IsolateContext$1, IsolateDefinition, RequestOptions, RequestOptions as RequestOptions$1 } from "@isoloop/runtime";
|
|
2
2
|
import { ComponentType } from "preact";
|
|
3
3
|
import { RouteValue, RouteValue as RouteValue$1, StartPosition, TopicRef } from "@isoloop/protocol";
|
|
4
|
-
/**
|
|
4
|
+
/** The props `defineIsolate` passes to the isolate's component. */
|
|
5
5
|
type IsolateProps = {
|
|
6
|
+
/** The `config` the isolate was spawned with (`manifest.config`), passed through unchanged; `undefined` when it has none. */
|
|
6
7
|
config: unknown;
|
|
7
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Makes `Component` an isolate: the module's default export, which renders it into the
|
|
11
|
+
* isolate's surface (with Preact) and unmounts it on shutdown, so effects clean up and
|
|
12
|
+
* subscriptions end. Every hook in this package works inside it.
|
|
13
|
+
*
|
|
14
|
+
* A render error is caught at the root and reported as this isolate's own crash, so in
|
|
15
|
+
* a pool it fails only this member. The isolate needs a surface: started headless, it
|
|
16
|
+
* throws an `Error` at start.
|
|
17
|
+
*
|
|
18
|
+
* @param Component - The root component. It gets {@link IsolateProps}.
|
|
19
|
+
* @returns The isolate definition, stamped with the runtime version it was built against.
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* import { defineIsolate, usePublish, useTopic } from '@isoloop/preact';
|
|
23
|
+
* import { count } from './topics';
|
|
24
|
+
*
|
|
25
|
+
* function Counter() {
|
|
26
|
+
* const n = useTopic(count, { from: 'earliest' }) ?? 0;
|
|
27
|
+
* const publish = usePublish(count);
|
|
28
|
+
* return <button onClick={() => void publish(n + 1)}>Count: {n}</button>;
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* export default defineIsolate(Counter);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
8
34
|
export declare function defineIsolate(Component: ComponentType<IsolateProps>): IsolateDefinition;
|
|
9
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* The isolate's context, as `start(ctx)` gets it: `ctx.bus`, `ctx.host`, `ctx.config` and
|
|
37
|
+
* the rest.
|
|
38
|
+
*
|
|
39
|
+
* @returns The context of the isolate this component runs in.
|
|
40
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
41
|
+
*/
|
|
10
42
|
export declare function useIsolate(): IsolateContext$1;
|
|
11
43
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
44
|
+
* The container inside this isolate's surface for modals, tooltips, toasts and menus
|
|
45
|
+
* (`ctx.portalRoot`), for `createPortal` or a library's container option. Content
|
|
46
|
+
* portalled there stays inside the isolate's surface.
|
|
47
|
+
*
|
|
48
|
+
* @returns The portal container.
|
|
49
|
+
* @throws `Error` in a headless isolate, or outside a component that `defineIsolate` rendered.
|
|
15
50
|
*/
|
|
16
51
|
export declare function usePortalRoot(): Element;
|
|
52
|
+
/** Options for {@link useTopic}. */
|
|
17
53
|
type UseTopicOptions = {
|
|
18
|
-
/** Default `latest
|
|
54
|
+
/** Where reading starts. Default `'latest'`: only records appended from now. `'earliest'` replays the topic, so a compacted one gives its current value at once. */
|
|
19
55
|
from?: StartPosition;
|
|
20
56
|
};
|
|
21
57
|
/**
|
|
22
|
-
* The latest value on `topic
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `
|
|
58
|
+
* The latest value on `topic`. It subscribes on mount and unsubscribes on unmount;
|
|
59
|
+
* a different `topic` or `from` subscribes again.
|
|
60
|
+
*
|
|
61
|
+
* An isolate has one subscription per topic. A second `useTopic` on the same topic, in
|
|
62
|
+
* another component or another call in the same one, replaces the first with no error: only
|
|
63
|
+
* the last one subscribed gets records, and the first stops updating. When the last one
|
|
64
|
+
* unmounts, the topic has no subscription, and the first doesn't get it back. Call
|
|
65
|
+
* `useTopic` once per topic, and pass the value down as props or share it through context.
|
|
66
|
+
*
|
|
67
|
+
* @param topic - The topic to read. The isolate needs a subscribe grant for it.
|
|
68
|
+
* @param opts - Where reading starts ({@link UseTopicOptions}).
|
|
69
|
+
* @returns The latest value, or `undefined` until one arrives. A bus restart that lost a
|
|
70
|
+
* memory topic clears it back to `undefined`.
|
|
71
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
26
72
|
*/
|
|
27
73
|
export declare function useTopic<Out>(topic: TopicRef<any, Out, any, any>, opts?: UseTopicOptions): Out | undefined;
|
|
28
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* A function that publishes to `topic`. The function is stable while `topic` is the same.
|
|
76
|
+
*
|
|
77
|
+
* @param topic - The topic to publish to. The isolate needs a publish grant for it.
|
|
78
|
+
* @returns `(value, opts?) => Promise<void>`, with `opts.key` for the record's key. The
|
|
79
|
+
* promise resolves once the bus has appended the record, and rejects with a `BusError`:
|
|
80
|
+
* `forbidden` without a publish grant, `invalid` when the schema rejects the value
|
|
81
|
+
* (`issues` says why), `too_large` over the topic's `maxRecordBytes`, `not_encodable`
|
|
82
|
+
* for a value the bus can't store, `quota_exceeded` when storage is full,
|
|
83
|
+
* `unknown_topic`, or `bus_unavailable`.
|
|
84
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
85
|
+
*/
|
|
29
86
|
export declare function usePublish<In>(topic: TopicRef<In, any, any, any>): (value: In, opts?: {
|
|
30
87
|
key?: string;
|
|
31
88
|
}) => Promise<void>;
|
|
32
|
-
type RequestOptions = {
|
|
33
|
-
key?: string;
|
|
34
|
-
timeoutMs?: number;
|
|
35
|
-
};
|
|
36
89
|
/**
|
|
37
|
-
* A function that sends a request on `topic` and resolves with the reply.
|
|
38
|
-
*
|
|
90
|
+
* A function that sends a request on `topic` and resolves with the first valid reply.
|
|
91
|
+
* The function is stable while `topic` is the same.
|
|
92
|
+
*
|
|
93
|
+
* @param topic - A topic with a `reply` schema.
|
|
94
|
+
* @returns `(value, opts?) => Promise<reply>`. `opts` takes `key` and `timeoutMs`
|
|
95
|
+
* (default 30 s). The promise rejects with a `BusError`: `timeout` when no reply came
|
|
96
|
+
* in time, `dropped` when retention removed the request before any subscriber got it,
|
|
97
|
+
* `reply_invalid` when the reply failed the `reply` schema, `not_requestable` on a
|
|
98
|
+
* topic without one, and the publish codes (`forbidden`, `invalid`, `too_large`,
|
|
99
|
+
* `unknown_topic`, `bus_unavailable`) for the request itself.
|
|
100
|
+
* @experimental
|
|
101
|
+
*/
|
|
102
|
+
export declare function useRequest<In, ROut>(topic: TopicRef<In, any, any, ROut>): (value: In, opts?: RequestOptions$1) => Promise<ROut>;
|
|
103
|
+
/**
|
|
104
|
+
* The isolate's host calls (`ctx.host`): `measure`, `focus`, `scrollIntoView` and
|
|
105
|
+
* `navigate`. Pass them the elements a ref holds; the host acts on what it rendered for
|
|
106
|
+
* them, after pending changes are applied.
|
|
107
|
+
*
|
|
108
|
+
* @returns The host API.
|
|
109
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
39
110
|
*/
|
|
40
|
-
export declare function useRequest<In, ROut>(topic: TopicRef<In, any, any, ROut>): (value: In, opts?: RequestOptions) => Promise<ROut>;
|
|
41
|
-
/** `measure`, `focus`, `scrollIntoView` and `navigate`, as `ctx.host` has them. */
|
|
42
111
|
export declare function useHost(): HostApi$1;
|
|
43
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* The host's current location. The route is read only while a component uses this hook.
|
|
114
|
+
*
|
|
115
|
+
* @returns The current route, or `undefined` until the first one arrives, and always
|
|
116
|
+
* with routing off.
|
|
117
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
118
|
+
*/
|
|
44
119
|
export declare function useRoute(): RouteValue$1 | undefined;
|
|
45
120
|
export { BusError, type HostApi, HostCallError, type IsolateContext, type IsolateProps, type RequestOptions, type RouteValue, type UseTopicOptions };
|
package/dist/index.js
CHANGED
|
@@ -2,25 +2,34 @@ import { BusError, HostCallError, REQUIRES } from "@isoloop/runtime";
|
|
|
2
2
|
import { Component, createContext, h, options, render } from "preact";
|
|
3
3
|
import { useCallback, useContext, useLayoutEffect, useState } from "preact/hooks";
|
|
4
4
|
import { routeTopic } from "@isoloop/protocol";
|
|
5
|
-
// src/context.ts
|
|
5
|
+
// src/isolate/context.ts
|
|
6
6
|
const IsolateCtx = createContext(null);
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The isolate's context, as `start(ctx)` gets it: `ctx.bus`, `ctx.host`, `ctx.config` and
|
|
9
|
+
* the rest.
|
|
10
|
+
*
|
|
11
|
+
* @returns The context of the isolate this component runs in.
|
|
12
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
13
|
+
*/
|
|
8
14
|
function useIsolate() {
|
|
9
15
|
const ctx = useContext(IsolateCtx);
|
|
10
16
|
if (!ctx) throw new Error("useIsolate: not inside a component rendered by defineIsolate()");
|
|
11
17
|
return ctx;
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
20
|
+
* The container inside this isolate's surface for modals, tooltips, toasts and menus
|
|
21
|
+
* (`ctx.portalRoot`), for `createPortal` or a library's container option. Content
|
|
22
|
+
* portalled there stays inside the isolate's surface.
|
|
23
|
+
*
|
|
24
|
+
* @returns The portal container.
|
|
25
|
+
* @throws `Error` in a headless isolate, or outside a component that `defineIsolate` rendered.
|
|
17
26
|
*/
|
|
18
27
|
function usePortalRoot() {
|
|
19
28
|
const portal = useIsolate().portalRoot;
|
|
20
29
|
if (!(portal instanceof Element)) throw new Error("usePortalRoot: this isolate has no surface");
|
|
21
30
|
return portal;
|
|
22
31
|
}
|
|
23
|
-
// src/define.ts
|
|
32
|
+
// src/isolate/define.ts
|
|
24
33
|
/**
|
|
25
34
|
* Catches a render error at the isolate's root and reports it as this
|
|
26
35
|
* isolate's own (`ctx.reportError`), so in a pool it crashes only this member
|
|
@@ -76,6 +85,31 @@ function bindBatches(ctx) {
|
|
|
76
85
|
};
|
|
77
86
|
Reflect.set(options, BOUND, true);
|
|
78
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Makes `Component` an isolate: the module's default export, which renders it into the
|
|
90
|
+
* isolate's surface (with Preact) and unmounts it on shutdown, so effects clean up and
|
|
91
|
+
* subscriptions end. Every hook in this package works inside it.
|
|
92
|
+
*
|
|
93
|
+
* A render error is caught at the root and reported as this isolate's own crash, so in
|
|
94
|
+
* a pool it fails only this member. The isolate needs a surface: started headless, it
|
|
95
|
+
* throws an `Error` at start.
|
|
96
|
+
*
|
|
97
|
+
* @param Component - The root component. It gets {@link IsolateProps}.
|
|
98
|
+
* @returns The isolate definition, stamped with the runtime version it was built against.
|
|
99
|
+
* @example
|
|
100
|
+
* ```tsx
|
|
101
|
+
* import { defineIsolate, usePublish, useTopic } from '@isoloop/preact';
|
|
102
|
+
* import { count } from './topics';
|
|
103
|
+
*
|
|
104
|
+
* function Counter() {
|
|
105
|
+
* const n = useTopic(count, { from: 'earliest' }) ?? 0;
|
|
106
|
+
* const publish = usePublish(count);
|
|
107
|
+
* return <button onClick={() => void publish(n + 1)}>Count: {n}</button>;
|
|
108
|
+
* }
|
|
109
|
+
*
|
|
110
|
+
* export default defineIsolate(Counter);
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
79
113
|
function defineIsolate(Component) {
|
|
80
114
|
return {
|
|
81
115
|
requires: REQUIRES,
|
|
@@ -92,10 +126,20 @@ function defineIsolate(Component) {
|
|
|
92
126
|
}
|
|
93
127
|
// src/hooks/topic.ts
|
|
94
128
|
/**
|
|
95
|
-
* The latest value on `topic
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* `
|
|
129
|
+
* The latest value on `topic`. It subscribes on mount and unsubscribes on unmount;
|
|
130
|
+
* a different `topic` or `from` subscribes again.
|
|
131
|
+
*
|
|
132
|
+
* An isolate has one subscription per topic. A second `useTopic` on the same topic, in
|
|
133
|
+
* another component or another call in the same one, replaces the first with no error: only
|
|
134
|
+
* the last one subscribed gets records, and the first stops updating. When the last one
|
|
135
|
+
* unmounts, the topic has no subscription, and the first doesn't get it back. Call
|
|
136
|
+
* `useTopic` once per topic, and pass the value down as props or share it through context.
|
|
137
|
+
*
|
|
138
|
+
* @param topic - The topic to read. The isolate needs a subscribe grant for it.
|
|
139
|
+
* @param opts - Where reading starts ({@link UseTopicOptions}).
|
|
140
|
+
* @returns The latest value, or `undefined` until one arrives. A bus restart that lost a
|
|
141
|
+
* memory topic clears it back to `undefined`.
|
|
142
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
99
143
|
*/
|
|
100
144
|
function useTopic(topic, opts = {}) {
|
|
101
145
|
const { bus } = useIsolate();
|
|
@@ -114,7 +158,18 @@ function useTopic(topic, opts = {}) {
|
|
|
114
158
|
]);
|
|
115
159
|
return value?.v;
|
|
116
160
|
}
|
|
117
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* A function that publishes to `topic`. The function is stable while `topic` is the same.
|
|
163
|
+
*
|
|
164
|
+
* @param topic - The topic to publish to. The isolate needs a publish grant for it.
|
|
165
|
+
* @returns `(value, opts?) => Promise<void>`, with `opts.key` for the record's key. The
|
|
166
|
+
* promise resolves once the bus has appended the record, and rejects with a `BusError`:
|
|
167
|
+
* `forbidden` without a publish grant, `invalid` when the schema rejects the value
|
|
168
|
+
* (`issues` says why), `too_large` over the topic's `maxRecordBytes`, `not_encodable`
|
|
169
|
+
* for a value the bus can't store, `quota_exceeded` when storage is full,
|
|
170
|
+
* `unknown_topic`, or `bus_unavailable`.
|
|
171
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
172
|
+
*/
|
|
118
173
|
function usePublish(topic) {
|
|
119
174
|
const { bus } = useIsolate();
|
|
120
175
|
return useCallback((value, o = {}) => bus.publish(topic, o.key === void 0 ? { value } : {
|
|
@@ -124,20 +179,42 @@ function usePublish(topic) {
|
|
|
124
179
|
}
|
|
125
180
|
// src/hooks/request.ts
|
|
126
181
|
/**
|
|
127
|
-
* A function that sends a request on `topic` and resolves with the reply.
|
|
128
|
-
*
|
|
182
|
+
* A function that sends a request on `topic` and resolves with the first valid reply.
|
|
183
|
+
* The function is stable while `topic` is the same.
|
|
184
|
+
*
|
|
185
|
+
* @param topic - A topic with a `reply` schema.
|
|
186
|
+
* @returns `(value, opts?) => Promise<reply>`. `opts` takes `key` and `timeoutMs`
|
|
187
|
+
* (default 30 s). The promise rejects with a `BusError`: `timeout` when no reply came
|
|
188
|
+
* in time, `dropped` when retention removed the request before any subscriber got it,
|
|
189
|
+
* `reply_invalid` when the reply failed the `reply` schema, `not_requestable` on a
|
|
190
|
+
* topic without one, and the publish codes (`forbidden`, `invalid`, `too_large`,
|
|
191
|
+
* `unknown_topic`, `bus_unavailable`) for the request itself.
|
|
192
|
+
* @experimental
|
|
129
193
|
*/
|
|
130
194
|
function useRequest(topic) {
|
|
131
195
|
const { bus } = useIsolate();
|
|
132
196
|
return useCallback((value, o) => bus.request(topic, value, o), [bus, topic.name]);
|
|
133
197
|
}
|
|
134
198
|
// src/hooks/host.ts
|
|
135
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* The isolate's host calls (`ctx.host`): `measure`, `focus`, `scrollIntoView` and
|
|
201
|
+
* `navigate`. Pass them the elements a ref holds; the host acts on what it rendered for
|
|
202
|
+
* them, after pending changes are applied.
|
|
203
|
+
*
|
|
204
|
+
* @returns The host API.
|
|
205
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
206
|
+
*/
|
|
136
207
|
function useHost() {
|
|
137
208
|
return useIsolate().host;
|
|
138
209
|
}
|
|
139
210
|
// src/hooks/route.ts
|
|
140
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* The host's current location. The route is read only while a component uses this hook.
|
|
213
|
+
*
|
|
214
|
+
* @returns The current route, or `undefined` until the first one arrives, and always
|
|
215
|
+
* with routing off.
|
|
216
|
+
* @throws `Error` outside a component that `defineIsolate` rendered.
|
|
217
|
+
*/
|
|
141
218
|
function useRoute() {
|
|
142
219
|
return useTopic(routeTopic, { from: "earliest" });
|
|
143
220
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isoloop/preact",
|
|
3
|
-
"version": "0.1.0
|
|
4
|
-
"description": "Preact
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Preact for Isoloop: run a component as an isolate in a worker, with hooks for the message bus and the host.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"isoloop",
|
|
7
|
+
"web-workers",
|
|
8
|
+
"event-loop",
|
|
9
|
+
"isolation",
|
|
10
|
+
"preact",
|
|
11
|
+
"microfrontends"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://isoloop.dev/docs/api/preact/",
|
|
5
14
|
"license": "MIT",
|
|
6
15
|
"type": "module",
|
|
7
16
|
"sideEffects": false,
|
|
@@ -23,11 +32,11 @@
|
|
|
23
32
|
"preact": "^10 || ^11"
|
|
24
33
|
},
|
|
25
34
|
"dependencies": {
|
|
26
|
-
"@isoloop/protocol": "0.1.0
|
|
27
|
-
"@isoloop/runtime": "0.1.0
|
|
35
|
+
"@isoloop/protocol": "0.1.0",
|
|
36
|
+
"@isoloop/runtime": "0.1.0"
|
|
28
37
|
},
|
|
29
38
|
"devDependencies": {
|
|
30
|
-
"@isoloop/dom": "0.1.0
|
|
39
|
+
"@isoloop/dom": "0.1.0",
|
|
31
40
|
"preact10": "npm:preact@10.29.8",
|
|
32
41
|
"preact11": "npm:preact@11.1.1",
|
|
33
42
|
"typescript": "7.0.2"
|