Skip to main content

Extend

Creates a child Vault that will be automatically cleaned when the parent is cleaned.

const parent = new Vault("Parent")
const child = parent.Extend("Child")

child.Add(new Instance("Part"))

parent.Clean()

Parameters

ParameterTypeDescription
name?stringOptional name for the child vault

Returns

Descriptor - The newly created child vault

Behavior

  • Creates a new vault instance as a child of the current vault
  • Child is automatically cleaned when parent is cleaned
  • Enables hierarchical cleanup structures
  • Child vaults can have their own children