You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
I have some large and deep javascript structures I generate in my app as a database of sorts.
Now I want to have a type def for it since it turns out I got pretty used to getting the editor suggesting types for me, and I probably should handcraft a type def, but I am exploring autogenerating this thing based on the dynamic value I generate in my app.
The problem with this is that dts-gen is way too strict. I have objects whose keys are file paths, and so it's generating types that have all these file paths serialized out. Now this is not surprising and correct behavior but I wonder if there is some sort of thing I can do to cause it to just use e.g. string in this situation? And for all the differences in the child properties, resolve them down to required or optional types based on whether they are always present or sometimes present.
I assume this is probably possible but nobody really has built such a thing. I guess I will bite the bullet and hand craft and maintain the type.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have some large and deep javascript structures I generate in my app as a database of sorts.
Now I want to have a type def for it since it turns out I got pretty used to getting the editor suggesting types for me, and I probably should handcraft a type def, but I am exploring autogenerating this thing based on the dynamic value I generate in my app.
The problem with this is that dts-gen is way too strict. I have objects whose keys are file paths, and so it's generating types that have all these file paths serialized out. Now this is not surprising and correct behavior but I wonder if there is some sort of thing I can do to cause it to just use e.g.
string
in this situation? And for all the differences in the child properties, resolve them down to required or optional types based on whether they are always present or sometimes present.I assume this is probably possible but nobody really has built such a thing. I guess I will bite the bullet and hand craft and maintain the type.
The text was updated successfully, but these errors were encountered: