Type alias HandlerInput<Data>

HandlerInput<Data>: BasicHandlerInput<Data> | FileBasedHandlerInput<Data>

Represents an input type for handlers, allowing flexibility between basic and file-based inputs.

Type Parameters

  • Data = any

    The type of data that the handler input can carry.

Example

// Usage with basic handler input
const basicHandlerInputObj: HandlerInput = {
fetcher: 'my-fetcher',
parser: 'my-parser',
data: [],
}

// Usage with file-based handler input
const fileBasedHandlerInputObj: HandlerInput = {
fetcher: 'my-fetcher',
parser: <TacoFileParserName> // "taco:excel-file-parser" | "taco:csv-file-parser" | "taco:parquet-file-parser" | "taco:data-file-parser",
data: [],
name: 'table-name',
}

Generated using TypeDoc