Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Define Data Element return types/interfaces

Avatar

Avatar
Boost 3
Level 1
TPapousek
Level 1

Likes

3 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile

Avatar
Boost 3
Level 1
TPapousek
Level 1

Likes

3 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile
TPapousek
Level 1

25-03-2019

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.