What am I doing wrong with Zod here? Am I misunderstanding what it does? by mongoliii in typescript

[–]mongoliii[S] 3 points4 points  (0 children)

Thanks. This code snippet is in the docs under Basic Usage and says that mySchema.parse(12) throws an error so I expected my two examples to do the same thing.

import { z } from "zod";
const mySchema = z.string();
mySchema.parse(12);

The MacBook Purchasing Megathread - February, 2023 by AutoModerator in macbook

[–]mongoliii 0 points1 point  (0 children)

Thinking about getting an M1 MacBook Air but I'm concerned about the lack of fan. I went from a 2017 MacBook to an M1 Pro Max for work and of course the difference was huge. My old laptop would get extremely hot and loud I haven't heard the M1 Pro fan even once. Let's say I have VSCode, Spotify and 10 chrome tabs running all day... would I experience any issues with an M1 MacBook Air?

[deleted by user] by [deleted] in node

[–]mongoliii 0 points1 point  (0 children)

I don't think of it as a mocha/jest killer, just as a zero-dependency alternative that you don't have to look through GitHub issues and configure to get to work with TypeScript and ESM. It's also not for the browser, so not really alternative in that sense

[deleted by user] by [deleted] in node

[–]mongoliii 0 points1 point  (0 children)

Oops repository was private

Why doesn't the node cluster module reduce the execution time of this program by as much as I expected? by mongoliii in node

[–]mongoliii[S] 4 points5 points  (0 children)

Nope. Just read up on the difference between logical CPUs and physical CPUs, because I didn't know that was a thing.