---
title: "TypeArray: interface in Layout, TypeShade API reference"
description: "TypeArray, an interface in Layout. A fixed-size array uniform field with a plain element type: dash_array: arrayOf(vec4fT, 2)."
url: https://typeshade.dev/api/typearray/
language: en
---

# `TypeArray`

Interface in Layout

A fixed-size array uniform field with a plain element type: dash\_array: arrayOf(vec4fT, 2).

`import type { TypeArray } from 'typeshade'`
`import type { TypeArray } from 'typeshade/core/ir'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
interface TypeArray<T extends ShaderType> {
  readonly elemType: T;
  readonly count: number;
}
```

## Description

The field proxy exposes `.at(i)`, which returns the typed element read.

## Instance properties

**`elemType` read only `T`**

The element’s shader type.

**`count` read only `number`**

The array length.

## Source

[`src/core/sot.ts`, line 622](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/sot.ts#L622), at commit af54ddad5
