And in TS, I'd like to check for if ('foo' in obj) to tell apart both cases and have proper type inference within the block, but since the generated type ends up being { foo: string } | { [key: string]: any }, TS can't know which case it is.
I found the following upstream issue which may also be related: https://github.com/horiuchi/dtsgenerator/issues/525, but I'm also seeing that you use your own fork of this lib which seems to be lagging significantly behind.
Would you have any recommendation about how to get this adressed?
I would be willing to try to work on that upstream issue, and if so would you be updating your fork with the upstream?
Hello,
I was looking into suspicious output when having the following OpenApi schema:
This means I expect the object to be an empty hash. Unfortunately, I'm getting the following output in my autogenerated axios client types:
I'd rather have
{ [key: string]: never }
, orRecord<any, never>
. That's important in the following scenario:And in TS, I'd like to check for
if ('foo' in obj)
to tell apart both cases and have proper type inference within the block, but since the generated type ends up being{ foo: string } | { [key: string]: any }
, TS can't know which case it is.I found the following upstream issue which may also be related: https://github.com/horiuchi/dtsgenerator/issues/525, but I'm also seeing that you use your own fork of this lib which seems to be lagging significantly behind.
Would you have any recommendation about how to get this adressed?
I would be willing to try to work on that upstream issue, and if so would you be updating your fork with the upstream?
Thanks