Backend
Defined in: src/backends/backend.ts:63
A backend
Type Parameters
Section titled “Type Parameters”FS extends FileSystem = FileSystem
TOptions
Section titled “TOptions”TOptions extends object = object
Properties
Section titled “Properties”name:
string
Defined in: src/backends/backend.ts:72
A name to identify the backend.
options
Section titled “options”options:
OptionsConfig<TOptions>
Defined in: src/backends/backend.ts:77
Describes all of the options available for this backend.
Methods
Section titled “Methods”create()
Section titled “create()”create(
options):FS|Promise<FS>
Defined in: src/backends/backend.ts:67
Create a new instance of the backend
Parameters
Section titled “Parameters”options
Section titled “options”TOptions & Partial<SharedConfig>
Returns
Section titled “Returns”FS | Promise<FS>
isAvailable()?
Section titled “isAvailable()?”
optionalisAvailable(config):boolean|Promise<boolean>
Defined in: src/backends/backend.ts:88
Whether the backend is available in the current environment. It supports checking synchronously and asynchronously
Returns ‘true’ if this backend is available in the current environment. For example, a backend using a browser API will return ‘false’ if the API is unavailable
Parameters
Section titled “Parameters”config
Section titled “config”TOptions
Returns
Section titled “Returns”boolean | Promise<boolean>