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
Iotsfjs currently fails to validate these requirements because I haven't been able to find a good way to describe them in the TypeScript's static type system. Essentially they could be described with somethings like { foo: 'foo' } | Not<Record<string, any>> and ['bar', 123] | Not<Array<any>> but TypeScript doesn't provide Not out of box. It might be possible to represent them with conditional types but this gets quite complicated very easily.
The text was updated successfully, but these errors were encountered:
According to the specification the following schema is supposed match
{ foo: 'foo' }
and any item that is not an object to begin with.In a similar manner the following schema is supposed to match the tuple
[ 'bar', 123 ]
and any item that is not an array at all.Iotsfjs currently fails to validate these requirements because I haven't been able to find a good way to describe them in the TypeScript's static type system. Essentially they could be described with somethings like
{ foo: 'foo' } | Not<Record<string, any>>
and['bar', 123] | Not<Array<any>>
but TypeScript doesn't provideNot
out of box. It might be possible to represent them with conditional types but this gets quite complicated very easily.The text was updated successfully, but these errors were encountered: