platform/problems
Documentation
- source: platform/problems.ts
Overview
Classes
Problems
save()
Saves a new problem entry to the system's problem log.
tsstatic save(location: string, type: string, line: string, column: string, cause: string, expected: string, category: string, module: string, source: string, program: string): void;
Parameter Type Description 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.
tsstatic findProblem(id: number): Problem;
Parameter Type Description 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.
tsstatic 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.
tsstatic fetchProblemsBatch(condition: string, limit: number): void;
Parameter Type Description 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.
tsstatic deleteProblem(id: number): void;
Parameter Type Description idnumberThe unique problem ID to delete. Returns
- Type:
void- Description:
deleteAllByStatus()
Deletes all problem records that currently have the specified status.
tsstatic deleteAllByStatus(status: string): void;
Parameter Type Description 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.
tsstatic clearAllProblems(): void;Returns
- Type:
void- Description:
updateStatus()
Updates the status of a single problem by its ID.
tsstatic updateStatus(id: number, status: string): void;
Parameter Type Description 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.
tsstatic updateStatusMultiple(ids: any, status: string): void;
Parameter Type Description idsanyAn array of unique problem IDs. statusstringThe new status to apply to all problems. Returns
- Type:
void- Description:
