@@ -22,32 +22,25 @@ package scala.scalajs
22
22
*
23
23
* == Overview ==
24
24
*
25
- * The trait [[js.Any ]] is the super type of all JavaScript values.
26
- *
27
- * All class, trait and object definitions that inherit, directly or
28
- * indirectly, from [[js.Any ]] do not have actual implementations in Scala.
29
- * They are only the manifestation of static types representing libraries
30
- * written directly in JavaScript. It is not possible to implement yourself
31
- * a subclass of [[js.Any ]]: all the method definitions will be ignored when
32
- * compiling to JavaScript.
25
+ * The trait [[js.Any ]] is the root of the hierarchy of JavaScript types.
26
+ * This package defines important subtypes of [[js.Any ]] that are defined
27
+ * in the standard library of ECMAScript 5.1 (or ES 6, with a label in the
28
+ * documentation), such as [[Object js.Object ]], [[Array js.Array ]] and
29
+ * [[RegExp js.RegExp ]].
33
30
*
34
31
* Implicit conversions to and from standard Scala types to their equivalent
35
32
* in JavaScript are provided. For example, from Scala functions to JavaScript
36
33
* functions and back.
37
34
*
38
- * The most important subclasses of [[js.Any ]] are:
39
- * - [[js.Dynamic ]], a dynamically typed interface to JavaScript APIs
40
- * - [[js.Object ]], the superclass of all statically typed JavaScript classes,
41
- * which has subclasses for all the classes standardized in ECMAScript 5.1,
42
- * among which:
43
- * - [[js.Array ]]
44
- * - [[js.Function ]] (and subtraits with specific number of parameters)
45
- * - [[js.ThisFunction ]] and its subtraits for functions that take the
46
- * JavaScript `this` as an explicit parameters
47
- * - [[js.Dictionary ]] to access the properties of an object in a
48
- * dictionary-like way
49
- * - [[js.Date ]]
50
- * - [[js.RegExp ]]
35
+ * The most important subtypes of [[js.Any ]] declared in this package are:
36
+ * - [[Object js.Object ]], the superclass of most (all) JavaScript classes
37
+ * - [[Array js.Array ]]
38
+ * - [[Function js.Function ]] (and subtraits with specific number of
39
+ * parameters)
40
+ * - [[ThisFunction js.ThisFunction ]] and its subtraits for functions that
41
+ * take the JavaScript `this` as an explicit parameter
42
+ * - [[Dictionary js.Dictionary ]], a [[Map ]]-like view of the properties of a
43
+ * JS object
51
44
*
52
45
* The trait [[js.Dynamic ]] is a special subtrait of [[js.Any ]]. It can
53
46
* represent any JavaScript value in a dynamically-typed way. It is possible
@@ -56,14 +49,17 @@ package scala.scalajs
56
49
*
57
50
* There are no explicit definitions for JavaScript primitive types, as one
58
51
* could expect, because the corresponding Scala types stand in their stead:
59
- * - [[Boolean ]] is a primitive JavaScript boolean
60
- * - [[Double ]] is a primitive JavaScript number
61
- * - [[String ]] is a primitive JavaScript string
52
+ * - [[Boolean ]] is the type of primitive JavaScript booleans
53
+ * - [[Double ]] is the type of primitive JavaScript numbers
54
+ * - [[String ]] is the type of primitive JavaScript strings (or `null`)
62
55
* - [[Unit ]] is the type of the JavaScript undefined value
63
56
* - [[Null ]] is the type of the JavaScript null value
64
57
*
65
- * [[js.UndefOr ]] gives a [[scala.Option ]]-like interface where the JavaScript
66
- * value `undefined` takes the role of `None`.
58
+ * [[UndefOr js.UndefOr ]] gives a [[scala.Option ]]-like interface where the
59
+ * JavaScript value `undefined` takes the role of `None`.
60
+ *
61
+ * [[| A | B ]] is an unboxed pseudo-union type, suitable to type values that
62
+ * admit several unrelated types in facade types.
67
63
*/
68
64
package object js {
69
65
/** The undefined value. */
0 commit comments