Преглед на файлове

[js] add class doc for TypedArray.

terurou преди 6 години
родител
ревизия
84bdf1c8c6

+ 9 - 0
std/js/lib/Float32Array.hx

@@ -21,6 +21,15 @@
  */
 package js.lib;
 
+/**
+	The `Float32Array` typed array represents an array of 32-bit floating point numbers
+	(corresponding to the C float data type) in the platform byte order. If control over byte order is
+	needed, use `DataView` instead. The contents are initialized to `0`. Once established, you can
+	reference elements in the array using the object's methods, or using standard array index
+	syntax (that is, using bracket notation)
+
+	Documentation [Float32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Float32Array")
 extern class Float32Array implements ArrayAccess<Float> {
 	static inline var BYTES_PER_ELEMENT : Int = 4;

+ 9 - 0
std/js/lib/Float64Array.hx

@@ -21,6 +21,15 @@
  */
 package js.lib;
 
+/**
+	The `Float64Array` typed array represents an array of 64-bit floating point numbers
+	(corresponding to the C double data type) in the platform byte order. If control over byte order
+	is needed, use `DataView` instead. The contents are initialized to `0`. Once established, you can
+	reference elements in the array using the object's methods, or using standard array index
+	syntax (that is, using bracket notation).
+
+	Documentation [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Float64Array")
 extern class Float64Array implements ArrayAccess<Float> {
 	static inline var BYTES_PER_ELEMENT : Int = 8;

+ 8 - 0
std/js/lib/Int16Array.hx

@@ -21,6 +21,14 @@
  */
 package js.lib;
 
+/**
+	The `Int16Array` typed array represents an array of twos-complement 16-bit signed integers in
+	the platform byte order. If control over byte order is needed, use `DataView` instead. The
+	contents are initialized to 0. Once established, you can reference elements in the array using
+	the object's methods, or using standard array index syntax (that is, using bracket notation).
+
+	Documentation [Int16Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Int16Array")
 extern class Int16Array implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 2;

+ 8 - 0
std/js/lib/Int32Array.hx

@@ -21,6 +21,14 @@
  */
 package js.lib;
 
+/**
+	The `Int32Array` typed array represents an array of twos-complement 32-bit signed integers in
+	the platform byte order. If control over byte order is needed, use `DataView` instead. The
+	contents are initialized to `0`. Once established, you can reference elements in the array using
+	the object's methods, or using standard array index syntax (that is, using bracket notation).
+
+	Documentation [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Int32Array")
 extern class Int32Array implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 4;

+ 7 - 0
std/js/lib/Int8Array.hx

@@ -21,6 +21,13 @@
  */
 package js.lib;
 
+/**
+	The `Int8Array` typed array represents an array of twos-complement 8-bit signed integers. The
+	contents are initialized to 0. Once established, you can reference elements in the array using
+	the object's methods, or using standard array index syntax (that is, using bracket notation).
+
+	Documentation [Int8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Int8Array")
 extern class Int8Array implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 1;

+ 8 - 0
std/js/lib/Uint16Array.hx

@@ -21,6 +21,14 @@
  */
 package js.lib;
 
+/**
+	The `Uint16Array` typed array represents an array of 16-bit unsigned integers in the platform
+	byte order. If control over byte order is needed, use `DataView` instead. The contents are
+	initialized to `0`. Once established, you can reference elements in the array using the object's
+	methods, or using standard array index syntax (that is, using bracket notation).
+
+	Documentation [Uint16Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Uint16Array")
 extern class Uint16Array implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 2;

+ 8 - 0
std/js/lib/Uint32Array.hx

@@ -21,6 +21,14 @@
  */
 package js.lib;
 
+/**
+	The `Uint32Array` typed array represents an array of 32-bit unsigned integers in the platform
+	byte order. If control over byte order is needed, use `DataView` instead. The contents are
+	initialized to `0`. Once established, you can reference elements in the array using the object's
+	methods, or using standard array index syntax (that is, using bracket notation).
+
+	Documentation [Uint32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Uint32Array")
 extern class Uint32Array implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 4;

+ 7 - 0
std/js/lib/Uint8Array.hx

@@ -21,6 +21,13 @@
  */
 package js.lib;
 
+/**
+	The `Uint8Array` typed array represents an array of 8-bit unsigned integers. The contents
+	are initialized to 0. Once established, you can reference elements in the array using the object's
+	methods, or using standard array index syntax (that is, using bracket notation).
+
+	Documentation [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Uint8Array")
 extern class Uint8Array implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 1;

+ 9 - 0
std/js/lib/Uint8ClampedArray.hx

@@ -21,6 +21,15 @@
  */
 package js.lib;
 
+/**
+	The `Uint8ClampedArray` typed array represents an array of 8-bit unsigned integers clamped
+	to 0-255; if you specified a value that is out of the range of [0,255], 0 or 255 will be set instead;
+	if you specify a non-integer, the nearest integer will be set. The contents are initialized to `0`.
+	Once established, you can reference elements in the array using the object's methods, or using
+	standard array index syntax (that is, using bracket notation).
+
+	Documentation [Uint8ClampedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
+**/
 @:native("Uint8ClampedArray")
 extern class Uint8ClampedArray implements ArrayAccess<Int> {
 	static inline var BYTES_PER_ELEMENT : Int = 1;