Max Mykhailenko
Max Mykhailenko
@JacobWeisenburger hi ```js const rawSchema = z.object({ ... }); const schema = process.env.NODE_ENV === 'development' ? rawSchema : rawSchema.strict() ``` I have a lot of different schemas and don't want...
@JacobWeisenburger thank you for participation, I understand how to improve it, but it's look less natural and also in this case I need to recheck generation of TS types based...
One more question about this topic. Where I can find test's results? I saw them only in console, but this one doesn't look right? Test was broken and better to...
1. I can't import JS file if file contains `import` statement. Node `import` statement doesn't work outside the module. So I should change file extension to `mjs`, but TC gives...
So I have file `test-schema.js` ```js const z = require('zod'); console.log({ z }); const deliveryAddressesCitySchema = z.object({ id: z.string().nullable(), }); module.exports = { deliveryAddressesCitySchema, }; ``` In console I got...
@rangav but in this case I will be unable to use that files across the project. I want to have the same schemas for using in code and for tests...
> Please share code what is the issue? How I can use that across the project If I replace `const z = require('zod');` to `const z = tc.loadModule('zod');` ? That...
> The code will be executed at runtime and please test and then let us know if any issues. You don't understand. How my typescript environment will find your local...
Sounds good for me also