p

jshelpers

package jshelpers

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait AllInstances extends JSPromiseInstances
  2. trait AllSyntax extends JsDynamicSyntax with JsObjectSyntax with JsAnySyntax with OrNullSyntax with ScalaMappedSyntax with OptionSyntax with JsUndefOrSyntax with MiscOrSyntax with JSPromiseSyntax with OrSyntax with JSArraySyntax
  3. trait AnyOps[T] extends AnyRef
  4. trait Instances extends AnyRef

    Instances with everything but all so it can be subclassed elsewhere.

  5. final class JSArrayOps[T] extends AnyVal
  6. final class JSArrayPromiseOps[A] extends AnyVal

    Extension methods for js.Array[js.Thenable[_]].

  7. trait JSArraySyntax extends LowerOrderJSArrayImplicits
  8. final class JSPromise2[A, B] extends AnyVal
  9. final class JSPromise3[A, B, C] extends AnyVal
  10. final class JSPromise4[A, B, C, D] extends AnyVal
  11. final class JSPromiseFailObjectOps extends AnyVal
  12. trait JSPromiseInstances extends AnyRef
  13. trait JSPromiseLowerOrderImplicits extends AnyRef
  14. final class JSPromiseObjectOps[A] extends AnyVal

    Ergonomic syntax for Promise.resolve and Promise.reject.

    Ergonomic syntax for Promise.resolve and Promise.reject. Or, use like PromiseValue(true).resolve. a is a strict value.

  15. final class JSPromiseOps[A] extends AnyVal

    More ergonomic typed methods for js.Promise processing.

    More ergonomic typed methods for js.Promise processing. Should just convert to Future as the overhead is *not* that much and its much easier to use. You should not import the implicit converters for js.Promise if you want to use map/flatMap on the promise itself: import scala.scalajs.js.Thenable.Implicits._

  16. trait JSPromiseSyntax extends JSPromiseLowerOrderImplicits
  17. final class JsAnyOps[T <: Any] extends AnyOps[T]
  18. trait JsAnySyntax extends AnyRef
  19. final class JsDictionaryOps extends AnyVal

    Dictionary casts.

  20. final class JsDynamicOps extends AnyVal
  21. trait JsDynamicSyntax extends AnyRef
  22. final class JsObjectOps[A <: Object] extends AnyVal

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

  23. trait JsObjectSyntax extends AnyRef
  24. final case class JsOrOps[A, B](o: |[A, B]) extends Product with Serializable

    Hmm...we could really tighten this up by doing |.merge and typing the picks.

  25. trait JsUndefLowerOrderImplicits extends AnyRef
  26. final class JsUndefOrBooleanOps extends UndefOrCommon[Boolean]
  27. final class JsUndefOrJsObject[A <: Object] extends AnyVal
  28. final class JsUndefOrNullOps[T] extends AnyVal

    Handled js.UndefOr[T|Null] directly vs needing to flatmap into it.

    Handled js.UndefOr[T|Null] directly vs needing to flatmap into it. Don't forget that scala.js has anUndefOr.orNull to extract the value or return null which is *not* what the methods below do.

  29. final class JsUndefOrOps[A] extends UndefOrCommon[A]

    Note that js.UndefOr and js.| already have a .orNull method.

  30. final case class JsUndefOrStringOps(a: UndefOr[String]) extends UndefOrCommon[String] with Product with Serializable
  31. trait JsUndefOrSyntax extends JsUndefLowerOrderImplicits
  32. trait LowerOrderJSArrayImplicits extends AnyRef

    To do

    Use sbt-boilerplace to replacite the tuple functions.

  33. trait MiscOrSyntax extends AnyRef
  34. final class Null2[A, B] extends AnyVal
  35. final class Null3[A, B, C] extends AnyVal
  36. final class Null4[A, B, C, D] extends AnyVal
  37. trait NullLowerOrderImplicits extends AnyRef
  38. final class OptionOps[T] extends AnyVal

    If you want js.UndefOr, use JSConverters .toOptionand .orUndefined.

  39. trait OptionSyntax extends AnyRef
  40. final class OrNullOps[A] extends AnyVal

    It is common in interop code to model a value as A or null but not undefined even though null and undefined may both mean "absent value." See |.merge Many of these methods are already on js.| but they appear to be left biased as near as I can tell.

    It is common in interop code to model a value as A or null but not undefined even though null and undefined may both mean "absent value." See |.merge Many of these methods are already on js.| but they appear to be left biased as near as I can tell. I'm happy to delete these methods of that's not right and those methods use js.UndefOr in some way.

    Note that chaining many js.| together probably not work like you think and sometimes its better to create a new target type then target implicits to convert from each individual type (in the or) to the new target type. You must model your type as A|Null for this implicit to be picked up.

    These methods exist to try and stop a conversion to UndefOr or Option as part of null processing. Hey! Every bit counts!

    To do

    Perhaps the force get methods should throw since .orNull exists in the scalajs standard library now.

  41. final class OrNullStringOps extends AnyVal
  42. trait OrNullSyntax extends NullLowerOrderImplicits
  43. trait OrSyntax extends AnyRef
  44. final class OrUndefOrNullOps[A] extends AnyVal
  45. final class RichJSArrayTuple3[T, U, V] extends AnyVal
  46. final class RichJSArrayTuple4[T, U, V, W] extends AnyVal
  47. final class ScalaMappedOps[T] extends AnyOps[T]

    Intended for directly mapped scala types, not scala.Any in general.

    Intended for directly mapped scala types, not scala.Any in general. Know what you are doing!!! Very dangerous!

  48. trait ScalaMappedSyntax extends AnyRef
  49. final case class StringIntMiscOrSyntax(a: |[String, Int]) extends Product with Serializable

    A data type commonly found when working with dropdown/labels.

  50. final class ToLocaleStringOps[A <: AnyVal] extends AnyVal
  51. final class UndefMap2[A, B] extends AnyVal
  52. final class UndefMap3[A, B, C] extends AnyVal
  53. final class UndefMap4[A, B, C, D] extends AnyVal
  54. trait UndefOrCommon[A] extends AnyRef

    Add Option-like methods to js.UndefOr.

    Add Option-like methods to js.UndefOr. Note that js.Undef.orNull exists in scala.js 1.0

Value Members

  1. case object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  2. object OrNullOps
  3. object implicits extends AllSyntax with AllInstances
  4. object instances extends Instances

    Instances is the wrong concept here as these are not typeclass instances--but close enough as they are not syntax extensions "'element' converters" would be better similiar to JSConverters in scala.js.

  5. object syntax

Ungrouped