c

jshelpers

JsObjectOps

final class JsObjectOps[A <: Object] extends AnyVal

The "combine" methods are shallow, mutable merges, this may not be what you want.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsObjectOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new JsObjectOps(o: A)

Value Members

  1. def as[T]: T

    .asInstanceOf[T] but shorter.

    .asInstanceOf[T] but shorter. Very dangerous!

    Annotations
    @inline()
  2. def asAnyDict: Dictionary[Any]
    Annotations
    @inline()
  3. def asDict[B]: Dictionary[B]
    Annotations
    @inline()
  4. def asDyn: Dynamic
    Annotations
    @inline()
  5. def asUndefOr: UndefOr[A]
    Annotations
    @inline()
  6. def combine(that: UndefOr[A]): A

    Shallow merge ! If you are merging multiple levels of props, this is not what you want to use.

    Shallow merge ! If you are merging multiple levels of props, this is not what you want to use.

    Annotations
    @inline()
  7. def combineDynamic(that: Dynamic): A

    Combine with a js.Dynamic explicitly.

    Combine with a js.Dynamic explicitly.

    Annotations
    @inline()
  8. def combineDynamicTo[B](that: Dynamic): B

    Combine with a dynamic and cast.

    Combine with a dynamic and cast.

    Annotations
    @inline()
  9. def combineGeneric(that: UndefOr[Object]): A

    Combine with a generic js object or undefined.

    Combine with a generic js object or undefined.

    Annotations
    @inline()
  10. def combineGenericTo[B](that: UndefOr[Object]): B

    Combine with a generic js object and cast.

    Combine with a generic js object and cast.

    Annotations
    @inline()
  11. def duplicate: A

    Duplicate using js.Object.assign

    Duplicate using js.Object.assign

    Annotations
    @inline()
  12. def duplicateCombine(that: Dynamic): A

    Duplicate then combineDynamic

    Duplicate then combineDynamic

    Annotations
    @inline()
  13. def duplicateCombineTo[B](that: Dynamic): B

    Duplicate then combineDynamic then cast :-).

    Duplicate then combineDynamic then cast :-).

    Annotations
    @inline()
  14. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  15. def unsafeCombine(that: Any): A

    Combine with something! Client takes ownership to make sure that is suitable to be combined.

    Combine with something! Client takes ownership to make sure that is suitable to be combined.

    Annotations
    @inline()