```js
// @noErrors
import { applyAction, deserialize, enhance } from '$app/forms';
```
## applyAction
This action updates the `form` property of the current page with the given data and updates `page.status`.
In case of an error, it redirects to the nearest error page.
```dts
function applyAction<
	Success extends Record | undefined,
	Failure extends Record | undefined
>(
	result: import('@sveltejs/kit').ActionResult<
		Success,
		Failure
	>
): Promise;
```
## deserialize
Use this function to deserialize the response from a form submission.
Usage:
```js
// @errors: 7031
import { deserialize } from '$app/forms';
async function handleSubmit(event) {
	const response = await fetch('/form?/action', {
		method: 'POST',
		body: new FormData(event.target)
	});
	const result = deserialize(await response.text());
	// ...
}
```
```dts
function deserialize<
	Success extends Record | undefined,
	Failure extends Record | undefined
>(
	result: string
): import('@sveltejs/kit').ActionResult;
```
## enhance
This action enhances a `