Typescript has composition, so this really isn't necessary.

interface A {}

interface X {}

function f(ax: A&X) {}



On Fri, Feb 22, 2019, 02:31 Christophe HOARAU <hoara...@gmail.com> wrote:

> Hello,
>
> I know this is not specific to angular, but as angular is one of the most
> active typescript users I was wondering if someone could help me on this
> one.
>
> I want to create an interface that extends a generic. Something like this :
>
> export interface A{
>     A: string;
> }
>
> export interface AB{
>     B: string;
> }
>
> export interface AC{
>     C: string;
> }
>
>
> export interface AX<T extends A> extends T{
>     X: string;
> }
>
> This way I could use AX in places where I need A and X.
> I know this might sound a bit weird, but I really need this.
>
> Thanks.
> Best regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
 <https://ehr.meditech.com/expanse>             
<https://www.linkedin.com/company/meditech>   
<https://twitter.com/MEDITECH>   <https://www.facebook.com/MeditechEHR>

Subscribe 
<https://info.meditech.com/get-great-meditech-content?hsCtaTracking=864299ec-5abf-4004-9c6d-2d051794101f%7Cc911be42-538a-4a48-8dca-a6d4001c6326>
 
to receive emails from MEDITECH or to change email preferences.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to