@zenfs/core 0.12.9 → 0.12.10
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/dist/backends/backend.d.ts +11 -3
- package/dist/browser.min.js +3 -3
- package/dist/browser.min.js.map +2 -2
- package/dist/config.d.ts +2 -6
- package/package.json +1 -1
- package/src/backends/backend.ts +12 -5
- package/src/config.ts +2 -6
|
@@ -26,6 +26,15 @@ export type OptionsConfig<T> = {
|
|
|
26
26
|
validator?(opt: T[K]): void | Promise<void>;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Configuration options shared by backends and `Configuration`
|
|
31
|
+
*/
|
|
32
|
+
export interface SharedConfig {
|
|
33
|
+
/**
|
|
34
|
+
* If set, disables the sync cache and sync operations on async file systems.
|
|
35
|
+
*/
|
|
36
|
+
disableAsyncCache: boolean;
|
|
37
|
+
}
|
|
29
38
|
/**
|
|
30
39
|
* A backend
|
|
31
40
|
*/
|
|
@@ -33,7 +42,7 @@ export interface Backend<FS extends FileSystem = FileSystem, TOptions extends ob
|
|
|
33
42
|
/**
|
|
34
43
|
* Create a new instance of the backend
|
|
35
44
|
*/
|
|
36
|
-
create(options: TOptions): FS | Promise<FS>;
|
|
45
|
+
create(options: TOptions & Partial<SharedConfig>): FS | Promise<FS>;
|
|
37
46
|
/**
|
|
38
47
|
* A name to identify the backend.
|
|
39
48
|
*/
|
|
@@ -81,9 +90,8 @@ export declare function checkOptions<T extends Backend>(backend: T, opts: Record
|
|
|
81
90
|
*
|
|
82
91
|
* The option object for each file system corresponds to that file system's option object passed to its `Create()` method.
|
|
83
92
|
*/
|
|
84
|
-
export type BackendConfiguration<T extends Backend> = OptionsOf<T> & {
|
|
93
|
+
export type BackendConfiguration<T extends Backend> = OptionsOf<T> & Partial<SharedConfig> & {
|
|
85
94
|
backend: T;
|
|
86
|
-
disableAsyncCache?: boolean;
|
|
87
95
|
};
|
|
88
96
|
/**
|
|
89
97
|
* @internal
|