-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 1129 moreericmorandExifers, suhailmalik07, imaliouris and eric-g-97477xe4me, Artazor, IonelLupu, kevupton, maulerjan and 28 morebermanboris, clitetailor, kevupton, melroy89, Asing1001 and 7 moreluketanner, smqz, asosnovsky, NullVoxPopuli, incetarik and 135 morekevupton, noramass, LM-G, brandonseydel, l0ll098 and 49 morezhaochy1990, kevupton, brandonseydel, zakharov-dy, l0ll098 and 47 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