Vlad Shcherbin

Results 117 comments of Vlad Shcherbin

@fabian-hiller a quick one: ```ts const data = { a: 'a', b: 'b', c: 'c', d: 'd' } function omit(object: T, keys: K[]): Omit { const result = { ...object...

Yes, thats exactly what I want - omit only specific key and leave the rest untouched (be it specified keys from schema or unknown ones). ```ts // initial object const...

Same `bug` conclusion from `type-fest` with identical examples and expectations - https://github.com/sindresorhus/type-fest/issues/382 Good read on the topic - https://github.com/microsoft/TypeScript/issues/30825

@fabian-hiller hey 👋 I've tested latest version and would like you to check if object with rest is working correctly with omit: [playground](https://valibot.dev/playground/?code=JYWwDg9gTgLgBAKjgQwM5wG5wGZQiOAcg2QBtgAjCGQgKFoGMIA7VeAeRGBhgFMATAMoMAFrxDI4AXkwA6fNwAUtOHIgUAVrwYwA6txEAlXm0UBvFargBrXgE8AjAC45bKMGYBzRQEoANJaqtnYATC4Ysm4e3v6BNvYAzOGRMO5evgGqAL5+cgCuzNbMEADuzL6xqgDahMEOhLm1iYQAurQ+ANxwAPTdcCB5bHAUvHBm8aEuUV5wWfRMrPD8yDCSMhZB9s5EyA2WwWFEFHubdklEDHRzjCxDUCZ5pPAyEWDIUKi8ipzcfEKi4mQuWWqx881uEFIvFkpAg3nuqEeMB8QA) `key1` and `key3` are omitted but still...

@fabian-hiller it's very unfortunate it works like this, I'd never expect it to work like this same as other devs from the linked issues above. The docs say: > Creates...

@fabian-hiller yes, I also expect `omit` to _remove_ the entries In [the latest example from above](https://valibot.dev/playground/?code=JYWwDg9gTgLgBAKjgQwM5wG5wGZQiOAcg2QBtgAjCGQgKFoGMIA7VeAeRGBhgFMATAMoMAFrxDI4AXkwA6fNwAUtOHIgUAVrwYwA6txEAlXm0UBvFargBrXgE8AjAC45bKMGYBzRQEoANJaqtnYATC4Ysm4e3v6BNvYAzOGRMO5evgGqAL5+cgCuzNbMEADuzL6xqgDahMEOhLm1iYQAurQ+ANxwAPTdcCB5bHAUvHBm8aEuUV5wWfRMrPD8yDCSMhZB9s5EyA2WwWFEFHubdklEDHRzjCxDUCZ5pPAyEWDIUKi8ipzcfEKi4mQuWWqx881uEFIvFkpAg3nuqEeMB8QA) I have input data: ```ts { key1: 'a', key2: 'b', key3: 'c' } ```...

This is actually not the same issue I mentioned when I opened this issue - it works correctly now in latest version. A new issue should be probably opened for...

@fabian-hiller thank you a lot for the example, I'll use it as for now ♥️ Hopefully it can be added to core and help other developers too. I actually need...

@fabian-hiller perfect, thank you! 🚀

@ciscoheat yeah, I definitely think it's related only to `zod-to-json-schema` and I think most of users (me included) use it only in `superforms` and not directly. That's why I thought...