Open
Description
A note for the community
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Use Cases
Right now del
removes the type definition of the value that is deleted. This is correct when the type is "closed" (no unknown values), however if the type has an unknown of "any", which is the most common value, then removing the type definition during del
causes the type of the deleted value to be any
even though it is known that is cannot exist. The closest type we could set it to today is null
(since that's what accessing the deleted value will actually return). I think it's time to introduce the undefined
type though, and set that instead.
CLI Playground example
$ .x = 5
5
$ type_def(.x)
{ "integer": true }
$ del(.x)
5
$ .x
null
$ type_def(.x)
{ "any": true }
Attempted Solutions
No response
Proposal
No response
References
No response
Version
0.23.0