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
Currently, when "exactOptionalPropertyTypes" is enabled in tsconfig.json, the generated files cause TS errors, because formData for example, is provided even though its type is possibly undefined.
A workaround is to add an exclamation mark behind formData as seen in the following example. However it would be great if we would have a better OOTB solution for this problem.
/** * Update firmware * @param data The data for the request. * @param data.formData Firmware file * @returns unknown success * @throws ApiError */publicstaticpostFirmware(data: PostFirmwareData={}): CancelablePromise<PostFirmwareResponse>{return__request(OpenAPI,{method: 'POST',url: '/firmware',formData: data.formData!,mediaType: 'multipart/form-data',errors: {500: 'server error',},});}}
The text was updated successfully, but these errors were encountered:
Description
Currently, when "exactOptionalPropertyTypes" is enabled in tsconfig.json, the generated files cause TS errors, because formData for example, is provided even though its type is possibly undefined.
A workaround is to add an exclamation mark behind formData as seen in the following example. However it would be great if we would have a better OOTB solution for this problem.
The text was updated successfully, but these errors were encountered: