tuil
ReferencePackages@mwillbanks/tuil-streamingAPI

FormatParser

interface exported by @mwillbanks/tuil-streaming.

View rawEdit

interface

Public interface exported by @mwillbanks/tuil-streaming.

export interface FormatParser {
  readonly id: string;
  readonly mediaTypes: readonly string[];
  readonly extensions?: readonly string[];
  detect(source: string): number;
  parse(source: string, complete: boolean): PartialDocument;
  createSession?(): FormatParserSession;
}

Members

MemberTypeRequiredDescriptionRelated types
idstringYesThe id member uses the string contract.
mediaTypesreadonly string[]YesThe mediaTypes member uses the readonly string[] contract.
extensionsreadonly string[] | undefinedNoThe extensions member uses the readonly string[] | undefined contract.
detect(source: string) => numberYesThe detect member uses the (source: string) => number contract.
parse(source: string, complete: boolean) => PartialDocumentYesThe parse member uses the (source: string, complete: boolean) => PartialDocument contract.PartialDocument
createSession(() => FormatParserSession) | undefinedNoThe createSession member uses the (() => FormatParserSession) | undefined contract.FormatParserSession

Parameters

This declaration has no public members.

Returns

This declaration does not return a value.

Throws

No thrown errors are documented for this declaration.

Source

View the secondary source reference

Package

@mwillbanks/tuil-streaming

On this page