[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/script-host](https://jsprismarine.dev/api/@jsprismarine/script-host/index.md) / [values](https://jsprismarine.dev/api/@jsprismarine/script-host/values/index.md) / ScriptHandle

# Class: ScriptHandle

Defined in: [script-host/src/values.ts:24](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L24)

A JavaScript value that stays in its engine, such as an object or a function. The host refers to
it by handle until it frees it.

## Constructors

### Constructor

> **new ScriptHandle**(`id`): `ScriptHandle`

Defined in: [script-host/src/values.ts:28](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L28)

#### Parameters

##### id

`number`

#### Returns

`ScriptHandle`

## Properties

### id

> `readonly` **id**: `number`

Defined in: [script-host/src/values.ts:26](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L26)

The engine's handle, a positive integer.
