I would like to explicitly define the return types of each Data Element. Preferably, this could be done using a TypeScript interface, JSON schema or similar.
Potential types: number, string, array, Promise (for async actions), boolean, any (default) or custom object (requiring input schema). A void/undefined type or an empty string could represent an error thrown or an invalid value.
Additionally, adding a type-checker or data validator based on these definitions could help provide tighter, safer output for these DEs.