• Parse TL schema into a list of entries.

    Parameters

    • tl: string

      TL schema

    • params: {
          forIdComputation?: boolean;
          onError?: (err: Error, line: string, num: number) => void;
          onOrphanComment?: (comment: string) => void;
          panicOnError?: boolean;
          parseMethodTypes?: boolean;
          prefix?: string;
      } = {}

      Additional parameters

      • OptionalforIdComputation?: boolean

        Whether this invocation is for computing constructor ids. If true, the id field will be set to 0 for all entries.

      • OptionalonError?: (err: Error, line: string, num: number) => void

        Function to be called if there was an error while parsing a line

      • OptionalonOrphanComment?: (comment: string) => void

        Function to be called a comment is found not belonging to any entry

      • OptionalpanicOnError?: boolean

        Whether to throw an error if a line failed to parse

      • OptionalparseMethodTypes?: boolean

        Whether to parse typeModifiers for method return types

      • Optionalprefix?: string

        Prefix to be applied to all types

    Returns TlEntry[]