move
move copied to clipboard
[Feature Request] type alias
🚀 Feature Request
add type alias feature in the way that it works in rust (with supporting generics definition)
Motivation
public entry fun mix_weapons(
registry: &mut Registry<Weapons, String, Flavour<String>>,
first_parent: &mut Weapon<Parent, String, String, String, String>,
second_parent: &mut Weapon<Parent, String, String, String, String>,
coin: Coin<JUICE>,
ctx: &mut TxContext,
)
Pitch
idea:
struct Foo<T, V> {
bar: T,
baz: V,
}
type MyFoo<T> = Foo<T, String>;
example:
struct Parent {};
struct Weapons {};
type MyWeapon = Weapon<Parent, String, String, String, String>;
type MyRegistry = Registry<Weapons, String, Flavour<String>>;
public entry fun mix_weapons(
registry: &mut MyRegistry,
first_parent: &mut MyWeapon,
second_parent: &mut MyWeapon,
coin: Coin<JUICE>,
ctx: &mut TxContext,
)