microsoft / microsoft/TypeScript
Spread with enum index key, invalid members don't trigger errors
@ahejlsberg is already working on this.
Since Jul 3, 2019.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 3.5.1
Search Terms:
object spread enum index missing keys
Expected behavior:
Missing keys & incorrect value types when I build a nested object using the spread operator with index keys, ought to throw errors for invalid types
Actual behavior:
It seems like the child object can have whatever shape I want, the types aren't being checked at all
Playground Link: This is same as above playground link
Related Issues: I'm not really sure what the root limitation that's causing this is so it's hard for me to find similar issues.
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.
Assessment
This issue has not been assessed yet.