Function preventExtensions

  • Prevents the addition of new properties to an object.

    Parameters

    • target: object

      Object to make non-extensible.

    Returns boolean

    Whether the object has been made non-extensible.