Vertex Viewer SDK
    Preparing search index...

    Function defaults

    • Returns a new object where any enumerable property from other are recursively applied to a. Once a property is set, it will not be overridden. This function is useful for constructing configs from a default config.

      Type Parameters

      • A

      Parameters

      • a: A

      Returns A

      defaults({ 'a': [1] }, { 'b': 2 }, { 'a': [2] });
      // => { a: [1], b: 2 }
    • Returns a new object where any enumerable property from other are recursively applied to a. Once a property is set, it will not be overridden. This function is useful for constructing configs from a default config.

      Type Parameters

      • A
      • B

      Parameters

      • a: A
      • b: B

      Returns A & B

      defaults({ 'a': [1] }, { 'b': 2 }, { 'a': [2] });
      // => { a: [1], b: 2 }
    • Returns a new object where any enumerable property from other are recursively applied to a. Once a property is set, it will not be overridden. This function is useful for constructing configs from a default config.

      Type Parameters

      • A
      • B
      • C

      Parameters

      • a: A
      • b: B
      • c: C

      Returns A & B & C

      defaults({ 'a': [1] }, { 'b': 2 }, { 'a': [2] });
      // => { a: [1], b: 2 }
    • Returns a new object where any enumerable property from other are recursively applied to a. Once a property is set, it will not be overridden. This function is useful for constructing configs from a default config.

      Type Parameters

      • A
      • B
      • C
      • D

      Parameters

      • a: A
      • b: B
      • c: C
      • d: D

      Returns A & B & C & D

      defaults({ 'a': [1] }, { 'b': 2 }, { 'a': [2] });
      // => { a: [1], b: 2 }
    • Returns a new object where any enumerable property from other are recursively applied to a. Once a property is set, it will not be overridden. This function is useful for constructing configs from a default config.

      Type Parameters

      • A
      • R

      Parameters

      • a: A
      • ...other: Record<string, unknown>[]

      Returns R

      defaults({ 'a': [1] }, { 'b': 2 }, { 'a': [2] });
      // => { a: [1], b: 2 }