Skip to main content

Import

Imports another vault so it gets cleaned when this vault is cleaned.

const vaultA = new Vault()
const vaultB = new Vault()

vaultA.Import(vaultB)

vaultA.Clean()

Parameters

ParameterTypeDescription
otherVaultDescriptorAnother vault to import

Returns

Descriptor - This vault instance (for chaining)

Behavior

  • Creates a dependency where cleaning this vault also cleans the imported vault
  • Useful for composing vaults from different sources
  • Returns this for method chaining