When I generate the declaration for functions for which I don’t except any results, I get undefined
as return types instead of void
.
Am I doing something wrong in my Motoko code or is it just the way the dfx command generates the TypeScript declarations?
public shared({ caller }) func set(deck: Deck) : async () {
};
generates in ts
set: (arg_0: Deck) => Promise<undefined>;
but I would like
set: (arg_0: Deck) => Promise<void>;