generated from stijnvanhulle/template
-
-
Notifications
You must be signed in to change notification settings - Fork 104
Labels
Description
Discussed in #1758
Originally posted by phenax June 19, 2025
I was expecting empty responses to use the type void
instead of unknown
. But since it doesn't I tried to use unknownType: 'void'
to get around it but that introduces a bug when we use additionalProperties: true
in schema. This generates the following invalid type that doesn't make much sense since [key: string]: void
with prop
won't compile and won't allow any additional properties:
export type Stuff = {
prop?: string;
[key: string]: void;
};
I think if we could have another similar emptyResponseType
option (or something along those lines) that can be controlled separately, it would solve this problem. I would love to work on it if the approach makes sense!