fugazi-io / webclient

web based terminal application for executing local and remote commands
http://fugazi.io
28 stars 12 forks source link

Infer type for a value when `any` is returned #60

Closed nitzantomer closed 7 years ago

nitzantomer commented 7 years ago

For example:

a = get "https://jsonplaceholder.typicode.com/posts/1"
jsonParse (extract data from $a)

The expected result is a map of the $a.data string, but in reality it will end with None of the statements are executable because extract returns any and not map.

In this case the client needs to check the return type at runtime and based on that decide if the command can be executed.