SERrex Labs

SERrex Labs

Mar 05, 2023 · 1 min read

Why it's not recommended to use "I" as interface prefix in Typescript

It is generally not recommended to use "I" as a prefix for interface names in TypeScript because it does not provide any meaningful information about the interface and can be confusing.

In TypeScript, interfaces are used to define the structure of objects. They specify the names and types of properties the object should have, as well as the signatures of any methods it should implement.

Using "I" as a prefix for interface names has become a common convention in some programming languages, but it does not add any value or meaning to the interface. It is simply a naming convention, and it does not convey any information about the purpose or behavior of the interface.

Furthermore, using "I" as a prefix for interface names can be confusing because it does not indicate the purpose or function of the interface. Using descriptive and meaningful names for interfaces that indicate their purpose and function is generally better.

In summary, while it is not strictly prohibited from using "I" as a prefix for interface names in TypeScript, it is generally not recommended because it does not provide any meaningful information and can be confusing.

#typescript#oop#interface