Webler-Group / webler-codes

4 stars 0 forks source link

Enhance Codebase With Explicit Type Annotations #21

Closed Bytenol closed 3 months ago

Bytenol commented 3 months ago

Our Typescript sources lack explicit type annotations, which can lead to various issues such as decreased code readability, higher chances of runtime errors and difficulties in maintaining and refactoring the code. This issue aims to outline the benefits of adding explicit types and propose a plan to gradually introduce them into our codebase

Benefits of Explicit Typing

Current code with explicit types type nullableString = string | null; export const EMAIL_HOST: nullableString = process.env.EMAIL_HOST;

Proposed Plan

Identify key areas Create a types.d.ts to hold all types Gradual Refactoring Code Reviews Documentation and Guildlines