@lingxia/types 0.11.1 → 0.12.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/src/index.ts CHANGED
@@ -15,6 +15,8 @@ import './generated/logic';
15
15
  import type {
16
16
  AppConfig,
17
17
  AppInstance,
18
+ BinaryFileData,
19
+ FsWriteOptions,
18
20
  PageConfig,
19
21
  PageInstance,
20
22
  } from './generated/logic';
@@ -23,6 +25,20 @@ import type { Automation } from './automation';
23
25
  export type Lx = globalThis.Lx;
24
26
 
25
27
  declare global {
28
+ interface FileSystemApi {
29
+ /**
30
+ * Write bytes to a managed file. `encoding` describes how to read a
31
+ * *string*, so it has no meaning here and the runtime rejects it — this
32
+ * overload is what makes that a compile error instead. The generated
33
+ * signature above covers the string case.
34
+ */
35
+ write(
36
+ path: string,
37
+ data: BinaryFileData,
38
+ options?: Omit<FsWriteOptions, 'encoding'>
39
+ ): Promise<void>;
40
+ }
41
+
26
42
  interface Lx {
27
43
  /**
28
44
  * In-process UI/runtime automation.