Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ObjectConstructor

Hierarchy

  • ObjectConstructor

Callable

  • __call(): any
  • __call(value: any): any
  • Returns any

  • Parameters

    • value: any

    Returns any

Index

Constructors

constructor

  • new ObjectConstructor(value?: any): Object
  • Parameters

    • Optional value: any

    Returns Object

Properties

Readonly prototype

prototype: Object

A reference to the prototype for a class of objects.

Methods

create

  • Creates an object that has the specified prototype or that has null prototype.

    Parameters

    • o: object | null

      Object to use as a prototype. May be null.

    Returns any

  • Creates an object that has the specified prototype, and that optionally contains specified properties.

    Parameters

    • o: object | null

      Object to use as a prototype. May be null

    • properties: PropertyDescriptorMap & ThisType<any>

      JavaScript object that contains one or more property descriptors.

    Returns any

defineProperties

  • Adds one or more properties to an object, and/or modifies attributes of existing properties.

    Parameters

    • o: any

      Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.

    • properties: PropertyDescriptorMap & ThisType<any>

      JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.

    Returns any

defineProperty

  • Adds a property to an object, or modifies attributes of an existing property.

    Parameters

    • o: any

      Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.

    • p: PropertyKey

      The property name.

    • attributes: PropertyDescriptor & ThisType<any>

      Descriptor for the property. It can be for a data property or an accessor property.

    Returns any

freeze

  • freeze<T>(a: T[]): keyof T[]
  • freeze<T>(f: T): T
  • freeze<T>(o: T): Readonly<T>
  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • T

    Parameters

    • a: T[]

    Returns keyof T[]

  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    Parameters

    • f: T

    Returns T

  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • T

    Parameters

    • o: T

      Object on which to lock the attributes.

    Returns Readonly<T>

getOwnPropertyDescriptor

  • Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.

    Parameters

    • o: any

      Object that contains the property.

    • p: PropertyKey

      Name of the property.

    Returns PropertyDescriptor | undefined

getOwnPropertyNames

  • getOwnPropertyNames(o: any): string[]
  • Returns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.

    Parameters

    • o: any

      Object that contains the own properties.

    Returns string[]

getPrototypeOf

  • getPrototypeOf(o: any): any
  • Returns the prototype of an object.

    Parameters

    • o: any

      The object that references the prototype.

    Returns any

isExtensible

  • isExtensible(o: any): boolean
  • Returns a value that indicates whether new properties can be added to an object.

    Parameters

    • o: any

      Object to test.

    Returns boolean

isFrozen

  • isFrozen(o: any): boolean
  • Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.

    Parameters

    • o: any

      Object to test.

    Returns boolean

isSealed

  • isSealed(o: any): boolean
  • Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.

    Parameters

    • o: any

      Object to test.

    Returns boolean

keys

  • keys(o: object): string[]
  • Returns the names of the enumerable string properties and methods of an object.

    Parameters

    • o: object

      Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

    Returns string[]

preventExtensions

  • preventExtensions<T>(o: T): T
  • Prevents the addition of new properties to an object.

    Type parameters

    • T

    Parameters

    • o: T

      Object to make non-extensible.

    Returns T

seal

  • seal<T>(o: T): T
  • Prevents the modification of attributes of existing properties, and prevents the addition of new properties.

    Type parameters

    • T

    Parameters

    • o: T

      Object on which to lock the attributes.

    Returns T

Generated using TypeDoc