Parser | @tableau/taco-toolkit - v2.1.0

Class Parser<FetchResult>Abstract

An abstract class for the implementation of connector custom parsing that synchronously parses the results yielded from the Fetcher.

For TypeScript, the fetcherResult type can be provided via the type parameter. By default, fetcherResult is typed as any.

Example

export default class MyParser extends Parser<Uint8Array> {
parse(fetcherResult: Uint8Array, options: ParseOptions): DataContainer {
// ...
}
}

Type Parameters

  • FetchResult = any

Hierarchy

  • BaseParser
    • Parser

Constructors

  • Type Parameters

    • FetchResult = any

    Returns Parser<FetchResult>

Methods

  • The method to implement the parsing logic for transforming the fetcherResult into a DataContainer. When a custom parser is defined, the connector must implement this method to perform data parsing.

    Parameters

    Returns DataContainer

Generated using TypeDoc