polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.07k stars 353 forks source link

Missing alternatives for types containing nested tuples #5399

Open sander2 opened 1 year ago

sander2 commented 1 year ago

See the discussion in https://github.com/polkadot-js/api/pull/5395.

Tl;dr: not all alternatives are created by the type generator when the type contains nested tuples.

jacogr commented 1 year ago

These are most-probably tricky without getting yourself into knots. And not getting into knots is why enums still have aka { Key: any }. Anyway, if this does become a problem immediately, we probably can also do a any solution inside the []'s as an interim stopgap like we do with enums.

(Although we know the "stopgap" will also last a while. Granted, I have not looked in ages, it could have been pure lazyness on my side at original implementation time...)