Conversation
|
Other question that occurred to me now... is |
That's a good question. Let me check |
|
So the answer is that you have to explicitly define @internal on all inherited members, or otherwise the typescript compiler will make the method visible. Does it make sense to enforce this with jsii? I guess it does, no? |
… hidden interfaces
|
|
||
| /** | ||
| * Members with names starting with ``_`` and members that are private are hidden. | ||
| * Members with names starting with `_` (and marked as @internal) and members |
There was a problem hiding this comment.
The doc does no longer reflect what the implementation does.
When a type inherits (extends/implements) from a hidden (private/internal) interface, and that interface extends a non-hidden interface, we need to copy the non-hidden interface to the consuming type so that it can be polymorphically used. Follow up on #390 Co-authored-by: RomainMuller <rmuller@amazon.com>
When a type inherits (extends/implements) from a hidden (private/internal) interface, and that interface extends a non-hidden interface, we need to copy the non-hidden interface to the consuming type so that it can be polymorphically used. Follow up on #390 Co-authored-by: RomainMuller <rmuller@amazon.com>
Respect the
@internaljsdoc tag on types and members. Any type of member marked internal will not be exposed in the API of the module and in .d.ts. files (through--strip-internal).Members (properties/methods) that are marked as
@internalmust also have an underscore prefix (i.e._myMethod) and vice versa in order to ensure that implementers or subclasses won't modify accessibility.If a class implements (or an interface extends) an internal or private interface, that interface is erased from the implementer's API. So it is possible to use internal interfaces as bases, while still maintaining API integrity (related to #287).
Fixes #388
BREAKING CHANGE: member names that begin with underscore now must be marked as "@internal" in their jsdocs, which will cause them to disappear from type declaration files and jsii APIs.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.