expr
expr copied to clipboard
Provide a way to define types via expr
Now expr inherits types from "example" env. I may be cool to have a API to define types explicitly.
We can introduce those:
- types.Map: for giving a hint of map fields.
- types.StrictMap: field hints, plus only defined keys are allowed.
This would be a great feature. Any plans of implementing this?
Yes, this feature on the roadmap.
env := types.StrictMap{
"foo": types.StrictMap{
"bar": types.Int,
},
}