---
title: TransformStreamDefaultController
url: https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/interface.TransformStreamDefaultController/
---

**Kind:** Interface  
**Module:** [globals](https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/)  
**Package:** @fastly/js-compute 4.0.1  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2012

```javascript
interface TransformStreamDefaultController<O = any>
```

## Constructor

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2024

```javascript
new TransformStreamDefaultController()
```

## Properties

### desiredSize

**Type:** `number | null`  
**Flags:** read-only  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2013

## Methods

### enqueue

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2014

```javascript
enqueue(chunk?: O): void
```

**Parameters**

- `chunk`: `O` (optional)

**Returns**

`void`

### error

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2015

```javascript
error(reason?: any): void
```

**Parameters**

- `reason`: `any` (optional)

**Returns**

`void`

### terminate

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2016

```javascript
terminate(): void
```

**Returns**

`void`
