TypeScript/tests/baselines/reference/typedArrays-es6.types
Josh Goldberg c3d7a56e90
Specified diagnostic for iterating known array type without --downlevelIteration (#40070)
* Specified error message for iterating known array types without --downlevelIteration

* Added extra target info to diagnostic

* NodeList too, a classic

* PR feedback: invert to allowsStrings; required param

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2021-02-17 17:12:32 -08:00

111 lines
2.6 KiB
Plaintext

=== tests/cases/compiler/typedArrays-es6.ts ===
const float32Array = new Float32Array(1);
>float32Array : Float32Array
>new Float32Array(1) : Float32Array
>Float32Array : Float32ArrayConstructor
>1 : 1
[...float32Array];
>[...float32Array] : number[]
>...float32Array : number
>float32Array : Float32Array
const float64Array = new Float64Array(1);
>float64Array : Float64Array
>new Float64Array(1) : Float64Array
>Float64Array : Float64ArrayConstructor
>1 : 1
[...float64Array];
>[...float64Array] : number[]
>...float64Array : number
>float64Array : Float64Array
const int16Array = new Int16Array(1);
>int16Array : Int16Array
>new Int16Array(1) : Int16Array
>Int16Array : Int16ArrayConstructor
>1 : 1
[...int16Array];
>[...int16Array] : number[]
>...int16Array : number
>int16Array : Int16Array
const int32Array = new Int32Array(1);
>int32Array : Int32Array
>new Int32Array(1) : Int32Array
>Int32Array : Int32ArrayConstructor
>1 : 1
[...int32Array];
>[...int32Array] : number[]
>...int32Array : number
>int32Array : Int32Array
const int8Array = new Int8Array(1);
>int8Array : Int8Array
>new Int8Array(1) : Int8Array
>Int8Array : Int8ArrayConstructor
>1 : 1
[...int8Array];
>[...int8Array] : number[]
>...int8Array : number
>int8Array : Int8Array
const nodeList = new NodeList();
>nodeList : NodeList
>new NodeList() : NodeList
>NodeList : { new (): NodeList; prototype: NodeList; }
[...nodeList];
>[...nodeList] : Node[]
>...nodeList : Node
>nodeList : NodeList
const uint16Array = new Uint16Array(1);
>uint16Array : Uint16Array
>new Uint16Array(1) : Uint16Array
>Uint16Array : Uint16ArrayConstructor
>1 : 1
[...uint16Array];
>[...uint16Array] : number[]
>...uint16Array : number
>uint16Array : Uint16Array
const uint32Array = new Uint32Array(1);
>uint32Array : Uint32Array
>new Uint32Array(1) : Uint32Array
>Uint32Array : Uint32ArrayConstructor
>1 : 1
[...uint32Array];
>[...uint32Array] : number[]
>...uint32Array : number
>uint32Array : Uint32Array
const uint8Array = new Uint8Array(1);
>uint8Array : Uint8Array
>new Uint8Array(1) : Uint8Array
>Uint8Array : Uint8ArrayConstructor
>1 : 1
[...uint8Array];
>[...uint8Array] : number[]
>...uint8Array : number
>uint8Array : Uint8Array
const uint8ClampedArray = new Uint8ClampedArray(1);
>uint8ClampedArray : Uint8ClampedArray
>new Uint8ClampedArray(1) : Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>1 : 1
[...uint8ClampedArray];
>[...uint8ClampedArray] : number[]
>...uint8ClampedArray : number
>uint8ClampedArray : Uint8ClampedArray