Description
Multiple error classes use constructor parameter properties (e.g., public code: string) which violates the erasableSyntaxOnly TypeScript compiler option enabled in the project.
Affected Files
frontend/src/utils/oracleErrorHandling.ts (line 21)
frontend/src/utils/errors.ts (line 6)
frontend/src/utils/reputationErrors.ts (line 2)
frontend/src/utils/performance.ts (line 115)
Current Pattern
constructor(message: string, public code: string) {
super(message);
}
Why This Matters
The erasableSyntaxOnly option ensures that TypeScript syntax can be safely removed without changing runtime behavior. Constructor parameter properties are TypeScript-specific syntax that affects runtime behavior.
Proposed Solution
Refactor to explicit property declarations:
code: string;
constructor(message: string, code: string) {
super(message);
this.code = code;
}
Acceptance Criteria
Priority
🟡 MEDIUM - TypeScript configuration compliance
Description
Multiple error classes use constructor parameter properties (e.g.,
public code: string) which violates theerasableSyntaxOnlyTypeScript compiler option enabled in the project.Affected Files
frontend/src/utils/oracleErrorHandling.ts(line 21)frontend/src/utils/errors.ts(line 6)frontend/src/utils/reputationErrors.ts(line 2)frontend/src/utils/performance.ts(line 115)Current Pattern
Why This Matters
The
erasableSyntaxOnlyoption ensures that TypeScript syntax can be safely removed without changing runtime behavior. Constructor parameter properties are TypeScript-specific syntax that affects runtime behavior.Proposed Solution
Refactor to explicit property declarations:
Acceptance Criteria
Priority
🟡 MEDIUM - TypeScript configuration compliance