> For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/zh/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/zh/llms-full.txt.

# Type Alias: ApiResponseWith\<TSuccess>

> **ApiResponseWith**\<`TSuccess`> = [`ApiErrorResponse`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiErrorResponse.md) | `TSuccess` & [`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md)

Defined in: [envelope/index.ts:224](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/envelope/index.ts#L224)

Discriminated union helper: a response is either successful or an error.

## Type Parameters

### TSuccess

`TSuccess`
