Import
Imports another vault so it gets cleaned when this vault is cleaned.
- TypeScript
- Luau
const vaultA = new Vault()
const vaultB = new Vault()
vaultA.Import(vaultB)
vaultA.Clean()
local vaultA = Vault.new()
local vaultB = Vault.new()
vaultA:Import(vaultB)
vaultA:Clean()
Parameters
| Parameter | Type | Description |
|---|---|---|
otherVault | Descriptor | Another 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
thisfor method chaining