summaryrefslogtreecommitdiff
path: root/examples/scala-js/library/src/main/scala/scala/scalajs/js/annotation/JSExportNamed.scala
blob: 718404a6ace20d2021b7f127dbbc15d6ca11356a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2003-2013, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */



package scala.scalajs.js.annotation

/** Exports the given method to JavaScript with named parameters.
 *
 *  It can then be called like this:
 *  {{{
 *  obj.foo({
 *    param1: value1
 *    param2: value2
 *    param7: value3
 *  });
 *  }}}
 *
 *  Note that named exports don't support overloading. Therefore the
 *  following will fail:
 *  {{{
 *  class A {
 *    @JSExportNamed
 *    def a(foo: Int) = foo + 1
 *    @JSExportNamed
 *    def a(bar: String) = "Hello " + bar
 *  }
 *  }}}
 *  @see [[http://www.scala-js.org/doc/export-to-javascript.html Export Scala.js APIs to JavaScript]]
 */
class JSExportNamed extends scala.annotation.StaticAnnotation {
  def this(name: String) = this()
}