-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Labels
estimate-12hTime estimation for issues in a project - 12hTime estimation for issues in a project - 12h
Description
First part of the @joystream/types upgrade (before the runtime is ready) will consist of:
- Upgrading all
StructandEnumtypes to use ourJoyEnum/JoyStructwrappers. The reasonsing behind this is that:- We have to change all of those anyway, because thier constructors will now take another argument (
Registry), so it makes sense to use this as an opportunity to perform further normalization. - This should greatly simplify implementing similar changes in the future
- Should also simplify decorating the api with auto-generated type definitions based on runtime metadata (which we can implement at some point, see: https://polkadot.js.org/api/examples/promise/90_typegen)
- Save time and code - no need to specify our own getters each time, since we can just use the ones that come from
Struct.withand create one shared TypeScript interface that will take care of those - Allow us to preserve as much backward compatibility as we need now
- Allow us to possibly introduce some other helpful methods/interfaces for all Structs / Enums (which we use a lot) at once
- We have to change all of those anyway, because thier constructors will now take another argument (
- Using
Tuple.with(),Vec.with()etc. whenever possible (avoid having to specify constructors on our side for same reasons as mentioned above) - Changing some import paths and other minor adjustments related to the removal / renaming of some
@polkadot/types - Updating all other functions / methods / constructors that will now need
Registryin order to do their job - Make
@joystream/typesjust export theRegistryTypesthat we can then pass as argument when creating the api (since this is the recommended way to handle this now) instead of registering them "gloablly" withregisterJoystreamTypes
The goal is to:
- Make
@joystream/typesbuild with the new versions of dependencies - Make them much more normalized and ready for future improvements (ie. https://polkadot.js.org/api/examples/promise/90_typegen related)
- Make them as backwards-compatible as possible for now to save time needed to upgrade Pioneer, CLI, network tests, storage node, status server etc. in
Alexandria
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
estimate-12hTime estimation for issues in a project - 12hTime estimation for issues in a project - 12h