Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/define-properties/docs/types/index.d"

Index

Functions

Functions

Export assignment defineProperties

  • defineProperties(obj: any, props: any): any
  • Defines (and/or modifies) object properties.

    Parameters

    • obj: any

      object on which to define the properties

    • props: any

      object with property descriptors

    Returns any

    object with added and/or modified properties

    Example

    var obj = {};
    defineProperties( obj, {
        'foo': {
            'value': 'bar'
        },
        'baz': {
             'value': 13
        }
    });
    
    var val = obj.foo;
    // returns 'bar'
    
    val = obj.baz;
    // returns 13