-
Notifications
You must be signed in to change notification settings - Fork 23
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
Weird type error with nested objects with index type #23
Comments
I see similar error |
@G-Rath @sashashakun What version of Typescript, and what version of factory.ts are you using? I can't seem to repro. I don't see any compile errors with the example code. Thanks. |
Here are the versions:
(This is still a problem in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not too sure why this error is happening, and was hoping you could shed some light on if this is a bug with this library, or something I just have to work around:
The above code gives the following error:
If I change the index type to be
any
,v
becomes the problem:The error goes away when I do the following:
...f1.data
prop: <string>
(but notprop: null
)prop: undefined
prop
tostring | undefined
None of these work if I use
any
instead ofunknown
, nor if I use a subfactory:Overall, I'm pretty confused by this 😂
Let me know if there's anything else I can provide!
The text was updated successfully, but these errors were encountered: