Extension methods are a way of adding new methods to a an existing class without modifying the class itself. The name and precise details of this feature vary across languages. It is called extension ...
Originally, I created this solution for personal use due to my preference of not including the .js extension in TypeScript import/export statements when compiling my TypeScript project to ES Module.