Skip to content
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

[Typescript] Set parent for additional properties to Record<string, Child> #877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lukas-Kullmann
Copy link

This fixes #691

The gist of the issue is that currently, the typescript generators generate additional properties to have a parent of null<String, Child>. This is wrong in two dimensions.

  1. The parent type should not be null. I chose Record in this PR as a default.
  2. The parameter of the key is in upper case. This is wrong in Typescript and has to be lower case. This actually comes hard-coded from the DefaultCodegenConfig class. I guess this is a bug here, but I did not dare touching it since it affects all languages.

@filiplindqvist-netlight

Seems resonable to me. At the very least map=Record should be default. Workaround while waiting for this PR is adding --instantiation-types map=Record to the CLI. However, this still generates Record<String, instead of Record<string, .

@magua-io
Copy link

@Lukas-Kullmann Any update on this PR? Why is it not merged?

@Paku580
Copy link

Paku580 commented Apr 26, 2023

Are there any updates on this? This fix would help me very much too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript instantiationType for maps
4 participants