# Watcher

[**PromptScript API**](https://getpromptscript.dev/api-reference/index.md)

***

# Interface: Watcher

Defined in: [compiler/src/types.ts:302](https://github.com/mrwogu/promptscript/blob/49aa50f943865b985366c4eda6e95c5a31ef39a6/packages/compiler/src/types.ts#L302)

Handle returned by watch() to control the watcher.

## Methods

### close()

> **close**(): `Promise`\<`void`\>

Defined in: [compiler/src/types.ts:304](https://github.com/mrwogu/promptscript/blob/49aa50f943865b985366c4eda6e95c5a31ef39a6/packages/compiler/src/types.ts#L304)

Stop watching and clean up

#### Returns

`Promise`\<`void`\>