Global-modifying Modules

Global-modifying Modules

A global-modifying module alters existing values in the global scope when they are imported. For example, there might exist a library which adds new members to String.prototype when imported. This pattern is somewhat dangerous due to the possibility of runtime conflicts, but we can still write a declaration file for it.

doc_TypeScript
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.