-
Notifications
You must be signed in to change notification settings - Fork 247
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
Is it possible to move an abstract base classes / base interface into a private module #2159
Comments
Basically, What you are trying to doc should be achievable by annotating your "private" types as |
This is a duplicate of #1980 -- the main thing here is the error message is bad. This needs to be improved. |
|
@RomainMuller when I added |
…hat base class is not exported (#11056) This reverts commit from #10925 which folded all implementations of `UserPoolIdentityProviderBase` into a single file. It was desirable to maintain our original code organization but we also did not want to export the base class In light of guidance provided in aws/jsii#2159, reverted back to original code organization and added the `@internal` decorator on the base class in a private directory ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
❓ Guidance
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)General Information
1.13.0
The Question
It's common within a CDK construct library to have an abstract class that is not exported and only concrete implementations are exported.
When attempting to move the base class to it's own file in aws/aws-cdk#10925, JSII hits me with a warning
during build time that precludes the ability to move it to a folder such as
.private
The desired outcome is a better organization of code where each concrete implementation has it's own file.
Similarly, if there is a props interface that the concrete implementations extend from, the same error message is presented.
The error message indicates that this may be by design. Is this a limitation that can be remediated or is it fundamentally required that classes be structured where the base class is in the same file as concrete implementations?
Error Message:
The text was updated successfully, but these errors were encountered: