• Creates an object that inherits from the given prototype object. If a properties object is provided its own enumerable properties are assigned to the created object.

    Type Parameters

    • T extends object
    • U extends object

    Parameters

    • prototype: T

      The object to inherit from.

    • Optionalproperties: U

      The properties to assign to the object.

    Returns T & U

    Returns the new object.