ng-bootstrap / ng-bootstrap/ng-bootstrap
Correctly typed NgbModalRef.componentInstance
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.2k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Feature request:
Have you considered to use generics in NgbModal.open to return NgbModalRef.componentInstance with component type instead of any? That would make it a bit more safe when setting component instance fields.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with NgbModal.open and NgbModalRef.componentInstance, tracing their public type declarations and implementation. Update the API so the opened component type is preserved instead of any, then verify that consumers receive the correct componentInstance type and add or update relevant typing coverage if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, bootstrap, typescript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100