zowe-cli
zowe-cli copied to clipboard
Refactor zosfiles interfaces to remove non-zosmf-specific properties
This could also apply to any interface. This one is just an example.
packages/zosfiles/src/api/doc/types/ZosmfRestClientProperties.ts
We should address this in the next
branch since it may be considered a breaking change.
Details: This type below seems to have been created so the keys of the IRestClientResponse interface could be used as values. https://github.com/zowe/zowe-cli/blob/d1da9779288ba66c9f463c095d63679cff01e7d4/packages/zosfiles/src/doc/types/ZosmfRestClientProperties.ts#L19-L20
It might be good to refactor (and possibly remove) the ZosmfRestClientProperties to avoid them being out of sync.
This also applies to any other Interfaces that we may need to use their keys as values.
It might be good to refactor (and possibly remove) the ZosmfRestClientProperties to avoid them being out of sync.
This also applies to any other Interfaces that we may need to use their keys as values.
It seems like we could use keyof IRestClientResponse
(available since TS 2.1) as a type constraint here to eliminate the need for the CLIENT_PROPERTY type 🙂