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

TS #40

Open
kangkai124 opened this issue Feb 24, 2020 · 1 comment
Open

TS #40

kangkai124 opened this issue Feb 24, 2020 · 1 comment

Comments

@kangkai124
Copy link
Owner

笔记

@kangkai124
Copy link
Owner Author

接口描述了公共部分,而不是公共和私有两部分。 它不会帮你检查类是否具有某些私有成员。

当一个类实现了一个接口时,只对其实例部分进行类型检查。 constructor存在于类的静态部分,所以不在检查的范围内。

当接口继承了一个类类型时,它会继承类的成员但不包括其实现

接口同样会继承到类的private和protected成员。 这意味着当你创建了一个接口继承了一个拥有私有或受保护的成员的类时,这个接口类型只能被这个类或其子类所实现(implement)。

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