@solidrt/flux-types 0.0.65 → 0.0.66
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/gui/rendertree.d.ts +1 -1
- package/gui/spatial.d.ts +3 -3
- package/index.d.ts +1 -1
- package/modules/isolate.d.ts +1 -1
- package/modules/test.d.ts +18 -2
- package/package.json +1 -1
package/gui/rendertree.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The render-tree bridge (gui-enabled runtime only): the low-level surface the
|
|
2
2
|
// renderer drives to build and mutate the native tree - create/insert/delete
|
|
3
3
|
// nodes, write properties, query layout, measure text. Displaying the built
|
|
4
|
-
// tree is the runner's concern ("
|
|
4
|
+
// tree is the runner's concern ("sol:render" in lattice), not part of this
|
|
5
5
|
// module; requestFrame here only schedules a future frame.
|
|
6
6
|
|
|
7
7
|
declare module "flux:rendertree" {
|
package/gui/spatial.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ declare module "flux:spatial" {
|
|
|
155
155
|
* left alone, so rewriting the whole array to move one component never
|
|
156
156
|
* restarts the others (a held write's target counts, so re-sending it
|
|
157
157
|
* does not restart its delay). Each settled component fires one
|
|
158
|
-
* "spatialTransitionEnd" engine event (
|
|
158
|
+
* "spatialTransitionEnd" engine event (sol:events), payload
|
|
159
159
|
* `{ node, component: NodeComponent }` - on a live node; a leaving
|
|
160
160
|
* node's settles feed its free instead (exitNode).
|
|
161
161
|
*/
|
|
@@ -646,7 +646,7 @@ declare module "flux:spatial" {
|
|
|
646
646
|
* positive fades in, negative out; past 0 the player is removed).
|
|
647
647
|
* When a player finishes or is removed without finishing (faded out,
|
|
648
648
|
* clip or target destroyed), the "spatialClipEnd" engine event
|
|
649
|
-
* (
|
|
649
|
+
* (sol:events) fires with payload { player, reason: "finished" |
|
|
650
650
|
* "dropped" }, before the same frame's handlers.
|
|
651
651
|
*/
|
|
652
652
|
export function createPlayer(clip: ClipId, targets: NodeId[], speed: number, loop: boolean, weight: number, fade: number): PlayerId
|
|
@@ -661,7 +661,7 @@ declare module "flux:spatial" {
|
|
|
661
661
|
* the player's time each advance, and its travel since the previous
|
|
662
662
|
* advance (continuous across a loop wrap, weighted by the player's
|
|
663
663
|
* weight) is reported as one "spatialRootMotion" engine event
|
|
664
|
-
* (
|
|
664
|
+
* (sol:events) per advance, payload { player, x, y, z, yaw }, before
|
|
665
665
|
* the frame's handlers. The translation is given in the root's CURRENT
|
|
666
666
|
* facing (the clip's own turn so far undone), i.e. the character's
|
|
667
667
|
* local frame. `rotation`, a rotation channel of the same clip (the
|
package/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// microphone/gpu are flux:* modules like the rest; requestAnimationFrame stays a
|
|
33
33
|
// global (web-standard name). flux:rendertree is the render-tree bridge the
|
|
34
34
|
// renderer drives; displaying the built tree (renderFrame) is the runner's
|
|
35
|
-
// concern (
|
|
35
|
+
// concern (sol:render in lattice), not part of flux.
|
|
36
36
|
/// <reference path="./gui/rendertree.d.ts" />
|
|
37
37
|
/// <reference path="./gui/camera.d.ts" />
|
|
38
38
|
/// <reference path="./gui/microphone.d.ts" />
|
package/modules/isolate.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ declare module "flux:isolate" {
|
|
|
70
70
|
/**
|
|
71
71
|
* A handle on an isolate module: a `"use isolate"` module in a SolidRT
|
|
72
72
|
* project (id = its path relative to the source root, without extension),
|
|
73
|
-
* or `isolates/<id>.
|
|
73
|
+
* or `isolates/<id>.fluxbc`/`.js` next to the entry under standalone flux. Each property is
|
|
74
74
|
* an async function that runs the export of that name in a second runtime
|
|
75
75
|
* on its own thread (own heap, own event loop, the non-gui `flux:*`
|
|
76
76
|
* modules). Arguments and results are copied ({@link Sendable}).
|
package/modules/test.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tests for a flux program: `test` registers one and `expect` asserts
|
|
3
|
-
* inside it. A test file is run by a test host, `
|
|
3
|
+
* inside it. A test file is run by a test host, `sol test <file>` (the
|
|
4
4
|
* `flux` binary's `--test` mode underneath); imported anywhere else the
|
|
5
5
|
* module throws, since nothing would run the tests.
|
|
6
6
|
*
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* `Math.random()`, are the same on every run and do not depend on the
|
|
29
29
|
* tests that ran before. It is the engine's generator in kind and
|
|
30
30
|
* resolution, only its start is fixed. An isolate the test spawns is
|
|
31
|
-
* seeded too, with a seed derived from the test's. `
|
|
31
|
+
* seeded too, with a seed derived from the test's. `sol test --seed <n>`
|
|
32
32
|
* runs the tests on another sequence.
|
|
33
33
|
*
|
|
34
34
|
* A test that does not finish within 5 seconds of real time fails as timed
|
|
@@ -88,6 +88,15 @@ declare module "flux:test" {
|
|
|
88
88
|
/** The same matchers, inverted: each throws when it does hold. */
|
|
89
89
|
not: Matchers
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* For a promise: the same matchers on its rejection reason, each
|
|
93
|
+
* awaiting the promise first and returning a promise to await in turn.
|
|
94
|
+
* A promise that fulfills fails the matcher, with or without `not`.
|
|
95
|
+
* `toThrow` sees the reason as the thrown value, so a rejection reads
|
|
96
|
+
* like a throw: `await expect(p).rejects.toThrow("no such file")`.
|
|
97
|
+
*/
|
|
98
|
+
rejects: RejectionMatchers
|
|
99
|
+
|
|
91
100
|
/** The same value, as `Object.is` sees it: `NaN` is `NaN`, `0` is not `-0`, and two equal objects are not the same. */
|
|
92
101
|
toBe(expected: unknown): void
|
|
93
102
|
|
|
@@ -139,4 +148,11 @@ declare module "flux:test" {
|
|
|
139
148
|
toBeGreaterThan(expected: number | bigint): void
|
|
140
149
|
toBeGreaterThanOrEqual(expected: number | bigint): void
|
|
141
150
|
}
|
|
151
|
+
|
|
152
|
+
/** The matchers of `expect(promise).rejects`: `Matchers`, each returning a promise. */
|
|
153
|
+
export type RejectionMatchers = {
|
|
154
|
+
[K in Exclude<keyof Matchers, "rejects">]: Matchers[K] extends (...args: infer A) => void
|
|
155
|
+
? (...args: A) => Promise<void>
|
|
156
|
+
: RejectionMatchers
|
|
157
|
+
}
|
|
142
158
|
}
|