Skip to Content
Mika Scraper 1.1.1 is released ๐ŸŽ‰
๐Ÿฉ MIKA TYPE ALIASType Alias: PoemResponse

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.

  • 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