-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript
Description
If we can get this to type check properly, we would have perfect support for boilerplate-free mixins:
declare function Blah<T>(target: T): T & {foo: number}
@Blah
class Foo {
bar() {
return this.foo; // Property 'foo' does not exist on type 'Foo'
}
}
new Foo().foo; // Property 'foo' does not exist on type 'Foo'
nevir, frankwallis, dsherret, patrick-rodgers, RichiCoder1 and 1120 moreericmorandExifers, suhailmalik07 and imaliourisxe4me, Artazor, IonelLupu, kevupton, maulerjan and 27 morebermanboris, clitetailor, kevupton, melroy89, Asing1001 and 7 moreluketanner, smqz, asosnovsky, NullVoxPopuli, incetarik and 134 morekevupton, noramass, LM-G, brandonseydel, l0ll098 and 48 morezhaochy1990, kevupton, brandonseydel, zakharov-dy, l0ll098 and 46 more
Metadata
Metadata
Assignees
Labels
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript