You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a large library many classes need to define fields and methods that are meant only for use by other classes within the library, not the client. There is no simple way to express this in TypeScript. One can duplicate the entire public API in a set of mirror interfaces classes, but that creates a lot of duplicated code & doc maintenance, and sometime you really want to expose class names to the client. There appears to be a common convention of using the @internal JSDoc tag in this situation but it is not enforced by the compiler nor recognized by JSDoc.
The solution in Java is package-private access. The analogous mechanism in TS would be namespace-private access.
The text was updated successfully, but these errors were encountered:
Ah thanks. Perhaps more closely a duplicate of #5228
A fully supported --stripInternal would solve the problem. An 'internal' declaration modifier is a cleaner way to provide that without the noisy @internal JSDoc flag.
When building a large library many classes need to define fields and methods that are meant only for use by other classes within the library, not the client. There is no simple way to express this in TypeScript. One can duplicate the entire public API in a set of mirror interfaces classes, but that creates a lot of duplicated code & doc maintenance, and sometime you really want to expose class names to the client. There appears to be a common convention of using the @internal JSDoc tag in this situation but it is not enforced by the compiler nor recognized by JSDoc.
The solution in Java is package-private access. The analogous mechanism in TS would be namespace-private access.
The text was updated successfully, but these errors were encountered: