Skip to content

the '--stripInternal' may cause naming problems. #10165

New issue

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

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

Already on GitHub? # to your account

Closed
domchen opened this issue Aug 5, 2016 · 4 comments
Closed

the '--stripInternal' may cause naming problems. #10165

domchen opened this issue Aug 5, 2016 · 4 comments

Comments

@domchen
Copy link
Contributor

domchen commented Aug 5, 2016

I have noticed that lots of guys are waiting for the internal modifier : #5228 After a searching, I found this: http://www.typescriptlang.org/docs/handbook/compiler-options.html , and take a look at the option --stripInternal. It's exactly what we need! I just don't know why it is not mentioned in any document. Anyway, thanks for add this awesome feature. we gonna use it in our engine right away.

But I think that strip the internal properties or methods away directly may cause some naming problem? For example, if the user creates a subclass and declare a method with the same name to the internal method of the base class. He will not get a error reporting since the internal name is not in the .d.ts file. If I am right, I think the better way to do this is change the modifier to private in the .d.ts instead of stripping the internal method away. But for the @internal above the class, I would like to strip it away, otherwise, I have to put lots of @internal in every method within it.

@RyanCavanaugh
Copy link
Member

As indicated in the docs, this feature is experimental, and may cause problems. The problems you're describing are why it's not an official feature yet 😉

@domchen
Copy link
Contributor Author

domchen commented Aug 5, 2016

@RyanCavanaugh Thanks for your reply :) The thing is we need this internal feature badly. We talked to your evangelists about it back on 2014 and have waited for it a long time, like two years... So I would like to ask when it will be official? and what is the final form, is it the internal modifier or the --stripInternal?

@domchen domchen closed this as completed Aug 10, 2016
@RyanCavanaugh
Copy link
Member

2.1 would be the earliest, though I expect it will be later.

@domchen
Copy link
Contributor Author

domchen commented Aug 11, 2016

It is great! Thanks for your reply again. @RyanCavanaugh

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants