-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Now that augments / monkey patches are live in 1.8, maybe we could consider a move towards safer augments that are scoped to the file they're used in.
As a current workaround, I'm using explicit conversions, which are a Typescript take on implicit classes. (The difference being you have to explicitly invoke the conversion). They provide scoped monkey-patching. Here is some sample code written in this style.
Would these be considered as a future addition to TypeScript with nicer syntax and direct compiler support?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript