@defold-typescript/types 0.45.0 → 0.46.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/hsm/async.d.ts +19 -1
- package/hsm/debug.d.ts +15 -1
- package/hsm/defold.d.ts +21 -1
- package/hsm/index.d.ts +154 -5
- package/package.json +1 -1
package/hsm/async.d.ts
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
// Generated from packages/hsm/src/async.ts by `bun run --cwd packages/hsm declarations`; do not edit.
|
|
2
2
|
import type { EventObject, TaskStart } from "./index";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The second argument of a `sequence` function: a wait that leaving the state cancels, and a flag
|
|
5
|
+
* that tells the state was left.
|
|
6
|
+
* @noSelf
|
|
7
|
+
*/
|
|
4
8
|
export interface SequenceSignal {
|
|
9
|
+
/**
|
|
10
|
+
* Turns `true` once the state is left. Check it after awaiting anything other than `wait`: such
|
|
11
|
+
* a promise can still resolve after the state is left, and the code after it then runs.
|
|
12
|
+
*/
|
|
5
13
|
readonly aborted: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves after `seconds`, counted by `timer.delay` rather than by `update(dt)`. A wait still
|
|
16
|
+
* pending when the state is left never resolves, so the code after it does not run.
|
|
17
|
+
*/
|
|
6
18
|
readonly wait: (seconds: number) => Promise<void>;
|
|
7
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Turns an `async` function into a state's `task`. The function gets the context and a
|
|
22
|
+
* `SequenceSignal`, and the event it returns is sent to the machine; one returned after the state
|
|
23
|
+
* is left is ignored. An error thrown inside it leaves the machine where it is and is raised
|
|
24
|
+
* again from a timer callback, so it shows in the engine console.
|
|
25
|
+
*/
|
|
8
26
|
export declare function sequence<Ctx, E extends EventObject>(run: (ctx: Ctx, signal: SequenceSignal) => Promise<NoInfer<E> | void>): TaskStart<Ctx, E>;
|
package/hsm/debug.d.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
// Generated from packages/hsm/src/debug.ts by `bun run --cwd packages/hsm declarations`; do not edit.
|
|
2
2
|
import type { EventObject, MachineInstance } from "./index";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Returned by `inspect`. Keep it on `self` and call its `draw` from `update`.
|
|
5
|
+
* @noSelf
|
|
6
|
+
*/
|
|
4
7
|
export interface MachineInspector {
|
|
8
|
+
/**
|
|
9
|
+
* Draws the label and the active leaves as debug text, 40 units above `target`'s world
|
|
10
|
+
* position. Each call also advances the frame number the console lines show. In a release
|
|
11
|
+
* build it does nothing.
|
|
12
|
+
*/
|
|
5
13
|
readonly draw: (target: Hash | Url | string) => void;
|
|
6
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Prints one line when it is called, then one line for each move `instance` makes, each starting
|
|
17
|
+
* with `hsm` and the label. Call it once after `start`. A label another `inspect` call already
|
|
18
|
+
* used gets an ordinal, such as `enemy#2`. In a release build it registers nothing and returns an
|
|
19
|
+
* inspector whose `draw` does nothing, so the calls can stay in shipped code.
|
|
20
|
+
*/
|
|
7
21
|
export declare function inspect<Ctx, E extends EventObject, P extends string>(instance: MachineInstance<Ctx, E, P>, label: string): MachineInspector;
|
package/hsm/defold.d.ts
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
// Generated from packages/hsm/src/defold.ts by `bun run --cwd packages/hsm declarations`; do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* The event `messageEvents` builds from the Defold message `K`, for a machine's event union. It
|
|
4
|
+
* holds the message id as `type`, the payload fields declared through `BuiltinMessages` and
|
|
5
|
+
* `CustomMessages`, and the `sender`.
|
|
6
|
+
*/
|
|
2
7
|
export type MessageEvent<K extends MessageId> = K extends MessageId ? {
|
|
8
|
+
/** The message id. A payload field named `type` never overrides it. */
|
|
3
9
|
readonly type: K;
|
|
10
|
+
/** The URL the message came from. A payload field named `sender` never overrides it. */
|
|
4
11
|
readonly sender: Url;
|
|
5
12
|
} & Omit<MessagePayload<K>, "type" | "sender"> : never;
|
|
6
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Returned by `messageEvents`. Build it once at module scope: it hashes the ids when it is
|
|
15
|
+
* created.
|
|
16
|
+
* @noSelf
|
|
17
|
+
*/
|
|
7
18
|
export interface MessageEventMapper<K extends MessageId> {
|
|
19
|
+
/**
|
|
20
|
+
* Turns the parameters of `on_message` into the event for that message, a new table on each
|
|
21
|
+
* call. Returns `undefined` for a message id that `messageEvents` was not given.
|
|
22
|
+
*/
|
|
8
23
|
readonly toEvent: (message_id: Hash, message: Record<string | number, unknown>, sender: Url) => MessageEvent<K> | undefined;
|
|
9
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Builds a mapper that turns the Defold messages listed in `ids` into typed machine events of
|
|
27
|
+
* the shape `{ type: id, ...payload, sender }`. Call it once at module scope: the ids are hashed
|
|
28
|
+
* here.
|
|
29
|
+
*/
|
|
10
30
|
export declare function messageEvents<const K extends MessageId>(ids: readonly K[]): MessageEventMapper<K>;
|
package/hsm/index.d.ts
CHANGED
|
@@ -1,18 +1,60 @@
|
|
|
1
1
|
// Generated from packages/hsm/src/index.ts by `bun run --cwd packages/hsm declarations`; do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* An event a machine handles: an object with a string `type`, plus any payload fields. A
|
|
4
|
+
* machine's event type is a union of these.
|
|
5
|
+
*/
|
|
2
6
|
export interface EventObject {
|
|
7
|
+
/** Names the event. A state's `on` takes these values as its keys. */
|
|
3
8
|
readonly type: string;
|
|
4
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* What made a move happen: `event` for a sent event, `after` for a timer, `update` for a path an
|
|
12
|
+
* `update` hook returned, `always` for an `always` rule, `stop` for `stop()`, and `reload` for a
|
|
13
|
+
* hot reload that changed the current state.
|
|
14
|
+
*/
|
|
5
15
|
export type MoveCause = "event" | "after" | "update" | "stop" | "reload" | "always";
|
|
6
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* A listener given to `onMove`. It gets the leaf left, the leaf entered (`undefined` after
|
|
18
|
+
* `stop()`), the cause, and the event, which is `undefined` unless the cause is `event`. It runs
|
|
19
|
+
* after the move's `enter` hooks.
|
|
20
|
+
* @noSelf
|
|
21
|
+
*/
|
|
7
22
|
export type MoveListener<E extends EventObject, P extends string = string> = (from: P, to: P | undefined, cause: MoveCause, event: E | undefined) => void;
|
|
8
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* One running machine, returned by `start`. `P` is the union of the machine's state paths; the
|
|
25
|
+
* `machine` a hook, a `run` or a `task` receives uses plain `string` paths instead.
|
|
26
|
+
* @noSelf
|
|
27
|
+
*/
|
|
9
28
|
export interface MachineInstance<Ctx, E extends EventObject, P extends string = string> {
|
|
29
|
+
/** The context passed to `start`. */
|
|
10
30
|
readonly ctx: Ctx;
|
|
31
|
+
/**
|
|
32
|
+
* The full path of the deepest active state, or `undefined` once stopped. In a parallel state
|
|
33
|
+
* it is the first region's leaf.
|
|
34
|
+
*/
|
|
11
35
|
readonly path: P | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The full path of every active leaf, in region order: one path without parallel states, empty
|
|
38
|
+
* once stopped. It is the same array on every read, updated in place.
|
|
39
|
+
*/
|
|
12
40
|
readonly leaves: readonly P[];
|
|
41
|
+
/** Whether the state at the full path `path` is active. Ancestors of the current state count. */
|
|
13
42
|
readonly matches: (path: P) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Handles `event`, or queues it when called during a step. An event no active state handles is
|
|
45
|
+
* dropped, and once the machine is stopped the call does nothing.
|
|
46
|
+
*/
|
|
14
47
|
readonly send: (event: E) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Advances the machine by `dt` seconds: runs the `update` hooks, then the `after` timers if no
|
|
50
|
+
* hook moved it. A machine whose `update` is not called is frozen in time, and once the machine
|
|
51
|
+
* is stopped the call does nothing.
|
|
52
|
+
*/
|
|
15
53
|
readonly update: (dt: number) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Exits every active state, deepest first, and sets `path` to `undefined`. Called during a
|
|
56
|
+
* step, it lets that step finish and drops the queued events.
|
|
57
|
+
*/
|
|
16
58
|
readonly stop: () => void;
|
|
17
59
|
/**
|
|
18
60
|
* Adds a listener called after each move completes, with the leaf left, the leaf entered and
|
|
@@ -22,13 +64,21 @@ export interface MachineInstance<Ctx, E extends EventObject, P extends string =
|
|
|
22
64
|
*/
|
|
23
65
|
readonly onMove: (listener: MoveListener<E, P>) => () => void;
|
|
24
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* A function a rule's `run` calls during the move, after the `exit` hooks and before the `enter`
|
|
69
|
+
* hooks. Its `event` is the variant the `on` key names.
|
|
70
|
+
*/
|
|
25
71
|
export type MoveAction<Ctx, E extends EventObject, V extends E = E> = (ctx: Ctx, event: V, machine: MachineInstance<Ctx, E>) => void;
|
|
26
72
|
interface RuleList<Rule> {
|
|
27
73
|
readonly 0: Rule;
|
|
28
74
|
readonly [index: number]: Rule;
|
|
29
75
|
readonly length: number;
|
|
30
76
|
}
|
|
31
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* The object form of a rule under `on`: a `to`, a `when` and a `run`, each optional. A rule with
|
|
79
|
+
* no `to` runs its `run` and nothing else: no state exits or enters.
|
|
80
|
+
* @noSelf
|
|
81
|
+
*/
|
|
32
82
|
export interface TransitionConfig<Ctx, E extends EventObject, V extends E = E, To extends string = string> {
|
|
33
83
|
/**
|
|
34
84
|
* The full path of the state to move to. A `to` naming the state the rule is on exits and
|
|
@@ -56,9 +106,21 @@ export interface TransitionConfig<Ctx, E extends EventObject, V extends E = E, T
|
|
|
56
106
|
/** Removed: a `to` naming the state the rule is on restarts it. */
|
|
57
107
|
readonly reenter?: never;
|
|
58
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* What an `on` key maps to: a target path, a `TransitionConfig`, or a non-empty list of them
|
|
111
|
+
* tried in order. The first rule with no `when`, or whose `when` returns `true`, is taken.
|
|
112
|
+
*/
|
|
59
113
|
export type TransitionSpec<Ctx, E extends EventObject, V extends E = E, To extends string = string> = To | TransitionConfig<Ctx, E, V, To> | RuleList<TransitionConfig<Ctx, E, V, To>>;
|
|
60
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* The object form of an `always` rule: a `to` and an optional `when`. It gets no event and has
|
|
116
|
+
* no `run`; side effects belong in the target's `enter`.
|
|
117
|
+
* @noSelf
|
|
118
|
+
*/
|
|
61
119
|
export interface AlwaysConfig<Ctx, To extends string = string> {
|
|
120
|
+
/**
|
|
121
|
+
* The full path of the state to move to. An `always` rule without one throws when the machine
|
|
122
|
+
* is defined.
|
|
123
|
+
*/
|
|
62
124
|
readonly to: To;
|
|
63
125
|
/** Checked on every recheck, so it must have no side effects. */
|
|
64
126
|
readonly when?: (ctx: Ctx) => boolean;
|
|
@@ -67,7 +129,15 @@ export interface AlwaysConfig<Ctx, To extends string = string> {
|
|
|
67
129
|
/** Renamed to `when`. */
|
|
68
130
|
readonly guard?: never;
|
|
69
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* What `always` takes: a target path, an `AlwaysConfig`, or a non-empty list of them. The first
|
|
134
|
+
* whose `when` is missing or passes is taken.
|
|
135
|
+
*/
|
|
70
136
|
export type AlwaysSpec<Ctx, To extends string = string> = To | AlwaysConfig<Ctx, To> | RuleList<AlwaysConfig<Ctx, To>>;
|
|
137
|
+
/**
|
|
138
|
+
* A state's rules by event `type`. Only the machine's event types are keys, and each rule's
|
|
139
|
+
* `when` and `run` see the event variant its key names.
|
|
140
|
+
*/
|
|
71
141
|
export type OnConfig<Ctx, E extends EventObject, To extends string = string> = {
|
|
72
142
|
readonly [K in E["type"]]?: TransitionSpec<Ctx, E, Extract<E, {
|
|
73
143
|
type: K;
|
|
@@ -79,6 +149,11 @@ export type OnConfig<Ctx, E extends EventObject, To extends string = string> = {
|
|
|
79
149
|
* event; event data reaches `enter` through `ctx`, set in `run`.
|
|
80
150
|
*/
|
|
81
151
|
export type StateHook<Ctx, E extends EventObject> = (ctx: Ctx, machine: MachineInstance<Ctx, E>) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Runs on every `update(dt)` while the state is active, deepest state first. It returns a full
|
|
154
|
+
* path to move there, or `undefined` to pass. The first hook to return a path wins: the hooks
|
|
155
|
+
* above it and the `after` timers do not run on that call, and the move has no `run`.
|
|
156
|
+
*/
|
|
82
157
|
export type UpdateHook<Ctx, E extends EventObject, To extends string = string> = (ctx: Ctx, dt: number, machine: MachineInstance<Ctx, E>) => To | undefined;
|
|
83
158
|
/**
|
|
84
159
|
* Starts work that lives as long as the state. `finish` sends one event and is ignored after the
|
|
@@ -86,8 +161,17 @@ export type UpdateHook<Ctx, E extends EventObject, To extends string = string> =
|
|
|
86
161
|
* @noSelf
|
|
87
162
|
*/
|
|
88
163
|
export type TaskStart<Ctx, E extends EventObject> = (ctx: Ctx, finish: (event: E) => void, machine: MachineInstance<Ctx, E>) => (() => void) | void;
|
|
89
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* A machine definition, returned by the second `defineMachine` call. Its `start` creates the
|
|
166
|
+
* instances that run.
|
|
167
|
+
* @noSelf
|
|
168
|
+
*/
|
|
90
169
|
export interface Machine<Ctx, E extends EventObject, P extends string = string> {
|
|
170
|
+
/**
|
|
171
|
+
* Creates an instance with `ctx` as its context and enters the root's `initial` chain. Each
|
|
172
|
+
* call returns a separate instance, which has already handled the events its `enter` hooks
|
|
173
|
+
* sent.
|
|
174
|
+
*/
|
|
91
175
|
readonly start: (ctx: Ctx) => MachineInstance<Ctx, E, P>;
|
|
92
176
|
}
|
|
93
177
|
type PathDepth = [never, 0, 1, 2, 3];
|
|
@@ -105,6 +189,10 @@ type TreeOf<C> = C extends {
|
|
|
105
189
|
} ? {
|
|
106
190
|
readonly [K in keyof Children]: TreeOf<Children[K]>;
|
|
107
191
|
} : unknown;
|
|
192
|
+
/**
|
|
193
|
+
* The union of a config's state paths, each with its leading `/`. Paths are spelled out four
|
|
194
|
+
* levels deep; below that, any string under a fourth-level path is accepted.
|
|
195
|
+
*/
|
|
108
196
|
export type StatePath<C> = TreePath<TreeOf<C>>;
|
|
109
197
|
type TreeDepth<T, D extends number> = unknown extends T ? number : [D] extends [never] ? number : 1 | ({
|
|
110
198
|
[K in keyof T]: unknown extends T[K] ? never : TreeDepth<T[K], PathDepth[D]>;
|
|
@@ -114,16 +202,43 @@ type AnyChild<Ctx, E extends EventObject, T, To extends string> = unknown extend
|
|
|
114
202
|
} : unknown;
|
|
115
203
|
/** @noSelf */
|
|
116
204
|
interface StateBase<Ctx, E extends EventObject, T, Self extends string, To extends string> {
|
|
205
|
+
/** Child states, by name. A name is non-empty and contains no `/`. */
|
|
117
206
|
readonly states?: {
|
|
118
207
|
readonly [K in keyof T]: StateNode<Ctx, E, T[K], `${Self}/${K & string}`, To>;
|
|
119
208
|
} & NoInfer<AnyChild<Ctx, E, T, To>>;
|
|
209
|
+
/**
|
|
210
|
+
* Rules by event `type`, each a target path, a rule object or a list of them. An event starts
|
|
211
|
+
* at the deepest active state and moves up to the parent while no rule takes it.
|
|
212
|
+
*/
|
|
120
213
|
readonly on?: NoInfer<OnConfig<Ctx, E, To>>;
|
|
214
|
+
/**
|
|
215
|
+
* Targets by delay in seconds of game time. The delay is counted by `update(dt)` while the
|
|
216
|
+
* state is active, from zero on each entry. One `update` call fires at most one timer, and
|
|
217
|
+
* none when an `update` hook moved the machine.
|
|
218
|
+
*/
|
|
121
219
|
readonly after?: NoInfer<{
|
|
122
220
|
readonly [seconds: number]: To;
|
|
123
221
|
}>;
|
|
222
|
+
/**
|
|
223
|
+
* Targets taken right after any move that leaves this state active; the first whose `when` is
|
|
224
|
+
* missing or passes wins. It is checked after a move only: not after a rule with no `to`, and
|
|
225
|
+
* not on an `update` call that moves nothing.
|
|
226
|
+
*/
|
|
124
227
|
readonly always?: AlwaysSpec<Ctx, To>;
|
|
228
|
+
/**
|
|
229
|
+
* Runs each time the state is entered, outermost state first: on a move, at `start`, and when
|
|
230
|
+
* a hot reload adds the state. It gets no event.
|
|
231
|
+
*/
|
|
125
232
|
readonly enter?: StateHook<Ctx, E>;
|
|
233
|
+
/**
|
|
234
|
+
* Runs each time the state is left, deepest state first, including on `stop()`. A state a hot
|
|
235
|
+
* reload removes is dropped without it.
|
|
236
|
+
*/
|
|
126
237
|
readonly exit?: StateHook<Ctx, E>;
|
|
238
|
+
/**
|
|
239
|
+
* Runs on every `update(dt)` while the state is active. Return one of the machine's full paths
|
|
240
|
+
* to move there, or `undefined` to stay.
|
|
241
|
+
*/
|
|
127
242
|
readonly update?: NoInfer<UpdateHook<Ctx, E, To>>;
|
|
128
243
|
/** Started on each entry; see `TaskStart`. */
|
|
129
244
|
readonly task?: TaskStart<Ctx, E>;
|
|
@@ -132,12 +247,30 @@ interface StateBase<Ctx, E extends EventObject, T, Self extends string, To exten
|
|
|
132
247
|
}
|
|
133
248
|
/** @noSelf */
|
|
134
249
|
interface CompoundState<Ctx, E extends EventObject, T, Self extends string, To extends string> extends StateBase<Ctx, E, T, Self, To> {
|
|
250
|
+
/**
|
|
251
|
+
* `"parallel"` keeps every child active at once, each as a region with its own active state.
|
|
252
|
+
* Not allowed on the root.
|
|
253
|
+
*/
|
|
135
254
|
readonly type?: never;
|
|
255
|
+
/**
|
|
256
|
+
* The full path of the child entered with this state, such as `/on/bright` inside `on`.
|
|
257
|
+
* Required when `states` is set, unless the state is parallel.
|
|
258
|
+
*/
|
|
136
259
|
readonly initial?: NoInfer<unknown extends T ? string : `${Self}/${keyof T & string}`>;
|
|
260
|
+
/**
|
|
261
|
+
* Makes the state remember which child was active when it was last left, and enter it again
|
|
262
|
+
* instead of `initial`. The count is how many levels down to restore, and `"all"` restores
|
|
263
|
+
* every level below the state. The first entry uses `initial`, and a move that targets a state
|
|
264
|
+
* inside this one lands on that target.
|
|
265
|
+
*/
|
|
137
266
|
readonly restoreDepth?: NoInfer<TreeDepth<T, 4> | "all">;
|
|
138
267
|
}
|
|
139
268
|
/** @noSelf */
|
|
140
269
|
interface ParallelState<Ctx, E extends EventObject, T, Self extends string, To extends string> extends StateBase<Ctx, E, T, Self, To> {
|
|
270
|
+
/**
|
|
271
|
+
* `"parallel"` keeps every child active at once, each as a region with its own active state.
|
|
272
|
+
* Not allowed on the root.
|
|
273
|
+
*/
|
|
141
274
|
readonly type: "parallel";
|
|
142
275
|
readonly initial?: never;
|
|
143
276
|
readonly restoreDepth?: never;
|
|
@@ -147,12 +280,28 @@ type RootState<Ctx, E extends EventObject, T> = CompoundState<Ctx, E, T, "", NoI
|
|
|
147
280
|
readonly initial: string;
|
|
148
281
|
readonly states: object;
|
|
149
282
|
};
|
|
283
|
+
/**
|
|
284
|
+
* The config of one state. Every field is optional. A state with child `states` is a compound
|
|
285
|
+
* state and needs an `initial`, unless its `type` is `"parallel"`; a state without children is a
|
|
286
|
+
* leaf.
|
|
287
|
+
*/
|
|
150
288
|
export type StateConfig<Ctx, E extends EventObject> = StateNode<Ctx, E, unknown, string, string>;
|
|
289
|
+
/**
|
|
290
|
+
* The root config passed to `defineMachine`. It takes the fields of a state and requires
|
|
291
|
+
* `initial` and `states`. The root has no name and cannot be parallel.
|
|
292
|
+
*/
|
|
151
293
|
export type MachineConfig<Ctx, E extends EventObject> = CompoundState<Ctx, E, unknown, string, string> & {
|
|
152
294
|
readonly initial: string;
|
|
153
295
|
readonly states: {
|
|
154
296
|
readonly [name: string]: StateConfig<Ctx, E>;
|
|
155
297
|
};
|
|
156
298
|
};
|
|
299
|
+
/**
|
|
300
|
+
* Defines a machine in two calls: `defineMachine<Ctx, E>()` fixes the context and event types and
|
|
301
|
+
* takes an optional hot-reload key, and the second call takes the config. The config is checked
|
|
302
|
+
* when that call runs, and a mistake throws, naming the state path. With a key, a later
|
|
303
|
+
* definition under it puts its states into the machine already built, so every running instance
|
|
304
|
+
* sees the edit; without one, each call builds a separate machine.
|
|
305
|
+
*/
|
|
157
306
|
export declare function defineMachine<Ctx, E extends EventObject>(key?: string): <T>(config: RootState<Ctx, E, T>) => Machine<Ctx, E, TreePath<T>>;
|
|
158
307
|
export {};
|