Problem:
Currently, enums allow modification at runtime, which is unsafe.
Proposed Solution:
Convert enums to immutable constant objects using as const.
TypeScript Version Required: 5.1+
Example Fix (retryConfiguration.ts):
export const RequestRetryOption = {
Enable: "enable",
Disable: "disable",
Default: "default",
} as const;
Expected Benefits:
- Prevents accidental modification of enum values at runtime.
- Improves type safety when working with predefined options.
Applicable Files:
- retryConfiguration.ts
- loggingOptions.ts
Problem:
Currently, enums allow modification at runtime, which is unsafe.
Proposed Solution:
Convert enums to immutable constant objects using
as const.TypeScript Version Required: 5.1+
Example Fix (
retryConfiguration.ts):Expected Benefits:
Applicable Files: