Options
All
  • Public
  • Public/Protected
  • All
Menu

Module nodes/util

Index

Functions

capitalizeFirstChar

  • capitalizeFirstChar(str: string): string
  • Capitalize the first character of the string.

    Parameters

    • str: string

      The string to capitalize the first letter of.

    Returns string

    A string with the first letter being a capital.

convertKindToCtorName

  • convertKindToCtorName(kind: Kind): string
  • Convert the haystack kind to the name of the haystack-core contructor name.

    throws

    If the kind is unsupported or invalid.

    Parameters

    • kind: Kind

      The haystack kind value.

    Returns string

    The constructor name.

generateCodeFromNode

  • generateCodeFromNode(node: Node): string
  • Return the generated code from the node.

    Parameters

    • node: Node

      The node to run.

    Returns string

    The generated code.

generateNodes

  • generateNodes(out: (code: string) => void, nodes: Node[]): void
  • Generate the code string from a group of nodes.

    Parameters

    • out: (code: string) => void

      The output to write too.

        • (code: string): void
        • Parameters

          • code: string

          Returns void

    • nodes: Node[]

      The nodes.

    Returns void

    The code.

makeTypeName

  • makeTypeName(name: string): string
  • Return a name that can be used as a type.

    Parameters

    • name: string

      The name to create the type name from.

    Returns string

    The type name.

writeDocComment

  • writeDocComment(out: (code: string) => void, doc: string): void
  • Write the document comments.

    Parameters

    • out: (code: string) => void

      Used to output the code.

        • (code: string): void
        • Parameters

          • code: string

          Returns void

    • doc: string

      The documentation to write.

    Returns void

Generated using TypeDoc