Skip to content

platform/problems

Documentation

Overview

Classes

Problems

save()

Saves a new problem entry to the system's problem log.

ts
static save(location: string, type: string, line: string, column: string, cause: string, expected: string, category: string, module: string, source: string, program: string): void;
ParameterTypeDescription
locationstringThe resource path or file location.
typestringThe severity or nature of the problem.
linestringThe line number.
columnstringThe column number.
causestringThe cause description.
expectedstringThe expected state/value description.
categorystringThe problem category.
modulestringThe module/component name.
sourcestringThe original source content.
programstringThe program or file name.

Returns

  • Type: void
  • Description:

findProblem()

Finds a specific problem by its unique ID. Note: The underlying facade returns a JSON string which is parsed here.

ts
static findProblem(id: number): Problem;
ParameterTypeDescription
idnumberThe unique problem ID.

Returns

  • Type: Problem
  • Description: The found Problem object.

fetchAllProblems()

Fetches all recorded problems in the system. Note: The underlying facade returns a JSON string which is parsed here.

ts
static fetchAllProblems(): void;

Returns

  • Type: void
  • Description: An array of all Problem objects.

fetchProblemsBatch()

Fetches a batch of problems based on a custom condition and limit.

ts
static fetchProblemsBatch(condition: string, limit: number): void;
ParameterTypeDescription
conditionstringA SQL-like condition string (e.g., "CATEGORY='Syntax'").
limitnumberThe maximum number of problems to retrieve.

Returns

  • Type: void
  • Description: An array of Problem objects matching the condition.

deleteProblem()

Deletes a problem record by its unique ID.

ts
static deleteProblem(id: number): void;
ParameterTypeDescription
idnumberThe unique problem ID to delete.

Returns

  • Type: void
  • Description:

deleteAllByStatus()

Deletes all problem records that currently have the specified status.

ts
static deleteAllByStatus(status: string): void;
ParameterTypeDescription
statusstringThe status (e.g., Problems.SOLVED or Problems.IGNORED).

Returns

  • Type: void
  • Description:

clearAllProblems()

Clears (deletes) all problem records in the system, regardless of status.

ts
static clearAllProblems(): void;

Returns

  • Type: void
  • Description:

updateStatus()

Updates the status of a single problem by its ID.

ts
static updateStatus(id: number, status: string): void;
ParameterTypeDescription
idnumberThe unique problem ID.
statusstringThe new status (e.g., Problems.SOLVED).

Returns

  • Type: void
  • Description:

updateStatusMultiple()

Updates the status of multiple problems identified by an array of IDs.

ts
static updateStatusMultiple(ids: any, status: string): void;
ParameterTypeDescription
idsanyAn array of unique problem IDs.
statusstringThe new status to apply to all problems.

Returns

  • Type: void
  • Description: