Closed search654321 closed 1 year ago
Have any idea not to use validator function only when release mode?
Right now I'm just using assert. I'm not sure how typia works but the only thing I want from this extension is to do runtime validation of types, but avoid running type checking. I'm not sure if that is a limitation of rollup plugin, but at least turning off warnings will be fine...
I use assert both in development and release mode
I think the error message has been occured because the onClose
function can be undefined.
It seems not problem of typia
.
Oh, the error message is not typia
, what I mean is that I don't wan't to see typescript errors when running the vite server
You mean not to compile TypeScript type, but transpile only? Then using typia is not possible because it requires TypeScript type info.
In that case, I recommend you to compile typia using code independently and import the compiled code from main vite developed project.
But could be possible to silence typescript errors in the vite console? With webpack that is possible
Not possible in vite. What about solving the TypeScript errors?
I'm working in a legacy project and fixing them all will take a year
Then should compile from independently and import it
I'm setting up typia with vite and when I run the recommended config I see TypeScript warnings on my console like this:
I have an external command to check types and I want to avoid doing type checking on the bundler, for compilation speed reasons and to avoid cluttering the console.
How I can turn off type checking when running vite but keep typia working?
This is my current config for the
@rollup/plugin-typescript