arktypea
arktype17mo ago
dibbo

Latest "keys:distilled" equivalent?

Hello, I started using ArkType a back in v1 and it has obviously come on leaps and bounds since then which is great to see.

However, back in v1 you could do something like
export const loginPayload = type(
  {
    email: 'email',
    password: '1<string<999',
  },
  { keys: 'distilled' }
);

and once you validated a payload against this you would only ever get an object with email/
password
keys.

I'm wondering how to achieve a similar result with the latest version of the library. Thanks.
Was this page helpful?