You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runtime check does not match inferred type of tuple with partial keyword applied #1480
When applying the partialkeyword to a tuple type such as type(["'foo'", "'bar'"]), the type inferred by TypeScript is Type<["foo"?, "bar"?]>, but this is not reflected by ArkType's internal representation of the type/ validation behavior. It appears the partial keyword does not have a runtime effect on sequences. This is true for types created using both the fluent and string syntaxes.
While the docs say this keyword is for named properties of objects, the type inference implies that tuples are supported. As far as I understand, we want ArkType's partial keyword to behave in the same way as TS's Partial, which is to say we expect:
Activity
test: partial/required on tuple sequences (#1480) (#1590)