@zenfs/core 0.11.0 → 0.11.1

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.
@@ -33,7 +33,7 @@ export interface Backend<FS extends FileSystem = FileSystem, TOptions extends ob
33
33
  /**
34
34
  * Create a new instance of the backend
35
35
  */
36
- create(options: TOptions): FS;
36
+ create(options: TOptions): FS | Promise<FS>;
37
37
  /**
38
38
  * A name to identify the backend.
39
39
  */
@@ -64,7 +64,6 @@ export declare function isBackend(arg: unknown): arg is Backend;
64
64
  * @internal
65
65
  */
66
66
  export declare function checkOptions<T extends Backend>(backend: T, opts: Partial<OptionsOf<T>> & Record<string, unknown>): Promise<void>;
67
- export declare function createBackend<B extends Backend>(backend: B, options?: Partial<OptionsOf<B>>): Promise<ReturnType<B['create']>>;
68
67
  /**
69
68
  * Specifies a file system backend type and its options.
70
69
  *
@@ -44,12 +44,6 @@ export async function checkOptions(backend, opts) {
44
44
  // Otherwise: All good!
45
45
  }
46
46
  }
47
- export async function createBackend(backend, options = {}) {
48
- await checkOptions(backend, options);
49
- const fs = backend.create(options);
50
- await fs.ready();
51
- return fs;
52
- }
53
47
  /**
54
48
  * @internal
55
49
  */