Better Support for Mapped Types
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
## :rocket: Feature Request
### Affected Languages
- [ ] `TypeScript` or `Javascript`
- [ ] `Python`
- [ ] `Java`
- [ ] .NET (`C#`, `F#`, ...)
- [ ] `Go`
### General Information
* **JSII Version:** 1.30.0
* **Platform:** Linux docker-desktop 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
* [ ] I may be able to implement this feature request
* [ ] This feature might incur a breaking change
### Description
We would like to make an attribute of an exported Properties object Partial<>, like this:
```
export interface MyLevelThreeConstructProps{
readonly serviceProps: Partial
}
```
This converts ServiceProps to a Mapped Type that JSII does not support:
`error JSII1003: Only string-indexed map types are supported`
This is pretty deep inside the Typescript transpilation process, so I'm not sure of the exact nature of the Mapped Type that makes it incompatible. What are the chances of a fix to JSII that supports this sort of Mapped Type?
### Proposed Solution
Contributor guide
Assessment
This issue has not been assessed yet.