@solidrt/flux-types 0.0.10 → 0.0.13

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 CHANGED
@@ -1,6 +1,13 @@
1
1
  # @solidrt/flux-types
2
2
 
3
- TypeScript type definitions for the `Flux` runtime global in [SolidRT](https://github.com/wellawaretech/solidrt) apps.
3
+ TypeScript type definitions for the [SolidRT](https://github.com/wellawaretech/solidrt)
4
+ `flux` runtime: the `Flux` global, the `flux:*` capability modules, the
5
+ web-standard globals flux provides, and the GUI globals.
6
+
7
+ The runtime is QuickJS, not a browser or Node, so it ships neither `lib.dom` nor
8
+ the Bun/Node libraries. This package is the single source of truth for everything
9
+ the flux runtime exposes, including web standards like `fetch`, `Response`,
10
+ `WebSocket`, `console`, and timers.
4
11
 
5
12
  ## Installation
6
13
 
@@ -8,31 +15,45 @@ TypeScript type definitions for the `Flux` runtime global in [SolidRT](https://g
8
15
  bun add -d @solidrt/flux-types
9
16
  ```
10
17
 
11
- Then **you must add it to the `types` array** in your `tsconfig.json`. This is
12
- required: the `flux:*` modules are ambient declarations, so they are only
13
- visible to TypeScript when the package is listed in `types`. Without this you
14
- will get `Cannot find module 'flux:fs'` (and the same for `flux:http`,
15
- `flux:process`, etc.).
18
+ Then configure `tsconfig.json` so TypeScript uses these types and does **not**
19
+ pull in browser or Bun/Node globals that the runtime does not have:
16
20
 
17
21
  ```json
18
22
  {
19
23
  "compilerOptions": {
24
+ "lib": ["ESNext"],
20
25
  "types": ["@solidrt/flux-types"]
21
26
  }
22
27
  }
23
28
  ```
24
29
 
25
- If you already have a `types` array (for example with `@types/bun`), **add to
26
- it** rather than replacing it listing `types` disables TypeScript's automatic
27
- type inclusion, so every package you rely on must be named:
28
-
29
- ```json
30
- {
31
- "compilerOptions": {
32
- "types": ["bun", "@solidrt/flux-types"]
33
- }
34
- }
35
- ```
30
+ - `lib: ["ESNext"]` keeps the genuine ECMAScript types (Promise, Array, Map,
31
+ TypedArrays, `Symbol.asyncIterator`) while dropping the DOM. Including `"dom"`
32
+ would advertise `document`, `window`, `localStorage`, and other APIs that do
33
+ not exist in flux.
34
+ - `types: ["@solidrt/flux-types"]` makes the `flux:*` modules (ambient module
35
+ declarations) and the runtime globals visible.
36
+
37
+ Do **not** also add `@types/bun` or `@types/node`: they declare `Bun.*`,
38
+ `bun:*`/`node:*` modules, `process`, `Buffer`, and other APIs the runtime does
39
+ not provide, and they collide with the web-standard globals declared here.
40
+
41
+ If you already maintain a `types` array, add to it rather than replacing it:
42
+ listing `types` disables TypeScript's automatic inclusion, so every package you
43
+ rely on must be named.
44
+
45
+ ## What's covered
46
+
47
+ - `Flux` global (`version`, `capabilities`).
48
+ - `flux:*` modules: `flux:http`, `flux:fs`, `flux:sqlite`, `flux:subprocess`,
49
+ `flux:p2p`, `flux:process`, `flux:path`, and (on a gui-enabled runtime)
50
+ `flux:camera`, `flux:microphone`, `flux:gpu`.
51
+ - Web-standard globals: `console`, `fetch` + `Headers`/`Request`/`Response`,
52
+ `setTimeout`/`setInterval`/`queueMicrotask`, `performance`, `WebSocket`,
53
+ `TextEncoder`/`TextDecoder`. These are deliberate subsets matching exactly what
54
+ the runtime implements.
55
+ - GUI globals (gui-enabled runtime only): `requestAnimationFrame` /
56
+ `cancelAnimationFrame` (web-standard names, so kept global).
36
57
 
37
58
  ## License
38
59
 
@@ -0,0 +1,67 @@
1
+ // Camera capture (gui-enabled runtime only). The imperative primitive;
2
+ // @solidrt/core's createCamera wraps it with SolidJS reactivity. `open` resolves
3
+ // to a bound session object, so the raw handle never leaves the runtime.
4
+
5
+ declare module "flux:camera" {
6
+ /** A camera device from {@link listCameras}. */
7
+ type CameraDevice = {
8
+ /** Device id to pass as `open({ camera })`. */
9
+ id: number
10
+ /** Human-readable device name. */
11
+ name: string
12
+ /** Which way the camera faces. */
13
+ facing: "front" | "back" | "unknown"
14
+ }
15
+
16
+ /** Options for {@link open}. */
17
+ type CameraOpenOptions = {
18
+ /** Device id from {@link CameraDevice}. Omit to let the runtime choose. */
19
+ camera?: number
20
+ /** Prefer a front- or back-facing camera. */
21
+ facing?: "front" | "back"
22
+ /** Requested capture width in pixels. */
23
+ width?: number
24
+ /** Requested capture height in pixels. */
25
+ height?: number
26
+ /** Barcode formats to scan each frame for. Only "qr" is supported. */
27
+ scan?: "qr"[]
28
+ }
29
+
30
+ /** A decoded barcode. */
31
+ type Barcode = {
32
+ /** The decoded payload. */
33
+ data: string
34
+ /** The barcode format (currently always "qr"). */
35
+ format: "qr"
36
+ }
37
+
38
+ /** An opened camera session: the frame texture plus controls bound to it. */
39
+ type CameraSession = {
40
+ /** GPU texture id the latest frame is uploaded into (use as a texture source). */
41
+ texture: number
42
+ /** Frame width in pixels. */
43
+ width: number
44
+ /** Frame height in pixels. */
45
+ height: number
46
+ /**
47
+ * Register (or replace) the callback that receives decoded barcodes (only
48
+ * fires when the session was opened with a `scan` option).
49
+ */
50
+ onBarcode(callback: (barcode: Barcode) => void): void
51
+ /** Release the device. */
52
+ close(): void
53
+ }
54
+
55
+ /** List the available camera devices. */
56
+ export function listCameras(): CameraDevice[]
57
+ /**
58
+ * Open a camera. Opening is also the permission request: the promise rejects
59
+ * if permission is denied, and resolves once the first frame is ready.
60
+ */
61
+ export function open(options?: CameraOpenOptions): Promise<CameraSession>
62
+ /**
63
+ * One-shot scan of an RGBA8 pixel buffer (exactly width*height*4 bytes).
64
+ * Returns every decoded barcode.
65
+ */
66
+ export function scanImage(data: Uint8Array, width: number, height: number): Barcode[]
67
+ }
package/gui/gpu.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ // Low-level GPU textures and fragment shaders (gui-enabled runtime only). The
2
+ // imperative primitive; @solidrt/core's gpu helpers add reactive auto-cleanup on
3
+ // top. Texture ids are the public token (used as `<texture src>` and shader
4
+ // sampler inputs), so there is no handle to hide here.
5
+
6
+ declare module "flux:gpu" {
7
+ /**
8
+ * Create an immutable texture from an RGBA8 pixel buffer (exactly
9
+ * width*height*4 bytes). Returns the texture id.
10
+ */
11
+ export function createTexture(data: Uint8Array, width: number, height: number): number
12
+ /**
13
+ * Create a texture intended to be updated later via {@link uploadTexture}. The
14
+ * seed buffer must hold at least one frame (width*height*4 bytes) and may hold
15
+ * more (uploadTexture selects a frame by offset).
16
+ */
17
+ export function createMutableTexture(data: Uint8Array, width: number, height: number): number
18
+ /**
19
+ * Replace a mutable texture's pixels. `data` may hold several frames; `offset`
20
+ * (default 0) selects which frame to upload.
21
+ */
22
+ export function uploadTexture(id: number, data: Uint8Array, offset?: number): void
23
+ /** Destroy a texture (immutable, mutable, or shader). */
24
+ export function destroyTexture(id: number): void
25
+ /**
26
+ * Compile a GLSL ES fragment shader into an offscreen texture of the given
27
+ * size. `params` sets float uniforms by name; `textures` binds sampler2D
28
+ * uniforms to texture ids. Returns the resulting texture id.
29
+ */
30
+ export function createShader(
31
+ fragmentSrc: string,
32
+ width: number,
33
+ height: number,
34
+ params?: Record<string, number>,
35
+ textures?: Record<string, number>,
36
+ ): number
37
+ /** Update a shader texture's float uniforms by name and re-render it. */
38
+ export function setShaderParams(id: number, params: Record<string, number>): void
39
+ }
@@ -0,0 +1,39 @@
1
+ // Microphone capture (gui-enabled runtime only). The imperative primitive;
2
+ // @solidrt/core's createMicrophone wraps it with SolidJS reactivity. `open`
3
+ // returns a bound session object, so the raw handle never leaves the runtime.
4
+
5
+ declare module "flux:microphone" {
6
+ /** A microphone device from {@link listMicrophones}. */
7
+ type MicrophoneDevice = {
8
+ /** Device id to pass as `open({ microphone })`. */
9
+ id: number
10
+ /** Human-readable device name. */
11
+ name: string
12
+ }
13
+
14
+ /** Options for {@link open}. */
15
+ type MicrophoneOpenOptions = {
16
+ /** Device id from {@link MicrophoneDevice}. Omit to use the default. */
17
+ microphone?: number
18
+ /** Capture sample rate in Hz. Defaults to 16000. */
19
+ sampleRate?: number
20
+ }
21
+
22
+ /** An opened microphone session with controls bound to it. */
23
+ type MicrophoneSession = {
24
+ /** The actual capture sample rate in Hz. */
25
+ sampleRate: number
26
+ /** Drain the mono float samples captured since the last read. */
27
+ read(): Float32Array
28
+ /** Release the device. */
29
+ close(): void
30
+ }
31
+
32
+ /** List the available microphone devices. */
33
+ export function listMicrophones(): MicrophoneDevice[]
34
+ /**
35
+ * Open a microphone. Synchronous: current platforms expose no audio permission
36
+ * prompt.
37
+ */
38
+ export function open(options?: MicrophoneOpenOptions): MicrophoneSession
39
+ }
package/gui/raf.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ // Animation-frame scheduling globals (gui-enabled runtime only).
2
+
3
+ declare global {
4
+ /**
5
+ * Request that `callback` run before the next rendered frame, receiving the
6
+ * frame timestamp in milliseconds. Returns an id for
7
+ * {@link cancelAnimationFrame}. Available only on a gui-enabled runtime.
8
+ */
9
+ function requestAnimationFrame(callback: (timestamp: number) => void): number
10
+ /** Cancel a frame callback scheduled with {@link requestAnimationFrame}. */
11
+ function cancelAnimationFrame(id: number): void
12
+ }
13
+
14
+ export {}
@@ -0,0 +1,47 @@
1
+ // The render-tree bridge (gui-enabled runtime only): the low-level surface the
2
+ // renderer drives to build and mutate the native tree - create/insert/delete
3
+ // nodes, write properties, query layout, measure text. Displaying the built
4
+ // tree is the runner's concern ("srt:render" in lattice), not part of this
5
+ // module; requestFrame here only schedules a future frame.
6
+
7
+ declare module "flux:rendertree" {
8
+ /** Font options for {@link measureText}. */
9
+ export interface MeasureTextOptions {
10
+ fontFamily?: "sans" | "mono" | (string & {})
11
+ fontSize?: number
12
+ fontStyle?: "normal" | "italic"
13
+ fontWeight?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
14
+ maxLines?: number
15
+ }
16
+
17
+ /** Create the window root node with the given id. */
18
+ export function createRoot(id: number): void
19
+ /** Create a node of `kind` (the primitive element name) with the given id. */
20
+ export function createNode(id: number, kind: string): void
21
+ /** Insert `nodeId` under `parentId`, before `anchorId` if given (else appended). */
22
+ export function insertNode(parentId: number, nodeId: number, anchorId?: number): void
23
+ /** Detach and destroy `nodeId` from under `parentId`. */
24
+ export function deleteNode(parentId: number, nodeId: number): void
25
+ /** Write a single property on a node; `value` is marshalled per property. */
26
+ export function setProperty(nodeId: number, name: string, value: unknown): void
27
+ /** Enable or disable text-input capture / the on-screen keyboard. */
28
+ export function setTextInputActive(active: boolean): void
29
+ /** Request that a frame be rendered soon (coalesced by the demand-driven loop). */
30
+ export function requestFrame(): void
31
+ /**
32
+ * Lay out, paint and submit the whole tree to the screen now (one frame). The
33
+ * direct draw path for a flux + alloy app; requestFrame only schedules a
34
+ * future frame and leaves the actual draw to the runner.
35
+ */
36
+ export function render(): void
37
+ /**
38
+ * Measure the rendered size of `text` under the given font options, without
39
+ * adding it to the tree.
40
+ */
41
+ export function measureText(text: string, options?: MeasureTextOptions): { width: number, height: number }
42
+ /**
43
+ * The node's window-relative bounding box from the most recent layout, or
44
+ * `null` if it has no layout or has not been laid out yet.
45
+ */
46
+ export function getBoundingBox(id: number): { x: number, y: number, width: number, height: number } | null
47
+ }
package/index.d.ts CHANGED
@@ -1,206 +1,37 @@
1
+ /// <reference path="./modules/process.d.ts" />
2
+ /// <reference path="./modules/path.d.ts" />
3
+ /// <reference path="./modules/http.d.ts" />
4
+ /// <reference path="./modules/fs.d.ts" />
5
+ /// <reference path="./modules/sqlite.d.ts" />
6
+ /// <reference path="./modules/subprocess.d.ts" />
7
+ /// <reference path="./modules/p2p.d.ts" />
8
+
9
+ // Web-standard globals. The runtime is QuickJS, not a browser or Node, so it
10
+ // ships no lib.dom / @types/bun: these declarations are the sole source for
11
+ // console, fetch, the Fetch types, timers, WebSocket, and the encoders.
12
+ /// <reference path="./standards/console.d.ts" />
13
+ /// <reference path="./standards/time.d.ts" />
14
+ /// <reference path="./standards/text.d.ts" />
15
+ /// <reference path="./standards/fetch.d.ts" />
16
+ /// <reference path="./standards/websocket.d.ts" />
17
+
18
+ // GUI capabilities (present only on a gui-enabled runtime). rendertree/camera/
19
+ // microphone/gpu are flux:* modules like the rest; requestAnimationFrame stays a
20
+ // global (web-standard name). flux:rendertree is the render-tree bridge the
21
+ // renderer drives; displaying the built tree (renderFrame) is the runner's
22
+ // concern (srt:render in lattice), not part of flux.
23
+ /// <reference path="./gui/rendertree.d.ts" />
24
+ /// <reference path="./gui/camera.d.ts" />
25
+ /// <reference path="./gui/microphone.d.ts" />
26
+ /// <reference path="./gui/gpu.d.ts" />
27
+ /// <reference path="./gui/raf.d.ts" />
28
+
1
29
  declare let Flux: {
30
+ /** The flux runtime version. */
2
31
  version: string
3
- }
4
-
5
- declare module "flux:process" {
6
- /**
7
- * The program's command-line arguments. `argv[0]` is the script path;
8
- * `argv[1]` onward are the user-supplied arguments.
9
- */
10
- export let argv: string[]
11
- /** The host OS: "darwin", "win32", "linux", "android", ... */
12
- export let platform: string
13
- /** The CPU architecture: "x64", "arm64", ... */
14
- export let arch: string
15
- /**
16
- * Listen for an OS signal. The callback receives the signal name. Returns an
17
- * unsubscribe function. Unix only; a no-op elsewhere.
18
- *
19
- * @param signal One of "SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT", "SIGUSR1",
20
- * "SIGUSR2".
21
- * @param callback Invoked on each delivery with the signal name.
22
- * @returns An unsubscribe function.
23
- */
24
- export function on(signal: string, callback: (signal: string) => void): () => void
25
- /**
26
- * Like {@link on}, but the listener fires at most once and then unsubscribes.
27
- *
28
- * @param signal One of "SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT", "SIGUSR1",
29
- * "SIGUSR2".
30
- * @param callback Invoked once with the signal name.
31
- * @returns An unsubscribe function.
32
- */
33
- export function once(signal: string, callback: (signal: string) => void): () => void
34
- }
35
-
36
- declare module "flux:path" {
37
- /**
38
- * Resolves `path` against the trusted base directory `base`, returning the
39
- * absolute result only if it stays inside `base`; otherwise `null`. Fusing
40
- * normalization and containment means a `..`-laden or absolute `path` that
41
- * would escape `base` is rejected rather than silently resolved.
42
- *
43
- * Purely lexical: it does not resolve symlinks, so a symlink inside `base`
44
- * pointing out of it is not caught.
45
- *
46
- * @param base Trusted root directory. Relative values resolve against cwd.
47
- * @param path Untrusted path to place within `base`.
48
- * @returns The contained absolute path, or `null` if it would escape `base`.
49
- *
50
- * @example
51
- * let target = resolveWithin(".", req.params.page)
52
- * if (!target) return new Response("Not found", { status: 404 })
53
- */
54
- export function resolveWithin(base: string, path: string): string | null
55
-
56
- /**
57
- * Joins and normalizes path `segments`. Lexical only, with no containment
58
- * guarantee; use `resolveWithin` when a segment is untrusted.
59
- */
60
- export function join(...segments: string[]): string
61
- }
62
-
63
- declare module "flux:http" {
64
- /** Path parameters captured from a route pattern (e.g. ":page"). */
65
- type RouteParams = Record<string, string>
66
-
67
- /** The request passed to a route handler, with captured route params. */
68
- type FluxRequest = Request & {
69
- params: RouteParams
70
- }
71
-
72
- /** Handles a matched route, returning a `Response` (or a promise of one). */
73
- type RouteHandler = (req: FluxRequest) => Response | Promise<Response>
74
-
75
- type ServeOptions = {
76
- /** Port to listen on. */
77
- port?: number
78
- /** Hostname/interface to bind. Defaults to all interfaces. */
79
- hostname?: string
80
- /**
81
- * Route table keyed by path pattern. Patterns may contain `:name`
82
- * segments, exposed on `req.params`.
83
- */
84
- routes: Record<string, RouteHandler>
85
- }
86
-
87
- type Server = {
88
- port: number
89
- hostname: string
90
- /** Stop accepting connections and shut the server down. */
91
- stop(): void
92
- }
93
-
94
- /**
95
- * Start an HTTP server with the given route table.
96
- *
97
- * @param options Port, hostname, and routes.
98
- * @returns The running {@link Server}.
99
- */
100
- export function serve(options: ServeOptions): Server
101
- }
102
-
103
- declare module "flux:fs" {
104
- type DirEntry = {
105
- name: string
106
- type: "file" | "directory" | "symlink" | "other"
107
- }
108
-
109
- type FileStat = {
110
- size: number
111
- type: string
112
- mtime?: number
113
- }
114
-
115
- type FluxFile = {
116
- path: string
117
- /** Read the whole file as UTF-8 text. */
118
- text(): Promise<string>
119
- /** Read the whole file as raw bytes. */
120
- bytes(): Promise<Uint8Array>
121
- /** Read and parse the file as JSON. */
122
- json(): Promise<any>
123
- /** Resolve to whether the file exists. */
124
- exists(): Promise<boolean>
125
- /** Resolve to the file's metadata (size, type, mtime). */
126
- stat(): Promise<FileStat>
127
- /** Write `data`, replacing any existing contents. */
128
- write(data: string | Uint8Array): Promise<void>
129
- }
130
-
131
- type FluxDir = {
132
- path: string
133
- /** List the directory's immediate entries (non-recursive). */
134
- entries(): Promise<DirEntry[]>
135
- /** Resolve to whether the directory exists. */
136
- exists(): Promise<boolean>
137
- }
138
-
139
- /**
140
- * Reference a file by path. Lazy: no I/O happens until a method is called.
141
- *
142
- * @param path Path to the file.
143
- */
144
- export function file(path: string): FluxFile
145
32
  /**
146
- * Reference a directory by path. Lazy: no I/O happens until a method is
147
- * called.
148
- *
149
- * @param path Path to the directory.
33
+ * Feature names this build/runtime provides. Branch on availability rather
34
+ * than the OS, e.g. `Flux.capabilities.includes("subprocess")`.
150
35
  */
151
- export function dir(path: string): FluxDir
152
- }
153
-
154
- declare module "flux:sqlite" {
155
- /** Values accepted as bound parameters. booleans bind as 0/1. */
156
- type SqlParam = null | boolean | number | string | Uint8Array
157
- /** Values returned in result rows. BLOB comes back as Uint8Array. */
158
- type SqlValue = null | number | string | Uint8Array
159
- type Row = Record<string, SqlValue>
160
-
161
- /** The outcome of a write. */
162
- type RunResult = { changes: number; lastInsertRowid: number }
163
-
164
- /**
165
- * A reusable prepared statement. Created with {@link Database.query}; its
166
- * executions reuse the compiled statement (cached on the connection).
167
- */
168
- export class Statement {
169
- /** Run the statement and resolve to all matching rows. */
170
- all(params?: SqlParam[]): Promise<Row[]>
171
- /** Run the statement and resolve to the first row, or `undefined`. */
172
- get(params?: SqlParam[]): Promise<Row | undefined>
173
- /** Run the statement as a write and resolve to its {@link RunResult}. */
174
- run(params?: SqlParam[]): Promise<RunResult>
175
- }
176
-
177
- /**
178
- * Open mode: "ro" (default, read-only, must exist), "rw" (read-write, must
179
- * exist), "rw+" (read-write, create if missing).
180
- */
181
- type OpenMode = "ro" | "rw" | "rw+"
182
-
183
- export class Database {
184
- /**
185
- * Open a connection to the database at `path`.
186
- *
187
- * @param path Database file path.
188
- * @param mode Open mode; defaults to "ro".
189
- */
190
- static connect(path: string, mode?: OpenMode): Promise<Database>
191
- /** Create a reusable prepared statement (synchronous; compiles on first run). */
192
- query(sql: string): Statement
193
- /** One-shot write; uses plain prepare (no caching). */
194
- run(sql: string, params?: SqlParam[]): Promise<RunResult>
195
- /** Run a multi-statement script (no params), e.g. schema setup / migrations. */
196
- exec(sql: string): Promise<void>
197
- /**
198
- * Run a batch of [sql, params] statements in one transaction (BEGIN/COMMIT,
199
- * ROLLBACK on any error). Resolves to one result per statement. Statements
200
- * must be writes/DDL. Cannot branch on intermediate results.
201
- */
202
- transaction(statements: [string, SqlParam[]?][]): Promise<RunResult[]>
203
- /** Close the connection. */
204
- close(): Promise<void>
205
- }
36
+ capabilities: string[]
206
37
  }
@@ -0,0 +1,50 @@
1
+ declare module "flux:fs" {
2
+ type DirEntry = {
3
+ name: string
4
+ type: "file" | "directory" | "symlink" | "other"
5
+ }
6
+
7
+ type FileStat = {
8
+ size: number
9
+ type: string
10
+ mtime?: number
11
+ }
12
+
13
+ type FluxFile = {
14
+ path: string
15
+ /** Read the whole file as UTF-8 text. */
16
+ text(): Promise<string>
17
+ /** Read the whole file as raw bytes. */
18
+ bytes(): Promise<Uint8Array>
19
+ /** Read and parse the file as JSON. */
20
+ json(): Promise<any>
21
+ /** Resolve to whether the file exists. */
22
+ exists(): Promise<boolean>
23
+ /** Resolve to the file's metadata (size, type, mtime). */
24
+ stat(): Promise<FileStat>
25
+ /** Write `data`, replacing any existing contents. */
26
+ write(data: string | Uint8Array): Promise<void>
27
+ }
28
+
29
+ type FluxDir = {
30
+ path: string
31
+ /** List the directory's immediate entries (non-recursive). */
32
+ entries(): Promise<DirEntry[]>
33
+ /** Resolve to whether the directory exists. */
34
+ exists(): Promise<boolean>
35
+ }
36
+
37
+ /**
38
+ * Reference a file by path. Lazy: no I/O happens until a method is called.
39
+ *
40
+ * @param path Path to the file.
41
+ */
42
+ export function file(path: string): FluxFile
43
+ /**
44
+ * Reference a directory by path. Lazy: no I/O happens until a method is
45
+ * called.
46
+ *
47
+ * @param path Path to the directory.
48
+ */
49
+ export function dir(path: string): FluxDir
50
+ }