Interface ProblemPrinter

interface ProblemPrinter {
    printAssignabilityProblem(problem: AssignabilityProblem): string;
    printIndexedTypeConflict(problem: IndexedTypeConflict): string;
    printInferenceProblem(problem: InferenceProblem): string;
    printLanguageNode(languageNode: unknown, sentenceBegin: boolean): string;
    printSubTypeProblem(problem: SubTypeProblem): string;
    printTypeEqualityProblem(problem: TypeEqualityProblem): string;
    printTypeName(type: Type): string;
    printTypeUserRepresentation(type: Type): string;
    printTypirProblem(problem: TypirProblem): string;
    printTypirProblems(problems: TypirProblem[]): string;
    printValidationProblem(problem: ValidationProblem): string;
    printValueConflict(problem: ValueConflict): string;
}

Implemented by

Methods

  • Parameters

    • languageNode: unknown
    • sentenceBegin: boolean

    Returns string

  • This function should be used by other services, instead of using type.getName(). This enables to customize the printing of type names by overriding only this implementation.

    Parameters

    • type: Type

      the type to print

    Returns string

    the name of the given type

  • This function should be used by other services, instead of using type.getUserRepresentation(). This enables to customize the printing of type names by overriding only this implementation.

    Parameters

    • type: Type

      the type to print

    Returns string

    the user representation of the given type