aws / aws/jsii

Interface cannot be hidden, but base class can

Open
#3,519 0 comments 0 reactions 0 assignees View on GitHub
feature-request module/jsii p1
Dominant language
TypeScript
Stars
2.9k
Forks
267
Avg merge
1d 25m
Merged PRs (30d)
14

Description

### Describe the feature

We have the feature where an exported class can `extend` a base class that's not exported, and jsii will take care of that properly.

The same feature does not extend to interfaces. If I `implement` a non-exported interface, I get errors.

### Use Case

I want a private interface for use by the CDK framework, mostly, and I'm not sure I want to expose it to customers.

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

-

### Environment details (OS name and version, etc.)

-

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing how jsii handles exported classes extending non-exported bases, then compare that behavior with interfaces implemented by exported classes; done means a non-exported interface can be implemented without errors while remaining hidden from generated customer APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.