Create a IZosFilesTypedResponse
to offer stronger type inference for returned items
#2421
Labels
enhancement
New feature or request
priority-low
Legit issue but cosmetic or nice-to-have
v4
Prospective changes for v4
Is your feature or enhancement request related to a problem or limitation? Please describe
When using z/OS File APIs, the expected properties in
apiResponse
are unclear. SinceapiResponse
is typed asany
, this has also allowed inconsistencies to appear in the structure forapiResponse
, even though we populate this property ourselves - see #2410Describe your enhancement idea
By offering a
IZosFilesTypedResponse
, we can strongly type theapiResponse
property to provide TypeScript inference for developers that process these responses.Example:
Describe alternatives you've considered
Users can try to interpret the response by printing it and keeping track of the keys that are returned, referencing existing code, or looking at z/OSMF API documentation. However, this opens up room for mistakes as
apiResponse
is any, so any property access is considered valid by TypeScript until executed at runtime:The text was updated successfully, but these errors were encountered: