Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Callbacks

Callbacks: Map<string, Map<string, VisitorCallback>>

NodeArray

NodeArray: Node[]

ObjectMap

ObjectMap<T>: {}

Type parameters

  • T = any

Type declaration

  • [key: string]: T

ParseOptions

ParseOptions: { noLocation: boolean; noSource: boolean }

Configuration options to control parser behavior

Type declaration

  • noLocation: boolean

    By default, the parser creates AST nodes that know the location in the source that they correspond to. This configuration flag disables that behavior for performance or testing.

  • noSource: boolean

VisitorCallback

VisitorCallback: (_context: Context) => void

Type declaration

Variables

Const kinds

kinds: { Annotation: string; AnnotationDefinition: string; Argument: string; BooleanValue: string; Document: string; EnumDefinition: string; EnumValue: string; EnumValueDefinition: string; Field: string; FieldDefinition: string; FloatValue: string; InputValueDefinition: string; IntValue: string; InterfaceDefinition: string; List: string; ListValue: string; Map: string; MapValue: string; Name: string; Named: string; NamespaceDefinition: string; ObjectDefinition: string; ObjectField: string; ObjectValue: string; OperationDefinition: string; OperationTypeDefinition: string; Optional: string; RoleDefinition: string; ScalarDefinition: string; SchemaDefinition: string; SelectionSet: string; StringValue: string; UnionDefinition: string; Variable: string; VariableDefinition: string } = ...

Type declaration

  • Annotation: string
  • AnnotationDefinition: string
  • Argument: string
  • BooleanValue: string
  • Document: string
  • EnumDefinition: string
  • EnumValue: string
  • EnumValueDefinition: string
  • Field: string
  • FieldDefinition: string
  • FloatValue: string
  • InputValueDefinition: string
  • IntValue: string
  • InterfaceDefinition: string
  • List: string
  • ListValue: string
  • Map: string
  • MapValue: string
  • Name: string
  • Named: string
  • NamespaceDefinition: string
  • ObjectDefinition: string
  • ObjectField: string
  • ObjectValue: string
  • OperationDefinition: string
  • OperationTypeDefinition: string
  • Optional: string
  • RoleDefinition: string
  • ScalarDefinition: string
  • SchemaDefinition: string
  • SelectionSet: string
  • StringValue: string
  • UnionDefinition: string
  • Variable: string
  • VariableDefinition: string

Functions

parse

  • Given a WIDL source, parses it into a Document. Throws WidlError if a syntax error is encountered.

    Parameters

    Returns Document

parseValue

  • Given a string containing a WIDL value (ex. [42]), parse the AST for that value. Throws WidlError if a syntax error is encountered.

    This is useful within tools that operate upon WIDL Values directly and in isolation of complete WIDL documents.

    Consider providing the results to the utility function: valueFromAST().

    Parameters

    Returns Value

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Interface
  • Class

Generated using TypeDoc