zowe-cli icon indicating copy to clipboard operation
zowe-cli copied to clipboard

Refactor zosfiles interfaces to remove non-zosmf-specific properties

Open zFernand0 opened this issue 4 years ago • 3 comments

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.

zFernand0 avatar Feb 10 '20 15:02 zFernand0

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.

zFernand0 avatar Jul 21 '21 19:07 zFernand0

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 🙂

t1m0thyj avatar Jul 23 '21 17:07 t1m0thyj