Skip to content
Dev.to1 min read

DataWeave 2.5 Generics: How Call-Site Type...

I maintained a shared DataWeave utility library across 12 Mule apps for 2 years. Functions like topN, pipe, and safeGet. All untyped. All accepting Any. All silently producing wrong output when called with wrong types. Last quarter I rewrote them with DataWeave 2.5 call-site generics. Three production bugs surfaced on the first compile. TL;DR DataWeave 2.5 adds Java/TypeScript-style call-site type parameters: fun topN<T>(...) The compiler validates T at every call site — type mismatches become c
Read original on dev.to
0
0

Comment

Sign in to join the discussion.

Loading comments…

Related

Get the 10 best reads every Sunday

Curated by AI, voted by readers. Free forever.

Liked this? Start your own feed.

0
0