summaryrefslogtreecommitdiff
path: root/examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/Int16Array.scala
diff options
context:
space:
mode:
Diffstat (limited to 'examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/Int16Array.scala')
-rw-r--r--examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/Int16Array.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/Int16Array.scala b/examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/Int16Array.scala
new file mode 100644
index 0000000..c71f101
--- /dev/null
+++ b/examples/scala-js/library/src/main/scala/scala/scalajs/js/typedarray/Int16Array.scala
@@ -0,0 +1,24 @@
+package scala.scalajs.js.typedarray
+
+import scala.scalajs.js
+
+class Int16Array private extends TypedArray[Short, Int16Array] {
+
+ /** Constructs a Int16Array with the given length. Initialized to all 0 */
+ def this(length: Int) = this()
+
+ /** Creates a new Int16Array with the same elements than the given TypedArray
+ *
+ * The elements are converted before being stored in the new Int8Array.
+ */
+ def this(typedArray: TypedArray[_, _]) = this()
+
+ /** Creates a new Int16Array with the elements in the given array */
+ def this(array: js.Array[_]) = this()
+
+ /** Creates a Int16Array view on the given ArrayBuffer */
+ def this(buffer: ArrayBuffer, byteOffset: Int = 0, length: Int = ???) = this()
+
+}
+
+object Int16Array extends TypedArrayStatic