Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing multiple interfaces only exposes the 1st interface on Javascript #17

Open
leanalcabasa opened this issue Sep 6, 2016 · 1 comment

Comments

@leanalcabasa
Copy link

Hi,

Not sure if this is an issue, or there is a different way of doing this. We have an existing class that implements from a Base Class, which we also want to implement interface that will be used in Javascript.

For example, the ff:

`public class Foo : BaseFoo, IFoo
{
public string BaseName { get;set; }
public string GenericName { get;set; }
public string FooName { get; set; }
}

public class BaseFoo : IBaseFoo, IGenericFoo
{
public string BaseName { get; set; }
public string GenericName { get; set; }
}

public interface IFoo
{
string FooName { get; set; }
}`

When we use Foo in Javascript, we can only use BaseName and not GenericName and FooName. If we switch IGenericFoo and IBaseFoo order, we can use GenericName but not BaseName and FooName. Basically, whatever is the first interface is the only one exposed.

Is this supported? Or is there a different way of implementing what we want to do?

Thank you

@leanalcabasa
Copy link
Author

Found out that it is intended behavior. https://msdn.microsoft.com/en-us/library/hh779077.aspx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant