arktype icon indicating copy to clipboard operation
arktype copied to clipboard

Unify AST processing between functional expressions, tuple expression, strings, standardize runtime semantic validation

Open ssalbdivad opened this issue 2 years ago • 2 comments

After the refactor is complete, search repo for this issue's link and address any TODOs referencing it.

Also, add:

= (Default value) (should also work in string) Merge (maybe use "+", should not only be tuple expression)

ssalbdivad avatar Jan 25 '23 16:01 ssalbdivad

Should also allow flat tuple expressions like:

const t = type(["string", "|", "boolean", "|", "number"])

ssalbdivad avatar Apr 14 '23 20:04 ssalbdivad

Also consider reintegrating static satisifiability validation, e.g. for type("string&number"). This could be useful at least to do shallowly to help with cases like morphs.

It was a pain maintaining it across strings and tuple expressions, but may be more viable once this is implemented.

ssalbdivad avatar Jun 24 '23 19:06 ssalbdivad