p

de.surfice

smacrotools

package smacrotools

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. abstract class BlackboxMacroTools extends CommonMacroTools
  2. abstract class CommonMacroTools extends AnyRef
  3. macro class JSOptionsObject extends Annotation with StaticAnnotation

    This macro annotation transforms a case class into a trait extending js.Object and a companion object with an apply() method.

    This macro annotation transforms a case class into a trait extending js.Object and a companion object with an apply() method. This allows easy definition of JavaScript "confguration" objects, where some options are required, but ohters are optional.

    Annotations
    @compileTimeOnly( ... ) @compileTimeOnly( ... )
    Example:
    1. @JSOptionsObject
      case class FooOptions(var foo: Int, @JSName("notify") update: Boolean = false, bar: js.UndefOr[String] = js.undefined)

      is transformed into

      @js.native
      trait FooOptions extends js.Object {
        var x: Int = js.native
      
        @JSName("notify")
        val update: Boolean = js.native
      
        val y: js.UndefOr[String] = js.native
      }
      
      object FooOptions {
        def apply(foo: Int, update: Boolean = false, bar: js.UndefOr[String] = js.undefined): FooOptions =
          val __o = js.Dynamic.literal(x = x, notify = update).asInstanceOf[js.Dictionary[js.Any]]
      
          if(bar.isDefined) __o.update("bar",bar)
      
          __o.asInstanceOf[FooOptions]
      }
    Note

    Arguments of type scalajs.js.UndefOr will only be defined on the returned object, iff their value is != js.undefined

  4. macro class JSRef extends Annotation with StaticAnnotation

    This annotation will expand into either @JSName or @JSImport at compile time.

    This annotation will expand into either @JSName or @JSImport at compile time.

    Annotations
    @compileTimeOnly( ... ) @compileTimeOnly( ... )
  5. trait JsBlackboxMacroTools extends BlackboxMacroTools with JsCommonMacroTools
  6. trait JsCommonMacroTools extends CommonMacroTools
  7. trait JsWhiteboxMacroTools extends WhiteboxMacroTools with JsCommonMacroTools
  8. abstract class MacroAnnotationHandlerNew extends WhiteboxMacroTools
  9. abstract class WhiteboxMacroTools extends CommonMacroTools
  10. class debug extends Annotation with StaticAnnotation

    Enables debugging of an annotated angulate2 class during macro expansion and/or at runtime.

  11. abstract class MacroAnnotationHandler extends WhiteboxMacroTools
    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.4) Use MacroAnnotationHandlerNew instead

Ungrouped