Type Alias: PoemResponse
PoemResponse =
PoemSuccess
|PoemError
Defined in: src/poem/poem-generator.ts:59
Overview
The PoemResponse
type alias serves as a general return type for the generatePoem
function, encapsulating either a successful generation of a poem or an error that might occur during the process.
Usage
When utilizing the generatePoem
function, you can expect the return value to conform to the PoemResponse
type. This allows for streamlined handling of both successful poem data and potential errors, enabling developers to easily incorporate robust error handling and response processing in their applications.
Related Types
PoemSuccess
: Represents a successful response containing the generated poem data.PoemError
: Represents an error response that provides details about the failure encountered during poem generation.
Last updated on