Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
IT Security NachrichtenUniversal-Achterbahn: Schreie der Fahrgäste nerven Nachbarschaft(01.10.2026 um 14:29 Uhr)
•
Sichere ProgrammierungGitHub Release: rust-lang/rust v1.99.0 (01.10.2026)(01.10.2026 um 14:41 Uhr)
•••
IT NachrichtenAtos invests in AI education for West Midlands youth(01.10.2026 um 10:43 Uhr)
••••••
IT Security NachrichtenUniversal-Achterbahn: Schreie der Fahrgäste nerven Nachbarschaft(01.10.2026 um 14:29 Uhr)
•
Sichere ProgrammierungGitHub Release: rust-lang/rust v1.99.0 (01.10.2026)(01.10.2026 um 14:41 Uhr)
•••
IT NachrichtenAtos invests in AI education for West Midlands youth(01.10.2026 um 10:43 Uhr)
•••••
Intelligence View
⚡ tsecurity.de Intelligence

__Pure__ annotation in Zod source code.

In this article, we will review Pureannotation in zod source code. We will look at: Where to find pure annotation in Zod source code? pure annotations issue in…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

In this article, we will review Pureannotation in zod source code. 



We will look at:




  1. Where to find pure annotation in Zod source code?


  2. pure annotations issue in evanw/esbuild.









Where to find pure annotation in Zod source code?



You will find pureannotation in zod source code at this location- https://github.com/colinhacks/zod/blob/main/packages/zod/src/v4/classic/parse.ts#L20C35-L20C44]




export const parseAsync: <T extends core.$ZodType>(
schema: T,
value: unknown,
_ctx?: core.ParseContext<core.$ZodIssue>,
_params?: { callee?: core.util.AnyFunc; Err?: core.$ZodErrorClass }
) => Promise<core.output<T>> = /* @__PURE__ */ core._parseAsync(ZodRealError) as any;









pure annotations issue in evanw/esbuild



You will find an issue related to pureannotations in esbuild repository.








Issue 503



Below is the issue description:



Currently, the /* @\_\_PURE\_\_ */ annotation must be used individually on every returned value for a given call. 



Could it be possible to allow using the annotation on a function, so all its returned values are considered pure? Like in the following.




/**
* The function is pure, so if the result is not used, it can be removed.
*
* @__PURE__
*/

function addTwo(number: number) {
return number + 2;
}

// Will be removed
addTwo(4);

// Will be removed
const x = addTwo(3);

// This will be kept
export const y = addTwo(2);






this is what @evanw had to say








About me:



Hey, my name is Ramu Narasinga. I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.




Build Shadcn CLI from scratch.




Email — [email protected]



My Github —  https://github.com/ramu-narasinga



My website —  https://ramunarasinga.com



My YouTube channel —  https://www.youtube.com/@ramu-narasinga



Learning platform —  https://thinkthroo.com



Codebase Architecture —  https://app.thinkthroo.com/architecture



Best practices —  https://app.thinkthroo.com/best-practices



Production-grade projects —  https://app.thinkthroo.com/production-grade-projects






References




  1. https://github.com/colinhacks/zod/blob/main/packages/zod/src/v4/classic/parse.ts#L20C35-L20C44


  2. https://github.com/evanw/esbuild/issues/1883


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten __Pure__ annotation in Zod source code.

Thematisch verwandte Begriffe: Pure, annotation, source code · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag