gitana / cloudcms-javascript-driver

Updated Cloud CMS JS Driver using modern ECMAScript and Promises
2 stars 1 forks source link

[REQUEST] - Add generics to all the query methods #9

Open tenoriojuann opened 9 months ago

tenoriojuann commented 9 months ago

Please add generics to all the query methods so that we can pass our interfaces.

https://github.com/gitana/cloudcms-javascript-driver/blob/409b2b236c9c0e3ebafb998c038c765e88eb448c/%40types/index.d.ts#L439

mibewh commented 8 months ago

Hi Juan, Is this what you're after? I added an optional generic type to all of the node methods that is reflected in the return types. https://github.com/gitana/cloudcms-javascript-driver/commit/26718f17d655c5b57d790338fa0c6ec91d4d4cbf

tenoriojuann commented 8 months ago

Hi,

Yes please, that would be really helpful!

mibewh commented 8 months ago

Hi Juan, I've just pushed this and a bit more including some examples in the newly released 0.2.22 version. Let us know if it works for you

tenoriojuann commented 8 months ago

thank you!