[{"data":1,"prerenderedAt":3759},["ShallowReactive",2],{"navigation_docs":3,"-learn-catalogs":439,"-learn-catalogs-surround":3754},[4,30,80,245,353,408],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Start","\u002Fstart","1.start",[9,14,19,24],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction","i-lucide-info",{"title":15,"path":16,"stem":17,"icon":18},"Why start with evlog","\u002Fstart\u002Fwhy-evlog","1.start\u002F2.why-evlog","i-lucide-rocket",{"title":20,"path":21,"stem":22,"icon":23},"Installation","\u002Fstart\u002Finstallation","1.start\u002F3.installation","i-lucide-download",{"title":25,"path":26,"stem":27,"icon":28},"Quick Start","\u002Fstart\u002Fquick-start","1.start\u002F4.quick-start","i-lucide-zap",false,{"title":31,"path":32,"stem":33,"children":34,"page":29},"Learn","\u002Flearn","2.learn",[35,40,45,50,55,60,65,70,75],{"title":36,"path":37,"stem":38,"icon":39},"Overview","\u002Flearn\u002Foverview","2.learn\u002F0.overview","i-lucide-list",{"title":41,"path":42,"stem":43,"icon":44},"Simple Logging","\u002Flearn\u002Fsimple-logging","2.learn\u002F1.simple-logging","i-lucide-terminal",{"title":46,"path":47,"stem":48,"icon":49},"Wide Events","\u002Flearn\u002Fwide-events","2.learn\u002F2.wide-events","i-lucide-layers",{"title":51,"path":52,"stem":53,"icon":54},"Structured Errors","\u002Flearn\u002Fstructured-errors","2.learn\u002F3.structured-errors","i-lucide-shield-alert",{"title":56,"path":57,"stem":58,"icon":59},"Lifecycle","\u002Flearn\u002Flifecycle","2.learn\u002F4.lifecycle","i-lucide-arrow-right-left",{"title":61,"path":62,"stem":63,"icon":64},"Sampling","\u002Flearn\u002Fsampling","2.learn\u002F5.sampling","i-lucide-filter",{"title":66,"path":67,"stem":68,"icon":69},"Auto-Redaction","\u002Flearn\u002Fredaction","2.learn\u002F6.redaction","i-lucide-eye-off",{"title":71,"path":72,"stem":73,"icon":74},"Typed Fields","\u002Flearn\u002Ftyped-fields","2.learn\u002F7.typed-fields","i-simple-icons-typescript",{"title":76,"path":77,"stem":78,"icon":79},"Catalogs","\u002Flearn\u002Fcatalogs","2.learn\u002F8.catalogs","i-lucide-book-open",{"title":81,"path":82,"stem":83,"children":84,"page":29},"Integrate","\u002Fintegrate","3.integrate",[85,89,157],{"title":36,"path":86,"stem":87,"icon":88},"\u002Fintegrate\u002Foverview","3.integrate\u002F0.overview","i-lucide-plug",{"title":90,"path":91,"stem":92,"children":93,"page":29},"Adapters","\u002Fintegrate\u002Fadapters","3.integrate\u002Fadapters",[94,97,137],{"title":36,"path":95,"stem":96,"icon":39},"\u002Fintegrate\u002Fadapters\u002Foverview","3.integrate\u002Fadapters\u002F01.overview",{"title":98,"path":99,"stem":100,"children":101,"page":29},"Cloud","\u002Fintegrate\u002Fadapters\u002Fcloud","3.integrate\u002Fadapters\u002Fcloud",[102,107,112,117,122,127,132],{"title":103,"path":104,"stem":105,"icon":106},"Axiom","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Faxiom","3.integrate\u002Fadapters\u002Fcloud\u002F01.axiom","i-custom-axiom",{"title":108,"path":109,"stem":110,"icon":111},"OTLP","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fotlp","3.integrate\u002Fadapters\u002Fcloud\u002F02.otlp","i-simple-icons-opentelemetry",{"title":113,"path":114,"stem":115,"icon":116},"PostHog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fposthog","3.integrate\u002Fadapters\u002Fcloud\u002F03.posthog","i-simple-icons-posthog",{"title":118,"path":119,"stem":120,"icon":121},"Sentry","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fsentry","3.integrate\u002Fadapters\u002Fcloud\u002F04.sentry","i-simple-icons-sentry",{"title":123,"path":124,"stem":125,"icon":126},"Better Stack","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fbetter-stack","3.integrate\u002Fadapters\u002Fcloud\u002F05.better-stack","i-simple-icons-betterstack",{"title":128,"path":129,"stem":130,"icon":131},"Datadog","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fdatadog","3.integrate\u002Fadapters\u002Fcloud\u002F06.datadog","i-simple-icons-datadog",{"title":133,"path":134,"stem":135,"icon":136},"HyperDX","\u002Fintegrate\u002Fadapters\u002Fcloud\u002Fhyperdx","3.integrate\u002Fadapters\u002Fcloud\u002F07.hyperdx","i-custom-hyperdx",{"title":138,"path":139,"stem":140,"children":141,"page":29},"Self-Hosted","\u002Fintegrate\u002Fadapters\u002Fself-hosted","3.integrate\u002Fadapters\u002Fself-hosted",[142,147,152],{"title":143,"path":144,"stem":145,"icon":146},"File System","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Ffs","3.integrate\u002Fadapters\u002Fself-hosted\u002F01.fs","i-lucide-hard-drive",{"title":148,"path":149,"stem":150,"icon":151},"NuxtHub","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fnuxthub","3.integrate\u002Fadapters\u002Fself-hosted\u002F02.nuxthub","i-simple-icons-nuxt",{"title":153,"path":154,"stem":155,"icon":156},"Memory","\u002Fintegrate\u002Fadapters\u002Fself-hosted\u002Fmemory","3.integrate\u002Fadapters\u002Fself-hosted\u002F03.memory","i-lucide-cpu",{"title":158,"path":159,"stem":160,"children":161,"page":29},"Frameworks","\u002Fintegrate\u002Fframeworks","3.integrate\u002Fframeworks",[162,166,171,176,181,186,191,196,201,206,211,216,221,226,230,235,240],{"title":36,"path":163,"stem":164,"icon":165},"\u002Fintegrate\u002Fframeworks\u002Foverview","3.integrate\u002Fframeworks\u002F00.overview","i-lucide-layout-grid",{"title":167,"path":168,"stem":169,"icon":170},"Nuxt","\u002Fintegrate\u002Fframeworks\u002Fnuxt","3.integrate\u002Fframeworks\u002F01.nuxt","i-simple-icons-nuxtdotjs",{"title":172,"path":173,"stem":174,"icon":175},"Next.js","\u002Fintegrate\u002Fframeworks\u002Fnextjs","3.integrate\u002Fframeworks\u002F02.nextjs","i-simple-icons-nextdotjs",{"title":177,"path":178,"stem":179,"icon":180},"SvelteKit","\u002Fintegrate\u002Fframeworks\u002Fsveltekit","3.integrate\u002Fframeworks\u002F03.sveltekit","i-simple-icons-svelte",{"title":182,"path":183,"stem":184,"icon":185},"Nitro","\u002Fintegrate\u002Fframeworks\u002Fnitro","3.integrate\u002Fframeworks\u002F04.nitro","i-custom-nitro",{"title":187,"path":188,"stem":189,"icon":190},"TanStack Start","\u002Fintegrate\u002Fframeworks\u002Ftanstack-start","3.integrate\u002Fframeworks\u002F05.tanstack-start","i-custom-tanstack",{"title":192,"path":193,"stem":194,"icon":195},"NestJS","\u002Fintegrate\u002Fframeworks\u002Fnestjs","3.integrate\u002Fframeworks\u002F06.nestjs","i-simple-icons-nestjs",{"title":197,"path":198,"stem":199,"icon":200},"Express","\u002Fintegrate\u002Fframeworks\u002Fexpress","3.integrate\u002Fframeworks\u002F07.express","i-simple-icons-express",{"title":202,"path":203,"stem":204,"icon":205},"Hono","\u002Fintegrate\u002Fframeworks\u002Fhono","3.integrate\u002Fframeworks\u002F08.hono","i-simple-icons-hono",{"title":207,"path":208,"stem":209,"icon":210},"Fastify","\u002Fintegrate\u002Fframeworks\u002Ffastify","3.integrate\u002Fframeworks\u002F09.fastify","i-simple-icons-fastify",{"title":212,"path":213,"stem":214,"icon":215},"Elysia","\u002Fintegrate\u002Fframeworks\u002Felysia","3.integrate\u002Fframeworks\u002F10.elysia","i-custom-elysia",{"title":217,"path":218,"stem":219,"icon":220},"React Router","\u002Fintegrate\u002Fframeworks\u002Freact-router","3.integrate\u002Fframeworks\u002F11.react-router","i-custom-reactrouter",{"title":222,"path":223,"stem":224,"icon":225},"Cloudflare Workers","\u002Fintegrate\u002Fframeworks\u002Fcloudflare-workers","3.integrate\u002Fframeworks\u002F12.cloudflare-workers","i-simple-icons-cloudflare",{"title":227,"path":228,"stem":229,"icon":74},"Standalone","\u002Fintegrate\u002Fframeworks\u002Fstandalone","3.integrate\u002Fframeworks\u002F13.standalone",{"title":231,"path":232,"stem":233,"icon":234},"Astro","\u002Fintegrate\u002Fframeworks\u002Fastro","3.integrate\u002Fframeworks\u002F14.astro","i-simple-icons-astro",{"title":236,"path":237,"stem":238,"icon":239},"oRPC","\u002Fintegrate\u002Fframeworks\u002Forpc","3.integrate\u002Fframeworks\u002F15.orpc","i-lucide-network",{"title":241,"path":242,"stem":243,"icon":244},"AWS Lambda","\u002Fintegrate\u002Fframeworks\u002Faws-lambda","3.integrate\u002Fframeworks\u002F16.aws-lambda","i-custom-lambda",{"title":246,"path":247,"stem":248,"children":249,"page":29},"Use Cases","\u002Fuse-cases","4.use-cases",[250,254,259,288,316,348],{"title":36,"path":251,"stem":252,"icon":253},"\u002Fuse-cases\u002Foverview","4.use-cases\u002F0.overview","i-lucide-list-checks",{"title":255,"path":256,"stem":257,"icon":258},"Client Logging","\u002Fuse-cases\u002Fclient-logging","4.use-cases\u002F1.client-logging","i-lucide-monitor",{"title":260,"icon":261,"path":262,"stem":263,"children":264,"page":29},"AI SDK","i-simple-icons-vercel","\u002Fuse-cases\u002Fai-sdk","4.use-cases\u002F2.ai-sdk",[265,268,273,278,283],{"title":36,"path":266,"stem":267,"icon":39},"\u002Fuse-cases\u002Fai-sdk\u002Foverview","4.use-cases\u002F2.ai-sdk\u002F01.overview",{"title":269,"path":270,"stem":271,"icon":272},"Usage","\u002Fuse-cases\u002Fai-sdk\u002Fusage","4.use-cases\u002F2.ai-sdk\u002F02.usage","i-lucide-code",{"title":274,"path":275,"stem":276,"icon":277},"Options","\u002Fuse-cases\u002Fai-sdk\u002Foptions","4.use-cases\u002F2.ai-sdk\u002F03.options","i-lucide-sliders",{"title":279,"path":280,"stem":281,"icon":282},"Metadata","\u002Fuse-cases\u002Fai-sdk\u002Fmetadata","4.use-cases\u002F2.ai-sdk\u002F04.metadata","i-lucide-database",{"title":284,"path":285,"stem":286,"icon":287},"Telemetry","\u002Fuse-cases\u002Fai-sdk\u002Ftelemetry","4.use-cases\u002F2.ai-sdk\u002F05.telemetry","i-lucide-activity",{"title":289,"icon":290,"path":291,"stem":292,"children":293,"page":29},"Better Auth","i-simple-icons-betterauth","\u002Fuse-cases\u002Fbetter-auth","4.use-cases\u002F3.better-auth",[294,297,302,307,311],{"title":36,"path":295,"stem":296,"icon":39},"\u002Fuse-cases\u002Fbetter-auth\u002Foverview","4.use-cases\u002F3.better-auth\u002F01.overview",{"title":298,"path":299,"stem":300,"icon":301},"Identify User","\u002Fuse-cases\u002Fbetter-auth\u002Fidentify-user","4.use-cases\u002F3.better-auth\u002F02.identify-user","i-lucide-user-check",{"title":303,"path":304,"stem":305,"icon":306},"Middleware","\u002Fuse-cases\u002Fbetter-auth\u002Fmiddleware","4.use-cases\u002F3.better-auth\u002F03.middleware","i-lucide-shield",{"title":308,"path":309,"stem":310,"icon":258},"Client Sync","\u002Fuse-cases\u002Fbetter-auth\u002Fclient-sync","4.use-cases\u002F3.better-auth\u002F04.client-sync",{"title":312,"path":313,"stem":314,"icon":315},"Performance","\u002Fuse-cases\u002Fbetter-auth\u002Fperformance","4.use-cases\u002F3.better-auth\u002F05.performance","i-lucide-gauge",{"title":317,"icon":318,"path":319,"stem":320,"children":321,"page":29},"Audit Logs","i-lucide-shield-check","\u002Fuse-cases\u002Faudit","4.use-cases\u002F4.audit",[322,325,330,335,340,344],{"title":36,"path":323,"stem":324,"icon":39},"\u002Fuse-cases\u002Faudit\u002Foverview","4.use-cases\u002F4.audit\u002F01.overview",{"title":326,"path":327,"stem":328,"icon":329},"Schema","\u002Fuse-cases\u002Faudit\u002Fschema","4.use-cases\u002F4.audit\u002F02.schema","i-lucide-file-text",{"title":331,"path":332,"stem":333,"icon":334},"Recording","\u002Fuse-cases\u002Faudit\u002Frecording","4.use-cases\u002F4.audit\u002F03.recording","i-lucide-pen-line",{"title":336,"path":337,"stem":338,"icon":339},"Drains","\u002Fuse-cases\u002Faudit\u002Fpipeline","4.use-cases\u002F4.audit\u002F04.pipeline","i-lucide-link",{"title":341,"path":342,"stem":343,"icon":318},"Compliance","\u002Fuse-cases\u002Faudit\u002Fcompliance","4.use-cases\u002F4.audit\u002F05.compliance",{"title":345,"path":346,"stem":347,"icon":79},"Recipes","\u002Fuse-cases\u002Faudit\u002Frecipes","4.use-cases\u002F4.audit\u002F06.recipes",{"title":349,"path":350,"stem":351,"icon":352},"Enrichers","\u002Fuse-cases\u002Fenrichers","4.use-cases\u002F5.enrichers","i-lucide-sparkles",{"title":354,"path":355,"stem":356,"children":357,"page":29},"Extend","\u002Fextend","5.extend",[358,362,367,372,377,381,385,389,393,398,403],{"title":36,"path":359,"stem":360,"icon":361},"\u002Fextend\u002Foverview","5.extend\u002F0.overview","i-lucide-blocks",{"title":363,"path":364,"stem":365,"icon":366},"Stream","\u002Fextend\u002Fstream","5.extend\u002F1.stream","i-lucide-radio-tower",{"title":368,"path":369,"stem":370,"icon":371},"Custom framework","\u002Fextend\u002Fcustom-framework","5.extend\u002F10.custom-framework","i-lucide-puzzle",{"title":373,"path":374,"stem":375,"icon":376},"FS reader","\u002Fextend\u002Ffs-reader","5.extend\u002F2.fs-reader","i-lucide-folder-search",{"title":345,"path":378,"stem":379,"icon":380},"\u002Fextend\u002Fconsumer-recipes","5.extend\u002F3.consumer-recipes","i-lucide-chef-hat",{"title":382,"path":383,"stem":384,"icon":361},"Plugins","\u002Fextend\u002Fplugins","5.extend\u002F4.plugins",{"title":386,"path":387,"stem":388,"icon":352},"Custom enrichers","\u002Fextend\u002Fcustom-enrichers","5.extend\u002F5.custom-enrichers",{"title":390,"path":391,"stem":392,"icon":64},"Tail sampling","\u002Fextend\u002Ftail-sampling","5.extend\u002F6.tail-sampling",{"title":394,"path":395,"stem":396,"icon":397},"Identity headers","\u002Fextend\u002Fidentity-headers","5.extend\u002F7.identity-headers","i-lucide-fingerprint",{"title":399,"path":400,"stem":401,"icon":402},"Custom drains","\u002Fextend\u002Fcustom-drains","5.extend\u002F8.custom-drains","i-lucide-share-2",{"title":404,"path":405,"stem":406,"icon":407},"Drain pipeline","\u002Fextend\u002Fdrain-pipeline","5.extend\u002F9.drain-pipeline","i-lucide-workflow",{"title":409,"path":410,"stem":411,"children":412,"page":29},"Reference","\u002Freference","6.reference",[413,418,421,426,430,435],{"title":414,"path":415,"stem":416,"icon":417},"Configuration","\u002Freference\u002Fconfiguration","6.reference\u002F1.configuration","i-lucide-settings",{"title":312,"path":419,"stem":420,"icon":315},"\u002Freference\u002Fperformance","6.reference\u002F2.performance",{"title":422,"path":423,"stem":424,"icon":425},"Vite Plugin","\u002Freference\u002Fvite-plugin","6.reference\u002F3.vite-plugin","i-custom-vite",{"title":427,"path":428,"stem":429,"icon":318},"Best Practices","\u002Freference\u002Fbest-practices","6.reference\u002F4.best-practices",{"title":431,"path":432,"stem":433,"icon":434},"vs Other Loggers","\u002Freference\u002Fvs-other-loggers","6.reference\u002F5.vs-other-loggers","i-lucide-scale",{"title":436,"path":437,"stem":438,"icon":352},"Agent Skills","\u002Freference\u002Fagent-skills","6.reference\u002F6.agent-skills",{"id":440,"title":76,"body":441,"description":3744,"extension":3745,"links":3746,"meta":3750,"navigation":3751,"path":77,"seo":3752,"stem":78,"__hash__":3753},"docs\u002F2.learn\u002F8.catalogs.md",{"type":442,"value":443,"toc":3717},"minimark",[444,463,614,627,632,635,738,744,748,751,756,767,1120,1124,1138,1146,1359,1370,1374,1386,1392,1572,1582,1586,1596,1602,1606,1612,1618,1869,1873,2163,2176,2180,2252,2309,2458,2479,2483,2487,2497,2725,2729,2732,2777,2899,2903,2927,3064,3068,3087,3091,3150,3156,3160,3163,3209,3292,3301,3305,3425,3432,3436,3452,3465,3481,3558,3562,3670,3676,3680,3713],[445,446,447,448,452,453,452,456,452,459,462],"p",{},"The catalog primitives (",[449,450,451],"code",{},"defineError",", ",[449,454,455],{},"defineErrorCatalog",[449,457,458],{},"defineAuditAction",[449,460,461],{},"defineAuditCatalog",") are the same regardless of project size. What changes is how you organise them. This page is the deep-dive: conventions, scaling recipes from one file to a published npm package, composition patterns, and the opt-in type augmentation.",[464,465,468,474,605],"prompt",{":actions":466,"description":467,"icon":79},"[\"copy\",\"cursor\",\"windsurf\"]","Set up typed error and audit catalogs in my app",[445,469,470,471,473],{},"Group errors and audit actions in typed catalogs to eliminate magic strings, get autocomplete on ",[449,472,449],{}," everywhere, and ship them as npm packages in a monorepo.",[475,476,477,489,499,513,522,532,539,546,564,571,585,595],"ul",{},[478,479,480,481,484,485,488],"li",{},"Use ",[449,482,483],{},"defineErrorCatalog(prefix, map)"," for error bundles, ",[449,486,487],{},"defineAuditCatalog(prefix, map)"," for audit bundles",[478,490,480,491,494,495,498],{},[449,492,493],{},"defineError(code, options)"," and ",[449,496,497],{},"defineAuditAction(action, opts?)"," for one-off factories that don't fit a catalog",[478,500,501,502,505,506,452,509,512],{},"Convention: UPPER_SNAKE_CASE keys, lower.dot.case prefix, wire format is ",[449,503,504],{},"${prefix}.${KEY}"," (e.g. ",[449,507,508],{},"billing.PAYMENT_DECLINED",[449,510,511],{},"billing.INVOICE_REFUND",")",[478,514,515,516,452,519,512],{},"One catalog = one bounded context = one prefix = one file (e.g. ",[449,517,518],{},"errors\u002Fbilling.ts",[449,520,521],{},"audit\u002Fbilling.ts",[478,523,524,525,528,529],{},"Throw with ",[449,526,527],{},"billingErrors.PAYMENT_DECLINED({ cause, internal })",", audit with ",[449,530,531],{},"log.audit(billingAudit.INVOICE_REFUND({ actor, target }))",[478,533,534,535,538],{},"Use templated messages (",[449,536,537],{},"message: ({ id }) => \\","User ${id} not found``) when params are dynamic and required",[478,540,541,542,545],{},"Catalog defaults for ",[449,543,544],{},"internal"," are shallow-merged with call-site values (call-site wins)",[478,547,548,549,552,553,452,556,559,560,563],{},"Add the opt-in ",[449,550,551],{},"declare module 'evlog' { interface RegisteredErrorCatalogs { billing: typeof billingErrors } }"," augmentation to surface autocomplete on ",[449,554,555],{},"createError({ code })",[449,557,558],{},"parseError(err).code",", and ",[449,561,562],{},"throwError(code)"," everywhere",[478,565,566,567,570],{},"Scale by sharding: single file → folder per domain → sub-prefixes (",[449,568,569],{},"billing.payment",") → one npm package per bounded context (each owns its prefix, no conflicts possible)",[478,572,573,574,577,578,581,582],{},"Each shared package ships its own ",[449,575,576],{},"declare module 'evlog'"," block in ",[449,579,580],{},"src\u002Findex.ts"," so the type augmentation propagates to consumers via the published ",[449,583,584],{},".d.ts",[478,586,587,588,591,592],{},"Compare on ",[449,589,590],{},"factory.code"," in tests instead of string literals so renames are TS errors, not silent breaks: ",[449,593,594],{},"expect(err.code).toBe(billingErrors.PAYMENT_DECLINED.code)",[478,596,597,598,600,601,604],{},"Never override ",[449,599,449],{}," at the call site (the catalog defines the code identity); never put ",[449,602,603],{},"declare module"," blocks in test files (they leak into the main type-checker)",[445,606,607,608],{},"Docs: ",[609,610,611],"a",{"href":611,"rel":612},"https:\u002F\u002Fwww.evlog.dev\u002Flearn\u002Fcatalogs",[613],"nofollow",[615,616,617,618,494,622,626],"tip",{},"If you haven't yet, start with ",[609,619,621],{"href":620},"\u002Flearn\u002Fstructured-errors#error-catalogs","Structured Errors → Error Catalogs",[609,623,625],{"href":624},"\u002Fuse-cases\u002Faudit\u002Frecording#defineauditcatalog","Audit → defineAuditCatalog"," for the basics. This page assumes you've used the primitives at least once.",[628,629,631],"h2",{"id":630},"conventions","Conventions",[445,633,634],{},"A single set of conventions covers both error and audit catalogs.",[636,637,638,653],"table",{},[639,640,641],"thead",{},[642,643,644,647,650],"tr",{},[645,646],"th",{},[645,648,649],{},"Convention",[645,651,652],{},"Example",[654,655,656,679,703,722],"tbody",{},[642,657,658,665,671],{},[659,660,661],"td",{},[662,663,664],"strong",{},"Catalog key",[659,666,667,670],{},[449,668,669],{},"UPPER_SNAKE_CASE"," (enum-style, scales to hundreds of entries)",[659,672,673,452,676],{},[449,674,675],{},"PAYMENT_DECLINED",[449,677,678],{},"INVOICE_REFUND",[642,680,681,686,692],{},[659,682,683],{},[662,684,685],{},"Prefix",[659,687,688,691],{},[449,689,690],{},"lower.dot.case",", can be hierarchical",[659,693,694,452,697,452,700],{},[449,695,696],{},"'billing'",[449,698,699],{},"'billing.payment'",[449,701,702],{},"'auth.session'",[642,704,705,710,715],{},[659,706,707],{},[662,708,709],{},"Wire format",[659,711,712,714],{},[449,713,504],{}," (preserved casing)",[659,716,717,452,719],{},[449,718,508],{},[449,720,721],{},"auth.INVALID_TOKEN",[642,723,724,729,732],{},[659,725,726],{},[662,727,728],{},"One catalog =",[659,730,731],{},"One bounded context, one prefix, one file",[659,733,734,452,736],{},[449,735,518],{},[449,737,521],{},[445,739,740,741,743],{},"The wire format ends up in HTTP responses, wide events, drains, and dashboards. Stick to it across services so a ",[449,742,449],{}," from one service is recognisable in another.",[628,745,747],{"id":746},"scaling-story","Scaling story",[445,749,750],{},"The same primitives cover four scales without API change.",[752,753,755],"h3",{"id":754},"_1-file-small-repo","1 file — small repo",[445,757,758,759,762,763,766],{},"One ",[449,760,761],{},"errors.ts",", one ",[449,764,765],{},"audit.ts",". Done.",[768,769,770,1016],"code-group",{},[771,772,778],"pre",{"className":773,"code":774,"filename":775,"language":776,"meta":777,"style":777},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineErrorCatalog } from 'evlog'\n\nexport const errors = defineErrorCatalog('app', {\n  USER_NOT_FOUND: { status: 404, message: 'User not found' },\n  FORBIDDEN: { status: 403, message: 'Forbidden' },\n  VALIDATION_FAILED: {\n    status: 400,\n    message: ({ field }: { field: string }) => `Invalid ${field}`,\n  },\n})\n","src\u002Ferrors.ts","typescript","",[449,779,780,813,820,856,894,926,936,950,1001,1007],{"__ignoreMap":777},[781,782,785,789,793,797,800,803,806,810],"span",{"class":783,"line":784},"line",1,[781,786,788],{"class":787},"s7zQu","import",[781,790,792],{"class":791},"sMK4o"," {",[781,794,796],{"class":795},"sTEyZ"," defineErrorCatalog",[781,798,799],{"class":791}," }",[781,801,802],{"class":787}," from",[781,804,805],{"class":791}," '",[781,807,809],{"class":808},"sfazB","evlog",[781,811,812],{"class":791},"'\n",[781,814,816],{"class":783,"line":815},2,[781,817,819],{"emptyLinePlaceholder":818},true,"\n",[781,821,823,826,830,833,836,839,842,845,848,850,853],{"class":783,"line":822},3,[781,824,825],{"class":787},"export",[781,827,829],{"class":828},"spNyl"," const",[781,831,832],{"class":795}," errors ",[781,834,835],{"class":791},"=",[781,837,796],{"class":838},"s2Zo4",[781,840,841],{"class":795},"(",[781,843,844],{"class":791},"'",[781,846,847],{"class":808},"app",[781,849,844],{"class":791},[781,851,852],{"class":791},",",[781,854,855],{"class":791}," {\n",[781,857,859,863,866,868,871,873,877,879,882,884,886,889,891],{"class":783,"line":858},4,[781,860,862],{"class":861},"swJcz","  USER_NOT_FOUND",[781,864,865],{"class":791},":",[781,867,792],{"class":791},[781,869,870],{"class":861}," status",[781,872,865],{"class":791},[781,874,876],{"class":875},"sbssI"," 404",[781,878,852],{"class":791},[781,880,881],{"class":861}," message",[781,883,865],{"class":791},[781,885,805],{"class":791},[781,887,888],{"class":808},"User not found",[781,890,844],{"class":791},[781,892,893],{"class":791}," },\n",[781,895,897,900,902,904,906,908,911,913,915,917,919,922,924],{"class":783,"line":896},5,[781,898,899],{"class":861},"  FORBIDDEN",[781,901,865],{"class":791},[781,903,792],{"class":791},[781,905,870],{"class":861},[781,907,865],{"class":791},[781,909,910],{"class":875}," 403",[781,912,852],{"class":791},[781,914,881],{"class":861},[781,916,865],{"class":791},[781,918,805],{"class":791},[781,920,921],{"class":808},"Forbidden",[781,923,844],{"class":791},[781,925,893],{"class":791},[781,927,929,932,934],{"class":783,"line":928},6,[781,930,931],{"class":861},"  VALIDATION_FAILED",[781,933,865],{"class":791},[781,935,855],{"class":791},[781,937,939,942,944,947],{"class":783,"line":938},7,[781,940,941],{"class":861},"    status",[781,943,865],{"class":791},[781,945,946],{"class":875}," 400",[781,948,949],{"class":791},",\n",[781,951,953,956,958,961,965,968,970,972,974,978,981,984,987,990,993,996,999],{"class":783,"line":952},8,[781,954,955],{"class":838},"    message",[781,957,865],{"class":791},[781,959,960],{"class":791}," ({",[781,962,964],{"class":963},"sHdIc"," field",[781,966,967],{"class":791}," }:",[781,969,792],{"class":791},[781,971,964],{"class":861},[781,973,865],{"class":791},[781,975,977],{"class":976},"sBMFI"," string",[781,979,980],{"class":791}," })",[781,982,983],{"class":828}," =>",[781,985,986],{"class":791}," `",[781,988,989],{"class":808},"Invalid ",[781,991,992],{"class":791},"${",[781,994,995],{"class":795},"field",[781,997,998],{"class":791},"}`",[781,1000,949],{"class":791},[781,1002,1004],{"class":783,"line":1003},9,[781,1005,1006],{"class":791},"  },\n",[781,1008,1010,1013],{"class":783,"line":1009},10,[781,1011,1012],{"class":791},"}",[781,1014,1015],{"class":795},")\n",[771,1017,1020],{"className":773,"code":1018,"filename":1019,"language":776,"meta":777,"style":777},"import { defineAuditCatalog } from 'evlog'\n\nexport const audit = defineAuditCatalog('app', {\n  USER_LOGIN: { target: 'user' },\n  USER_DELETE: { target: 'user' },\n})\n","src\u002Faudit.ts",[449,1021,1022,1041,1045,1070,1093,1114],{"__ignoreMap":777},[781,1023,1024,1026,1028,1031,1033,1035,1037,1039],{"class":783,"line":784},[781,1025,788],{"class":787},[781,1027,792],{"class":791},[781,1029,1030],{"class":795}," defineAuditCatalog",[781,1032,799],{"class":791},[781,1034,802],{"class":787},[781,1036,805],{"class":791},[781,1038,809],{"class":808},[781,1040,812],{"class":791},[781,1042,1043],{"class":783,"line":815},[781,1044,819],{"emptyLinePlaceholder":818},[781,1046,1047,1049,1051,1054,1056,1058,1060,1062,1064,1066,1068],{"class":783,"line":822},[781,1048,825],{"class":787},[781,1050,829],{"class":828},[781,1052,1053],{"class":795}," audit ",[781,1055,835],{"class":791},[781,1057,1030],{"class":838},[781,1059,841],{"class":795},[781,1061,844],{"class":791},[781,1063,847],{"class":808},[781,1065,844],{"class":791},[781,1067,852],{"class":791},[781,1069,855],{"class":791},[781,1071,1072,1075,1077,1079,1082,1084,1086,1089,1091],{"class":783,"line":858},[781,1073,1074],{"class":861},"  USER_LOGIN",[781,1076,865],{"class":791},[781,1078,792],{"class":791},[781,1080,1081],{"class":861}," target",[781,1083,865],{"class":791},[781,1085,805],{"class":791},[781,1087,1088],{"class":808},"user",[781,1090,844],{"class":791},[781,1092,893],{"class":791},[781,1094,1095,1098,1100,1102,1104,1106,1108,1110,1112],{"class":783,"line":896},[781,1096,1097],{"class":861},"  USER_DELETE",[781,1099,865],{"class":791},[781,1101,792],{"class":791},[781,1103,1081],{"class":861},[781,1105,865],{"class":791},[781,1107,805],{"class":791},[781,1109,1088],{"class":808},[781,1111,844],{"class":791},[781,1113,893],{"class":791},[781,1115,1116,1118],{"class":783,"line":928},[781,1117,1012],{"class":791},[781,1119,1015],{"class":795},[752,1121,1123],{"id":1122},"_1-folder-1-file-per-domain-medium-repo","1 folder, 1 file per domain — medium repo",[445,1125,1126,1127,494,1130,1133,1134,1137],{},"Group by bounded context. One file per domain in ",[449,1128,1129],{},"src\u002Ferrors\u002F",[449,1131,1132],{},"src\u002Faudit\u002F",". An ",[449,1135,1136],{},"index.ts"," re-exports for ergonomic imports and centralises the type augmentation.",[771,1139,1144],{"className":1140,"code":1142,"language":1143},[1141],"language-text","src\u002F\n├── errors\u002F\n│   ├── billing.ts        → billingErrors (prefix: 'billing')\n│   ├── auth.ts           → authErrors    (prefix: 'auth')\n│   ├── user.ts           → userErrors    (prefix: 'user')\n│   └── index.ts          → re-export + declare module\n├── audit\u002F\n│   ├── billing.ts        → billingAudit\n│   ├── auth.ts           → authAudit\n│   └── index.ts\n","text",[449,1145,1142],{"__ignoreMap":777},[771,1147,1150],{"className":773,"code":1148,"filename":1149,"language":776,"meta":777,"style":777},"import type { authErrors } from '.\u002Fauth'\nimport type { billingErrors } from '.\u002Fbilling'\nimport type { userErrors } from '.\u002Fuser'\n\nexport { authErrors } from '.\u002Fauth'\nexport { billingErrors } from '.\u002Fbilling'\nexport { userErrors } from '.\u002Fuser'\n\ndeclare module 'evlog' {\n  interface RegisteredErrorCatalogs {\n    auth: typeof authErrors\n    billing: typeof billingErrors\n    user: typeof userErrors\n  }\n}\n","src\u002Ferrors\u002Findex.ts",[449,1151,1152,1175,1197,1219,1223,1241,1259,1277,1281,1297,1307,1321,1334,1347,1353],{"__ignoreMap":777},[781,1153,1154,1156,1159,1161,1164,1166,1168,1170,1173],{"class":783,"line":784},[781,1155,788],{"class":787},[781,1157,1158],{"class":787}," type",[781,1160,792],{"class":791},[781,1162,1163],{"class":795}," authErrors",[781,1165,799],{"class":791},[781,1167,802],{"class":787},[781,1169,805],{"class":791},[781,1171,1172],{"class":808},".\u002Fauth",[781,1174,812],{"class":791},[781,1176,1177,1179,1181,1183,1186,1188,1190,1192,1195],{"class":783,"line":815},[781,1178,788],{"class":787},[781,1180,1158],{"class":787},[781,1182,792],{"class":791},[781,1184,1185],{"class":795}," billingErrors",[781,1187,799],{"class":791},[781,1189,802],{"class":787},[781,1191,805],{"class":791},[781,1193,1194],{"class":808},".\u002Fbilling",[781,1196,812],{"class":791},[781,1198,1199,1201,1203,1205,1208,1210,1212,1214,1217],{"class":783,"line":822},[781,1200,788],{"class":787},[781,1202,1158],{"class":787},[781,1204,792],{"class":791},[781,1206,1207],{"class":795}," userErrors",[781,1209,799],{"class":791},[781,1211,802],{"class":787},[781,1213,805],{"class":791},[781,1215,1216],{"class":808},".\u002Fuser",[781,1218,812],{"class":791},[781,1220,1221],{"class":783,"line":858},[781,1222,819],{"emptyLinePlaceholder":818},[781,1224,1225,1227,1229,1231,1233,1235,1237,1239],{"class":783,"line":896},[781,1226,825],{"class":787},[781,1228,792],{"class":791},[781,1230,1163],{"class":795},[781,1232,799],{"class":791},[781,1234,802],{"class":787},[781,1236,805],{"class":791},[781,1238,1172],{"class":808},[781,1240,812],{"class":791},[781,1242,1243,1245,1247,1249,1251,1253,1255,1257],{"class":783,"line":928},[781,1244,825],{"class":787},[781,1246,792],{"class":791},[781,1248,1185],{"class":795},[781,1250,799],{"class":791},[781,1252,802],{"class":787},[781,1254,805],{"class":791},[781,1256,1194],{"class":808},[781,1258,812],{"class":791},[781,1260,1261,1263,1265,1267,1269,1271,1273,1275],{"class":783,"line":938},[781,1262,825],{"class":787},[781,1264,792],{"class":791},[781,1266,1207],{"class":795},[781,1268,799],{"class":791},[781,1270,802],{"class":787},[781,1272,805],{"class":791},[781,1274,1216],{"class":808},[781,1276,812],{"class":791},[781,1278,1279],{"class":783,"line":952},[781,1280,819],{"emptyLinePlaceholder":818},[781,1282,1283,1286,1289,1291,1293,1295],{"class":783,"line":1003},[781,1284,1285],{"class":828},"declare",[781,1287,1288],{"class":828}," module",[781,1290,805],{"class":791},[781,1292,809],{"class":808},[781,1294,844],{"class":791},[781,1296,855],{"class":791},[781,1298,1299,1302,1305],{"class":783,"line":1009},[781,1300,1301],{"class":828},"  interface",[781,1303,1304],{"class":976}," RegisteredErrorCatalogs",[781,1306,855],{"class":791},[781,1308,1310,1313,1315,1318],{"class":783,"line":1309},11,[781,1311,1312],{"class":861},"    auth",[781,1314,865],{"class":791},[781,1316,1317],{"class":791}," typeof",[781,1319,1320],{"class":795}," authErrors\n",[781,1322,1324,1327,1329,1331],{"class":783,"line":1323},12,[781,1325,1326],{"class":861},"    billing",[781,1328,865],{"class":791},[781,1330,1317],{"class":791},[781,1332,1333],{"class":795}," billingErrors\n",[781,1335,1337,1340,1342,1344],{"class":783,"line":1336},13,[781,1338,1339],{"class":861},"    user",[781,1341,865],{"class":791},[781,1343,1317],{"class":791},[781,1345,1346],{"class":795}," userErrors\n",[781,1348,1350],{"class":783,"line":1349},14,[781,1351,1352],{"class":791},"  }\n",[781,1354,1356],{"class":783,"line":1355},15,[781,1357,1358],{"class":791},"}\n",[445,1360,1361,1362,1365,1366,1369],{},"The augmentation is purely type-level: there is no ",[449,1363,1364],{},"init"," step, no runtime registration. Importing ",[449,1367,1368],{},"~\u002Ferrors"," once anywhere in your app is enough for TypeScript to pick up the merged type.",[752,1371,1373],{"id":1372},"sub-prefixes-very-large-repo","Sub-prefixes — very large repo",[445,1375,1376,1377,452,1379,452,1382,1385],{},"Hierarchical prefixes (",[449,1378,569],{},[449,1380,1381],{},"billing.subscription",[449,1383,1384],{},"auth.session",") keep keys short while preserving namespace clarity. One catalog per sub-domain.",[771,1387,1390],{"className":1388,"code":1389,"language":1143},[1141],"src\u002Ffeatures\u002F\n├── billing\u002F\n│   └── errors\u002F\n│       ├── payment.ts        → billingPaymentErrors (prefix: 'billing.payment')\n│       ├── subscription.ts   → billingSubscriptionErrors\n│       └── invoice.ts        → billingInvoiceErrors\n├── auth\u002F\n│   └── errors\u002F\n│       ├── session.ts        → authSessionErrors (prefix: 'auth.session')\n│       ├── oauth.ts          → authOAuthErrors\n│       └── mfa.ts            → authMfaErrors\n",[449,1391,1389],{"__ignoreMap":777},[771,1393,1396],{"className":773,"code":1394,"filename":1395,"language":776,"meta":777,"style":777},"import { defineErrorCatalog } from 'evlog'\n\nexport const billingPaymentErrors = defineErrorCatalog('billing.payment', {\n  DECLINED: { status: 402, message: 'Card declined' },\n  INSUFFICIENT_FUNDS: { status: 402, message: 'Insufficient funds' },\n  EXPIRED_CARD: { status: 402, message: 'Card expired' },\n  CVV_MISMATCH: { status: 402, message: 'CVV mismatch' },\n})\n","src\u002Ffeatures\u002Fbilling\u002Ferrors\u002Fpayment.ts",[449,1397,1398,1416,1420,1445,1476,1506,1536,1566],{"__ignoreMap":777},[781,1399,1400,1402,1404,1406,1408,1410,1412,1414],{"class":783,"line":784},[781,1401,788],{"class":787},[781,1403,792],{"class":791},[781,1405,796],{"class":795},[781,1407,799],{"class":791},[781,1409,802],{"class":787},[781,1411,805],{"class":791},[781,1413,809],{"class":808},[781,1415,812],{"class":791},[781,1417,1418],{"class":783,"line":815},[781,1419,819],{"emptyLinePlaceholder":818},[781,1421,1422,1424,1426,1429,1431,1433,1435,1437,1439,1441,1443],{"class":783,"line":822},[781,1423,825],{"class":787},[781,1425,829],{"class":828},[781,1427,1428],{"class":795}," billingPaymentErrors ",[781,1430,835],{"class":791},[781,1432,796],{"class":838},[781,1434,841],{"class":795},[781,1436,844],{"class":791},[781,1438,569],{"class":808},[781,1440,844],{"class":791},[781,1442,852],{"class":791},[781,1444,855],{"class":791},[781,1446,1447,1450,1452,1454,1456,1458,1461,1463,1465,1467,1469,1472,1474],{"class":783,"line":858},[781,1448,1449],{"class":861},"  DECLINED",[781,1451,865],{"class":791},[781,1453,792],{"class":791},[781,1455,870],{"class":861},[781,1457,865],{"class":791},[781,1459,1460],{"class":875}," 402",[781,1462,852],{"class":791},[781,1464,881],{"class":861},[781,1466,865],{"class":791},[781,1468,805],{"class":791},[781,1470,1471],{"class":808},"Card declined",[781,1473,844],{"class":791},[781,1475,893],{"class":791},[781,1477,1478,1481,1483,1485,1487,1489,1491,1493,1495,1497,1499,1502,1504],{"class":783,"line":896},[781,1479,1480],{"class":861},"  INSUFFICIENT_FUNDS",[781,1482,865],{"class":791},[781,1484,792],{"class":791},[781,1486,870],{"class":861},[781,1488,865],{"class":791},[781,1490,1460],{"class":875},[781,1492,852],{"class":791},[781,1494,881],{"class":861},[781,1496,865],{"class":791},[781,1498,805],{"class":791},[781,1500,1501],{"class":808},"Insufficient funds",[781,1503,844],{"class":791},[781,1505,893],{"class":791},[781,1507,1508,1511,1513,1515,1517,1519,1521,1523,1525,1527,1529,1532,1534],{"class":783,"line":928},[781,1509,1510],{"class":861},"  EXPIRED_CARD",[781,1512,865],{"class":791},[781,1514,792],{"class":791},[781,1516,870],{"class":861},[781,1518,865],{"class":791},[781,1520,1460],{"class":875},[781,1522,852],{"class":791},[781,1524,881],{"class":861},[781,1526,865],{"class":791},[781,1528,805],{"class":791},[781,1530,1531],{"class":808},"Card expired",[781,1533,844],{"class":791},[781,1535,893],{"class":791},[781,1537,1538,1541,1543,1545,1547,1549,1551,1553,1555,1557,1559,1562,1564],{"class":783,"line":938},[781,1539,1540],{"class":861},"  CVV_MISMATCH",[781,1542,865],{"class":791},[781,1544,792],{"class":791},[781,1546,870],{"class":861},[781,1548,865],{"class":791},[781,1550,1460],{"class":875},[781,1552,852],{"class":791},[781,1554,881],{"class":861},[781,1556,865],{"class":791},[781,1558,805],{"class":791},[781,1560,1561],{"class":808},"CVV mismatch",[781,1563,844],{"class":791},[781,1565,893],{"class":791},[781,1567,1568,1570],{"class":783,"line":952},[781,1569,1012],{"class":791},[781,1571,1015],{"class":795},[445,1573,1574,1575,452,1578,1581],{},"Wire codes become ",[449,1576,1577],{},"billing.payment.DECLINED",[449,1579,1580],{},"billing.payment.INSUFFICIENT_FUNDS",", etc. The convention scales to hundreds of entries without collisions.",[752,1583,1585],{"id":1584},"npm-packages-monorepo","npm packages — monorepo",[445,1587,1588,1589,1591,1592,1595],{},"In a monorepo, each bounded context can ship as its own npm package. Type augmentation propagates through the published ",[449,1590,584],{},", so consumers get autocomplete just by ",[449,1593,1594],{},"pnpm add @acme\u002Ferrors-billing",".",[771,1597,1600],{"className":1598,"code":1599,"language":1143},[1141],"acme-monorepo\u002F\n├── packages\u002F\n│   ├── errors-billing\u002F         → @acme\u002Ferrors-billing\n│   │   └── src\u002Findex.ts\n│   ├── errors-auth\u002F            → @acme\u002Ferrors-auth\n│   │   └── src\u002Findex.ts\n│   └── audit-billing\u002F          → @acme\u002Faudit-billing\n│       └── src\u002Findex.ts\n└── apps\u002F\n    ├── api\u002F                    → imports + re-exports the catalogs\n    └── worker\u002F\n",[449,1601,1599],{"__ignoreMap":777},[628,1603,1605],{"id":1604},"publishing-a-catalog-as-an-npm-package","Publishing a catalog as an npm package",[445,1607,1608,1609,1611],{},"A catalog is just regular TypeScript that depends on ",[449,1610,809],{}," as a peer dep. Here is the minimal recipe.",[752,1613,1615],{"id":1614},"packagejson",[449,1616,1617],{},"package.json",[771,1619,1624],{"className":1620,"code":1621,"filename":1622,"language":1623,"meta":777,"style":777},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"name\": \"@acme\u002Ferrors-billing\",\n  \"version\": \"1.0.0\",\n  \"type\": \"module\",\n  \"main\": \".\u002Fdist\u002Findex.mjs\",\n  \"types\": \".\u002Fdist\u002Findex.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"import\": \".\u002Fdist\u002Findex.mjs\",\n      \"types\": \".\u002Fdist\u002Findex.d.ts\"\n    }\n  },\n  \"peerDependencies\": {\n    \"evlog\": \"^3.0.0\"\n  },\n  \"files\": [\"dist\"]\n}\n","packages\u002Ferrors-billing\u002Fpackage.json","json",[449,1625,1626,1631,1654,1674,1694,1714,1734,1747,1760,1779,1796,1801,1805,1818,1835,1839,1864],{"__ignoreMap":777},[781,1627,1628],{"class":783,"line":784},[781,1629,1630],{"class":791},"{\n",[781,1632,1633,1636,1639,1642,1644,1647,1650,1652],{"class":783,"line":815},[781,1634,1635],{"class":791},"  \"",[781,1637,1638],{"class":828},"name",[781,1640,1641],{"class":791},"\"",[781,1643,865],{"class":791},[781,1645,1646],{"class":791}," \"",[781,1648,1649],{"class":808},"@acme\u002Ferrors-billing",[781,1651,1641],{"class":791},[781,1653,949],{"class":791},[781,1655,1656,1658,1661,1663,1665,1667,1670,1672],{"class":783,"line":822},[781,1657,1635],{"class":791},[781,1659,1660],{"class":828},"version",[781,1662,1641],{"class":791},[781,1664,865],{"class":791},[781,1666,1646],{"class":791},[781,1668,1669],{"class":808},"1.0.0",[781,1671,1641],{"class":791},[781,1673,949],{"class":791},[781,1675,1676,1678,1681,1683,1685,1687,1690,1692],{"class":783,"line":858},[781,1677,1635],{"class":791},[781,1679,1680],{"class":828},"type",[781,1682,1641],{"class":791},[781,1684,865],{"class":791},[781,1686,1646],{"class":791},[781,1688,1689],{"class":808},"module",[781,1691,1641],{"class":791},[781,1693,949],{"class":791},[781,1695,1696,1698,1701,1703,1705,1707,1710,1712],{"class":783,"line":896},[781,1697,1635],{"class":791},[781,1699,1700],{"class":828},"main",[781,1702,1641],{"class":791},[781,1704,865],{"class":791},[781,1706,1646],{"class":791},[781,1708,1709],{"class":808},".\u002Fdist\u002Findex.mjs",[781,1711,1641],{"class":791},[781,1713,949],{"class":791},[781,1715,1716,1718,1721,1723,1725,1727,1730,1732],{"class":783,"line":928},[781,1717,1635],{"class":791},[781,1719,1720],{"class":828},"types",[781,1722,1641],{"class":791},[781,1724,865],{"class":791},[781,1726,1646],{"class":791},[781,1728,1729],{"class":808},".\u002Fdist\u002Findex.d.ts",[781,1731,1641],{"class":791},[781,1733,949],{"class":791},[781,1735,1736,1738,1741,1743,1745],{"class":783,"line":938},[781,1737,1635],{"class":791},[781,1739,1740],{"class":828},"exports",[781,1742,1641],{"class":791},[781,1744,865],{"class":791},[781,1746,855],{"class":791},[781,1748,1749,1752,1754,1756,1758],{"class":783,"line":952},[781,1750,1751],{"class":791},"    \"",[781,1753,1595],{"class":976},[781,1755,1641],{"class":791},[781,1757,865],{"class":791},[781,1759,855],{"class":791},[781,1761,1762,1765,1767,1769,1771,1773,1775,1777],{"class":783,"line":1003},[781,1763,1764],{"class":791},"      \"",[781,1766,788],{"class":875},[781,1768,1641],{"class":791},[781,1770,865],{"class":791},[781,1772,1646],{"class":791},[781,1774,1709],{"class":808},[781,1776,1641],{"class":791},[781,1778,949],{"class":791},[781,1780,1781,1783,1785,1787,1789,1791,1793],{"class":783,"line":1009},[781,1782,1764],{"class":791},[781,1784,1720],{"class":875},[781,1786,1641],{"class":791},[781,1788,865],{"class":791},[781,1790,1646],{"class":791},[781,1792,1729],{"class":808},[781,1794,1795],{"class":791},"\"\n",[781,1797,1798],{"class":783,"line":1309},[781,1799,1800],{"class":791},"    }\n",[781,1802,1803],{"class":783,"line":1323},[781,1804,1006],{"class":791},[781,1806,1807,1809,1812,1814,1816],{"class":783,"line":1336},[781,1808,1635],{"class":791},[781,1810,1811],{"class":828},"peerDependencies",[781,1813,1641],{"class":791},[781,1815,865],{"class":791},[781,1817,855],{"class":791},[781,1819,1820,1822,1824,1826,1828,1830,1833],{"class":783,"line":1349},[781,1821,1751],{"class":791},[781,1823,809],{"class":976},[781,1825,1641],{"class":791},[781,1827,865],{"class":791},[781,1829,1646],{"class":791},[781,1831,1832],{"class":808},"^3.0.0",[781,1834,1795],{"class":791},[781,1836,1837],{"class":783,"line":1355},[781,1838,1006],{"class":791},[781,1840,1842,1844,1847,1849,1851,1854,1856,1859,1861],{"class":783,"line":1841},16,[781,1843,1635],{"class":791},[781,1845,1846],{"class":828},"files",[781,1848,1641],{"class":791},[781,1850,865],{"class":791},[781,1852,1853],{"class":791}," [",[781,1855,1641],{"class":791},[781,1857,1858],{"class":808},"dist",[781,1860,1641],{"class":791},[781,1862,1863],{"class":791},"]\n",[781,1865,1867],{"class":783,"line":1866},17,[781,1868,1358],{"class":791},[752,1870,1872],{"id":1871},"source-catalog-augmentation-in-the-same-file","Source — catalog + augmentation in the same file",[771,1874,1877],{"className":773,"code":1875,"filename":1876,"language":776,"meta":777,"style":777},"import { defineErrorCatalog } from 'evlog'\n\nexport const billingErrors = defineErrorCatalog('billing', {\n  PAYMENT_DECLINED: {\n    status: 402,\n    message: 'Card declined',\n    why: 'Issuer declined the charge',\n    fix: 'Try a different payment method',\n    link: 'https:\u002F\u002Fdocs.example.com\u002Ferrors\u002Fbilling.payment_declined',\n  },\n  INSUFFICIENT_FUNDS: {\n    status: 402,\n    message: ({ available, required }: { available: number, required: number }) =>\n      `Insufficient funds: $${available}\u002F$${required}`,\n  },\n  \u002F\u002F ...\n})\n\ndeclare module 'evlog' {\n  interface RegisteredErrorCatalogs {\n    billing: typeof billingErrors\n  }\n}\n","packages\u002Ferrors-billing\u002Fsrc\u002Findex.ts",[449,1878,1879,1897,1901,1927,1936,1946,1960,1976,1992,2008,2012,2020,2030,2070,2097,2101,2107,2113,2118,2133,2142,2153,2158],{"__ignoreMap":777},[781,1880,1881,1883,1885,1887,1889,1891,1893,1895],{"class":783,"line":784},[781,1882,788],{"class":787},[781,1884,792],{"class":791},[781,1886,796],{"class":795},[781,1888,799],{"class":791},[781,1890,802],{"class":787},[781,1892,805],{"class":791},[781,1894,809],{"class":808},[781,1896,812],{"class":791},[781,1898,1899],{"class":783,"line":815},[781,1900,819],{"emptyLinePlaceholder":818},[781,1902,1903,1905,1907,1910,1912,1914,1916,1918,1921,1923,1925],{"class":783,"line":822},[781,1904,825],{"class":787},[781,1906,829],{"class":828},[781,1908,1909],{"class":795}," billingErrors ",[781,1911,835],{"class":791},[781,1913,796],{"class":838},[781,1915,841],{"class":795},[781,1917,844],{"class":791},[781,1919,1920],{"class":808},"billing",[781,1922,844],{"class":791},[781,1924,852],{"class":791},[781,1926,855],{"class":791},[781,1928,1929,1932,1934],{"class":783,"line":858},[781,1930,1931],{"class":861},"  PAYMENT_DECLINED",[781,1933,865],{"class":791},[781,1935,855],{"class":791},[781,1937,1938,1940,1942,1944],{"class":783,"line":896},[781,1939,941],{"class":861},[781,1941,865],{"class":791},[781,1943,1460],{"class":875},[781,1945,949],{"class":791},[781,1947,1948,1950,1952,1954,1956,1958],{"class":783,"line":928},[781,1949,955],{"class":861},[781,1951,865],{"class":791},[781,1953,805],{"class":791},[781,1955,1471],{"class":808},[781,1957,844],{"class":791},[781,1959,949],{"class":791},[781,1961,1962,1965,1967,1969,1972,1974],{"class":783,"line":938},[781,1963,1964],{"class":861},"    why",[781,1966,865],{"class":791},[781,1968,805],{"class":791},[781,1970,1971],{"class":808},"Issuer declined the charge",[781,1973,844],{"class":791},[781,1975,949],{"class":791},[781,1977,1978,1981,1983,1985,1988,1990],{"class":783,"line":952},[781,1979,1980],{"class":861},"    fix",[781,1982,865],{"class":791},[781,1984,805],{"class":791},[781,1986,1987],{"class":808},"Try a different payment method",[781,1989,844],{"class":791},[781,1991,949],{"class":791},[781,1993,1994,1997,1999,2001,2004,2006],{"class":783,"line":1003},[781,1995,1996],{"class":861},"    link",[781,1998,865],{"class":791},[781,2000,805],{"class":791},[781,2002,2003],{"class":808},"https:\u002F\u002Fdocs.example.com\u002Ferrors\u002Fbilling.payment_declined",[781,2005,844],{"class":791},[781,2007,949],{"class":791},[781,2009,2010],{"class":783,"line":1009},[781,2011,1006],{"class":791},[781,2013,2014,2016,2018],{"class":783,"line":1309},[781,2015,1480],{"class":861},[781,2017,865],{"class":791},[781,2019,855],{"class":791},[781,2021,2022,2024,2026,2028],{"class":783,"line":1323},[781,2023,941],{"class":861},[781,2025,865],{"class":791},[781,2027,1460],{"class":875},[781,2029,949],{"class":791},[781,2031,2032,2034,2036,2038,2041,2043,2046,2048,2050,2052,2054,2057,2059,2061,2063,2065,2067],{"class":783,"line":1336},[781,2033,955],{"class":838},[781,2035,865],{"class":791},[781,2037,960],{"class":791},[781,2039,2040],{"class":963}," available",[781,2042,852],{"class":791},[781,2044,2045],{"class":963}," required",[781,2047,967],{"class":791},[781,2049,792],{"class":791},[781,2051,2040],{"class":861},[781,2053,865],{"class":791},[781,2055,2056],{"class":976}," number",[781,2058,852],{"class":791},[781,2060,2045],{"class":861},[781,2062,865],{"class":791},[781,2064,2056],{"class":976},[781,2066,980],{"class":791},[781,2068,2069],{"class":828}," =>\n",[781,2071,2072,2075,2078,2080,2083,2085,2088,2090,2093,2095],{"class":783,"line":1349},[781,2073,2074],{"class":791},"      `",[781,2076,2077],{"class":808},"Insufficient funds: $",[781,2079,992],{"class":791},[781,2081,2082],{"class":795},"available",[781,2084,1012],{"class":791},[781,2086,2087],{"class":808},"\u002F$",[781,2089,992],{"class":791},[781,2091,2092],{"class":795},"required",[781,2094,998],{"class":791},[781,2096,949],{"class":791},[781,2098,2099],{"class":783,"line":1355},[781,2100,1006],{"class":791},[781,2102,2103],{"class":783,"line":1841},[781,2104,2106],{"class":2105},"sHwdD","  \u002F\u002F ...\n",[781,2108,2109,2111],{"class":783,"line":1866},[781,2110,1012],{"class":791},[781,2112,1015],{"class":795},[781,2114,2116],{"class":783,"line":2115},18,[781,2117,819],{"emptyLinePlaceholder":818},[781,2119,2121,2123,2125,2127,2129,2131],{"class":783,"line":2120},19,[781,2122,1285],{"class":828},[781,2124,1288],{"class":828},[781,2126,805],{"class":791},[781,2128,809],{"class":808},[781,2130,844],{"class":791},[781,2132,855],{"class":791},[781,2134,2136,2138,2140],{"class":783,"line":2135},20,[781,2137,1301],{"class":828},[781,2139,1304],{"class":976},[781,2141,855],{"class":791},[781,2143,2145,2147,2149,2151],{"class":783,"line":2144},21,[781,2146,1326],{"class":861},[781,2148,865],{"class":791},[781,2150,1317],{"class":791},[781,2152,1333],{"class":795},[781,2154,2156],{"class":783,"line":2155},22,[781,2157,1352],{"class":791},[781,2159,2161],{"class":783,"line":2160},23,[781,2162,1358],{"class":791},[445,2164,2165,2166,2168,2169,2172,2173,2175],{},"The ",[449,2167,603],{}," block lives inside the source file so the bundler emits it into the ",[449,2170,2171],{},"dist\u002Findex.d.ts",". Any consumer that imports from ",[449,2174,1649],{}," gets the augmentation transitively — no extra setup required on their side.",[752,2177,2179],{"id":2178},"consumption","Consumption",[771,2181,2184],{"className":773,"code":2182,"filename":2183,"language":776,"meta":777,"style":777},"\u002F\u002F Importing the package activates both the runtime catalog and the type augmentation.\nimport { billingErrors } from '@acme\u002Ferrors-billing'\nimport { authErrors } from '@acme\u002Ferrors-auth'\n\n\u002F\u002F Re-export from a central place so the rest of the app has one import path.\nexport { billingErrors, authErrors }\n","apps\u002Fapi\u002Fsrc\u002Finit.ts",[449,2185,2186,2191,2209,2228,2232,2237],{"__ignoreMap":777},[781,2187,2188],{"class":783,"line":784},[781,2189,2190],{"class":2105},"\u002F\u002F Importing the package activates both the runtime catalog and the type augmentation.\n",[781,2192,2193,2195,2197,2199,2201,2203,2205,2207],{"class":783,"line":815},[781,2194,788],{"class":787},[781,2196,792],{"class":791},[781,2198,1185],{"class":795},[781,2200,799],{"class":791},[781,2202,802],{"class":787},[781,2204,805],{"class":791},[781,2206,1649],{"class":808},[781,2208,812],{"class":791},[781,2210,2211,2213,2215,2217,2219,2221,2223,2226],{"class":783,"line":822},[781,2212,788],{"class":787},[781,2214,792],{"class":791},[781,2216,1163],{"class":795},[781,2218,799],{"class":791},[781,2220,802],{"class":787},[781,2222,805],{"class":791},[781,2224,2225],{"class":808},"@acme\u002Ferrors-auth",[781,2227,812],{"class":791},[781,2229,2230],{"class":783,"line":858},[781,2231,819],{"emptyLinePlaceholder":818},[781,2233,2234],{"class":783,"line":896},[781,2235,2236],{"class":2105},"\u002F\u002F Re-export from a central place so the rest of the app has one import path.\n",[781,2238,2239,2241,2243,2245,2247,2249],{"class":783,"line":928},[781,2240,825],{"class":787},[781,2242,792],{"class":791},[781,2244,1185],{"class":795},[781,2246,852],{"class":791},[781,2248,1163],{"class":795},[781,2250,2251],{"class":791}," }\n",[771,2253,2256],{"className":773,"code":2254,"filename":2255,"language":776,"meta":777,"style":777},"import { billingErrors } from '~\u002Finit'\n\nthrow billingErrors.PAYMENT_DECLINED({ cause: stripeErr })\n","apps\u002Fapi\u002Fsrc\u002Froutes\u002Fcheckout.post.ts",[449,2257,2258,2277,2281],{"__ignoreMap":777},[781,2259,2260,2262,2264,2266,2268,2270,2272,2275],{"class":783,"line":784},[781,2261,788],{"class":787},[781,2263,792],{"class":791},[781,2265,1185],{"class":795},[781,2267,799],{"class":791},[781,2269,802],{"class":787},[781,2271,805],{"class":791},[781,2273,2274],{"class":808},"~\u002Finit",[781,2276,812],{"class":791},[781,2278,2279],{"class":783,"line":815},[781,2280,819],{"emptyLinePlaceholder":818},[781,2282,2283,2286,2288,2290,2292,2294,2297,2300,2302,2305,2307],{"class":783,"line":822},[781,2284,2285],{"class":787},"throw",[781,2287,1185],{"class":795},[781,2289,1595],{"class":791},[781,2291,675],{"class":838},[781,2293,841],{"class":795},[781,2295,2296],{"class":791},"{",[781,2298,2299],{"class":861}," cause",[781,2301,865],{"class":791},[781,2303,2304],{"class":795}," stripeErr ",[781,2306,1012],{"class":791},[781,2308,1015],{"class":795},[771,2310,2313],{"className":773,"code":2311,"filename":2312,"language":776,"meta":777,"style":777},"import { createError, parseError } from 'evlog'\n\nthrow createError({\n  code: 'billing.PAYMENT_DECLINED', \u002F\u002F ← autocomplete from the registered catalog\n  message: 'Card declined',\n  status: 402,\n})\n\nconst err = parseError(caught)\nif (err.code === 'billing.PAYMENT_DECLINED') retry()\n\u002F\u002F                ↑ TypeScript knows the union of all registered codes\n","Anywhere in the app — autocomplete works",[449,2314,2315,2339,2343,2353,2371,2386,2397,2403,2407,2422,2453],{"__ignoreMap":777},[781,2316,2317,2319,2321,2324,2326,2329,2331,2333,2335,2337],{"class":783,"line":784},[781,2318,788],{"class":787},[781,2320,792],{"class":791},[781,2322,2323],{"class":795}," createError",[781,2325,852],{"class":791},[781,2327,2328],{"class":795}," parseError",[781,2330,799],{"class":791},[781,2332,802],{"class":787},[781,2334,805],{"class":791},[781,2336,809],{"class":808},[781,2338,812],{"class":791},[781,2340,2341],{"class":783,"line":815},[781,2342,819],{"emptyLinePlaceholder":818},[781,2344,2345,2347,2349,2351],{"class":783,"line":822},[781,2346,2285],{"class":787},[781,2348,2323],{"class":838},[781,2350,841],{"class":795},[781,2352,1630],{"class":791},[781,2354,2355,2358,2360,2362,2364,2366,2368],{"class":783,"line":858},[781,2356,2357],{"class":861},"  code",[781,2359,865],{"class":791},[781,2361,805],{"class":791},[781,2363,508],{"class":808},[781,2365,844],{"class":791},[781,2367,852],{"class":791},[781,2369,2370],{"class":2105}," \u002F\u002F ← autocomplete from the registered catalog\n",[781,2372,2373,2376,2378,2380,2382,2384],{"class":783,"line":896},[781,2374,2375],{"class":861},"  message",[781,2377,865],{"class":791},[781,2379,805],{"class":791},[781,2381,1471],{"class":808},[781,2383,844],{"class":791},[781,2385,949],{"class":791},[781,2387,2388,2391,2393,2395],{"class":783,"line":928},[781,2389,2390],{"class":861},"  status",[781,2392,865],{"class":791},[781,2394,1460],{"class":875},[781,2396,949],{"class":791},[781,2398,2399,2401],{"class":783,"line":938},[781,2400,1012],{"class":791},[781,2402,1015],{"class":795},[781,2404,2405],{"class":783,"line":952},[781,2406,819],{"emptyLinePlaceholder":818},[781,2408,2409,2412,2415,2417,2419],{"class":783,"line":1003},[781,2410,2411],{"class":828},"const",[781,2413,2414],{"class":795}," err ",[781,2416,835],{"class":791},[781,2418,2328],{"class":838},[781,2420,2421],{"class":795},"(caught)\n",[781,2423,2424,2427,2430,2432,2435,2438,2440,2442,2444,2447,2450],{"class":783,"line":1009},[781,2425,2426],{"class":787},"if",[781,2428,2429],{"class":795}," (err",[781,2431,1595],{"class":791},[781,2433,2434],{"class":795},"code ",[781,2436,2437],{"class":791},"===",[781,2439,805],{"class":791},[781,2441,508],{"class":808},[781,2443,844],{"class":791},[781,2445,2446],{"class":795},") ",[781,2448,2449],{"class":838},"retry",[781,2451,2452],{"class":795},"()\n",[781,2454,2455],{"class":783,"line":1309},[781,2456,2457],{"class":2105},"\u002F\u002F                ↑ TypeScript knows the union of all registered codes\n",[2459,2460,2463,2466,2467,2469,2470,452,2473,2469,2475,2478],"callout",{"color":2461,"icon":2462},"neutral","i-lucide-package",[662,2464,2465],{},"Each shared package owns its prefix."," ",[449,2468,1649],{}," owns ",[449,2471,2472],{},"billing.*",[449,2474,2225],{},[449,2476,2477],{},"auth.*",". Conflicts are impossible by construction. Bumping a catalog to a new minor (adding entries) propagates to consumers via the regular semver upgrade path — no codegen, no migration step.",[628,2480,2482],{"id":2481},"composition-patterns","Composition patterns",[752,2484,2486],{"id":2485},"mix-catalogs-and-standalone-factories","Mix catalogs and standalone factories",[445,2488,2489,494,2491,2493,2494,2496],{},[449,2490,451],{},[449,2492,455],{}," produce identical call-site shapes. Use catalogs for grouped errors, ",[449,2495,451],{}," for one-offs (e.g. cross-cutting concerns like rate-limiting that don't belong to a specific domain).",[771,2498,2500],{"className":773,"code":2499,"filename":1149,"language":776,"meta":777,"style":777},"import { defineError, defineErrorCatalog } from 'evlog'\n\nexport const billingErrors = defineErrorCatalog('billing', {\n  PAYMENT_DECLINED: { status: 402, message: 'Card declined' },\n})\n\nexport const rateLimited = defineError('app.RATE_LIMITED', {\n  status: 429,\n  message: ({ retryAfter }: { retryAfter: number }) =>\n    `Rate limited: retry in ${retryAfter}s`,\n})\n\n\u002F\u002F Both look identical at the call site:\nthrow billingErrors.PAYMENT_DECLINED()\nthrow rateLimited({ retryAfter: 30 })\n",[449,2501,2502,2525,2529,2553,2581,2587,2591,2617,2628,2653,2676,2682,2686,2691,2703],{"__ignoreMap":777},[781,2503,2504,2506,2508,2511,2513,2515,2517,2519,2521,2523],{"class":783,"line":784},[781,2505,788],{"class":787},[781,2507,792],{"class":791},[781,2509,2510],{"class":795}," defineError",[781,2512,852],{"class":791},[781,2514,796],{"class":795},[781,2516,799],{"class":791},[781,2518,802],{"class":787},[781,2520,805],{"class":791},[781,2522,809],{"class":808},[781,2524,812],{"class":791},[781,2526,2527],{"class":783,"line":815},[781,2528,819],{"emptyLinePlaceholder":818},[781,2530,2531,2533,2535,2537,2539,2541,2543,2545,2547,2549,2551],{"class":783,"line":822},[781,2532,825],{"class":787},[781,2534,829],{"class":828},[781,2536,1909],{"class":795},[781,2538,835],{"class":791},[781,2540,796],{"class":838},[781,2542,841],{"class":795},[781,2544,844],{"class":791},[781,2546,1920],{"class":808},[781,2548,844],{"class":791},[781,2550,852],{"class":791},[781,2552,855],{"class":791},[781,2554,2555,2557,2559,2561,2563,2565,2567,2569,2571,2573,2575,2577,2579],{"class":783,"line":858},[781,2556,1931],{"class":861},[781,2558,865],{"class":791},[781,2560,792],{"class":791},[781,2562,870],{"class":861},[781,2564,865],{"class":791},[781,2566,1460],{"class":875},[781,2568,852],{"class":791},[781,2570,881],{"class":861},[781,2572,865],{"class":791},[781,2574,805],{"class":791},[781,2576,1471],{"class":808},[781,2578,844],{"class":791},[781,2580,893],{"class":791},[781,2582,2583,2585],{"class":783,"line":896},[781,2584,1012],{"class":791},[781,2586,1015],{"class":795},[781,2588,2589],{"class":783,"line":928},[781,2590,819],{"emptyLinePlaceholder":818},[781,2592,2593,2595,2597,2600,2602,2604,2606,2608,2611,2613,2615],{"class":783,"line":938},[781,2594,825],{"class":787},[781,2596,829],{"class":828},[781,2598,2599],{"class":795}," rateLimited ",[781,2601,835],{"class":791},[781,2603,2510],{"class":838},[781,2605,841],{"class":795},[781,2607,844],{"class":791},[781,2609,2610],{"class":808},"app.RATE_LIMITED",[781,2612,844],{"class":791},[781,2614,852],{"class":791},[781,2616,855],{"class":791},[781,2618,2619,2621,2623,2626],{"class":783,"line":952},[781,2620,2390],{"class":861},[781,2622,865],{"class":791},[781,2624,2625],{"class":875}," 429",[781,2627,949],{"class":791},[781,2629,2630,2632,2634,2636,2639,2641,2643,2645,2647,2649,2651],{"class":783,"line":1003},[781,2631,2375],{"class":838},[781,2633,865],{"class":791},[781,2635,960],{"class":791},[781,2637,2638],{"class":963}," retryAfter",[781,2640,967],{"class":791},[781,2642,792],{"class":791},[781,2644,2638],{"class":861},[781,2646,865],{"class":791},[781,2648,2056],{"class":976},[781,2650,980],{"class":791},[781,2652,2069],{"class":828},[781,2654,2655,2658,2661,2663,2666,2668,2671,2674],{"class":783,"line":1009},[781,2656,2657],{"class":791},"    `",[781,2659,2660],{"class":808},"Rate limited: retry in ",[781,2662,992],{"class":791},[781,2664,2665],{"class":795},"retryAfter",[781,2667,1012],{"class":791},[781,2669,2670],{"class":808},"s",[781,2672,2673],{"class":791},"`",[781,2675,949],{"class":791},[781,2677,2678,2680],{"class":783,"line":1309},[781,2679,1012],{"class":791},[781,2681,1015],{"class":795},[781,2683,2684],{"class":783,"line":1323},[781,2685,819],{"emptyLinePlaceholder":818},[781,2687,2688],{"class":783,"line":1336},[781,2689,2690],{"class":2105},"\u002F\u002F Both look identical at the call site:\n",[781,2692,2693,2695,2697,2699,2701],{"class":783,"line":1349},[781,2694,2285],{"class":787},[781,2696,1185],{"class":795},[781,2698,1595],{"class":791},[781,2700,675],{"class":838},[781,2702,2452],{"class":795},[781,2704,2705,2707,2710,2712,2714,2716,2718,2721,2723],{"class":783,"line":1355},[781,2706,2285],{"class":787},[781,2708,2709],{"class":838}," rateLimited",[781,2711,841],{"class":795},[781,2713,2296],{"class":791},[781,2715,2638],{"class":861},[781,2717,865],{"class":791},[781,2719,2720],{"class":875}," 30",[781,2722,799],{"class":791},[781,2724,1015],{"class":795},[752,2726,2728],{"id":2727},"re-export-from-one-entry-per-domain","Re-export from one entry per domain",[445,2730,2731],{},"If a feature ships errors and audits together, give it a single re-export module so call sites only import once.",[771,2733,2736],{"className":773,"code":2734,"filename":2735,"language":776,"meta":777,"style":777},"export { billingErrors } from '.\u002Ferrors\u002Fbilling'\nexport { billingAudit } from '.\u002Faudit\u002Fbilling'\n","src\u002Ffeatures\u002Fbilling\u002Findex.ts",[449,2737,2738,2757],{"__ignoreMap":777},[781,2739,2740,2742,2744,2746,2748,2750,2752,2755],{"class":783,"line":784},[781,2741,825],{"class":787},[781,2743,792],{"class":791},[781,2745,1185],{"class":795},[781,2747,799],{"class":791},[781,2749,802],{"class":787},[781,2751,805],{"class":791},[781,2753,2754],{"class":808},".\u002Ferrors\u002Fbilling",[781,2756,812],{"class":791},[781,2758,2759,2761,2763,2766,2768,2770,2772,2775],{"class":783,"line":815},[781,2760,825],{"class":787},[781,2762,792],{"class":791},[781,2764,2765],{"class":795}," billingAudit",[781,2767,799],{"class":791},[781,2769,802],{"class":787},[781,2771,805],{"class":791},[781,2773,2774],{"class":808},".\u002Faudit\u002Fbilling",[781,2776,812],{"class":791},[771,2778,2781],{"className":773,"code":2779,"filename":2780,"language":776,"meta":777,"style":777},"import { billingErrors, billingAudit } from '~\u002Ffeatures\u002Fbilling'\n\nif (!cart.items.length) throw billingErrors.CART_EMPTY()\n\nlog.audit(billingAudit.INVOICE_REFUND({ actor, target: { id: 'inv_889' } }))\n","server\u002Fapi\u002Frefund.post.ts",[449,2782,2783,2806,2810,2844,2848],{"__ignoreMap":777},[781,2784,2785,2787,2789,2791,2793,2795,2797,2799,2801,2804],{"class":783,"line":784},[781,2786,788],{"class":787},[781,2788,792],{"class":791},[781,2790,1185],{"class":795},[781,2792,852],{"class":791},[781,2794,2765],{"class":795},[781,2796,799],{"class":791},[781,2798,802],{"class":787},[781,2800,805],{"class":791},[781,2802,2803],{"class":808},"~\u002Ffeatures\u002Fbilling",[781,2805,812],{"class":791},[781,2807,2808],{"class":783,"line":815},[781,2809,819],{"emptyLinePlaceholder":818},[781,2811,2812,2814,2817,2820,2823,2825,2828,2830,2833,2835,2837,2839,2842],{"class":783,"line":822},[781,2813,2426],{"class":787},[781,2815,2816],{"class":795}," (",[781,2818,2819],{"class":791},"!",[781,2821,2822],{"class":795},"cart",[781,2824,1595],{"class":791},[781,2826,2827],{"class":795},"items",[781,2829,1595],{"class":791},[781,2831,2832],{"class":795},"length) ",[781,2834,2285],{"class":787},[781,2836,1185],{"class":795},[781,2838,1595],{"class":791},[781,2840,2841],{"class":838},"CART_EMPTY",[781,2843,2452],{"class":795},[781,2845,2846],{"class":783,"line":858},[781,2847,819],{"emptyLinePlaceholder":818},[781,2849,2850,2853,2855,2858,2861,2863,2865,2867,2869,2872,2874,2876,2878,2880,2883,2885,2887,2890,2892,2894,2896],{"class":783,"line":896},[781,2851,2852],{"class":795},"log",[781,2854,1595],{"class":791},[781,2856,2857],{"class":838},"audit",[781,2859,2860],{"class":795},"(billingAudit",[781,2862,1595],{"class":791},[781,2864,678],{"class":838},[781,2866,841],{"class":795},[781,2868,2296],{"class":791},[781,2870,2871],{"class":795}," actor",[781,2873,852],{"class":791},[781,2875,1081],{"class":861},[781,2877,865],{"class":791},[781,2879,792],{"class":791},[781,2881,2882],{"class":861}," id",[781,2884,865],{"class":791},[781,2886,805],{"class":791},[781,2888,2889],{"class":808},"inv_889",[781,2891,844],{"class":791},[781,2893,799],{"class":791},[781,2895,799],{"class":791},[781,2897,2898],{"class":795},"))\n",[752,2900,2902],{"id":2901},"override-catalog-defaults-at-the-call-site","Override catalog defaults at the call site",[445,2904,2905,2906,452,2909,452,2912,452,2915,452,2918,452,2921,2923,2924,2926],{},"Every entry's defaults (",[449,2907,2908],{},"message",[449,2910,2911],{},"status",[449,2913,2914],{},"why",[449,2916,2917],{},"fix",[449,2919,2920],{},"link",[449,2922,544],{},") are overridable per call. ",[449,2925,544],{}," is shallow-merged (call-site wins on conflict).",[771,2928,2930],{"className":773,"code":2929,"language":776,"meta":777,"style":777},"\u002F\u002F Catalog default:\n\u002F\u002F message: 'Card declined'\n\u002F\u002F internal: { category: 'gateway' }\n\nthrow billingErrors.PAYMENT_DECLINED({\n  message: 'Custom message for this specific call',\n  internal: { stripeRef: 'ch_x', category: 'gateway-overridden' },\n  cause: stripeErr,\n})\n\n\u002F\u002F Resulting EvlogError:\n\u002F\u002F - message: 'Custom message for this specific call' (override)\n\u002F\u002F - status: 402 (catalog default)\n\u002F\u002F - why: 'Issuer declined the charge' (catalog default)\n\u002F\u002F - internal: { category: 'gateway-overridden', stripeRef: 'ch_x' }\n",[449,2931,2932,2937,2942,2947,2951,2965,2980,3017,3029,3035,3039,3044,3049,3054,3059],{"__ignoreMap":777},[781,2933,2934],{"class":783,"line":784},[781,2935,2936],{"class":2105},"\u002F\u002F Catalog default:\n",[781,2938,2939],{"class":783,"line":815},[781,2940,2941],{"class":2105},"\u002F\u002F message: 'Card declined'\n",[781,2943,2944],{"class":783,"line":822},[781,2945,2946],{"class":2105},"\u002F\u002F internal: { category: 'gateway' }\n",[781,2948,2949],{"class":783,"line":858},[781,2950,819],{"emptyLinePlaceholder":818},[781,2952,2953,2955,2957,2959,2961,2963],{"class":783,"line":896},[781,2954,2285],{"class":787},[781,2956,1185],{"class":795},[781,2958,1595],{"class":791},[781,2960,675],{"class":838},[781,2962,841],{"class":795},[781,2964,1630],{"class":791},[781,2966,2967,2969,2971,2973,2976,2978],{"class":783,"line":928},[781,2968,2375],{"class":861},[781,2970,865],{"class":791},[781,2972,805],{"class":791},[781,2974,2975],{"class":808},"Custom message for this specific call",[781,2977,844],{"class":791},[781,2979,949],{"class":791},[781,2981,2982,2985,2987,2989,2992,2994,2996,2999,3001,3003,3006,3008,3010,3013,3015],{"class":783,"line":938},[781,2983,2984],{"class":861},"  internal",[781,2986,865],{"class":791},[781,2988,792],{"class":791},[781,2990,2991],{"class":861}," stripeRef",[781,2993,865],{"class":791},[781,2995,805],{"class":791},[781,2997,2998],{"class":808},"ch_x",[781,3000,844],{"class":791},[781,3002,852],{"class":791},[781,3004,3005],{"class":861}," category",[781,3007,865],{"class":791},[781,3009,805],{"class":791},[781,3011,3012],{"class":808},"gateway-overridden",[781,3014,844],{"class":791},[781,3016,893],{"class":791},[781,3018,3019,3022,3024,3027],{"class":783,"line":952},[781,3020,3021],{"class":861},"  cause",[781,3023,865],{"class":791},[781,3025,3026],{"class":795}," stripeErr",[781,3028,949],{"class":791},[781,3030,3031,3033],{"class":783,"line":1003},[781,3032,1012],{"class":791},[781,3034,1015],{"class":795},[781,3036,3037],{"class":783,"line":1009},[781,3038,819],{"emptyLinePlaceholder":818},[781,3040,3041],{"class":783,"line":1309},[781,3042,3043],{"class":2105},"\u002F\u002F Resulting EvlogError:\n",[781,3045,3046],{"class":783,"line":1323},[781,3047,3048],{"class":2105},"\u002F\u002F - message: 'Custom message for this specific call' (override)\n",[781,3050,3051],{"class":783,"line":1336},[781,3052,3053],{"class":2105},"\u002F\u002F - status: 402 (catalog default)\n",[781,3055,3056],{"class":783,"line":1349},[781,3057,3058],{"class":2105},"\u002F\u002F - why: 'Issuer declined the charge' (catalog default)\n",[781,3060,3061],{"class":783,"line":1355},[781,3062,3063],{"class":2105},"\u002F\u002F - internal: { category: 'gateway-overridden', stripeRef: 'ch_x' }\n",[628,3065,3067],{"id":3066},"type-augmentation-deep-dive","Type augmentation — deep dive",[445,3069,3070,3071,3073,3074,452,3076,3078,3079,3082,3083,3086],{},"The opt-in ",[449,3072,576],{}," block is what surfaces autocomplete on ",[449,3075,555],{},[449,3077,558],{},", and the typed ",[449,3080,3081],{},"ErrorCode"," \u002F ",[449,3084,3085],{},"AuditAction"," exports.",[752,3088,3090],{"id":3089},"where-to-put-the-augmentation","Where to put the augmentation",[636,3092,3093,3103],{},[639,3094,3095],{},[642,3096,3097,3100],{},[645,3098,3099],{},"Repo shape",[645,3101,3102],{},"Recommended location",[654,3104,3105,3115,3129,3142],{},[642,3106,3107,3112],{},[659,3108,3109,3110,512],{},"Single file (",[449,3111,775],{},[659,3113,3114],{},"At the bottom of the same file",[642,3116,3117,3123],{},[659,3118,3119,3120,512],{},"Folder (",[449,3121,3122],{},"src\u002Ferrors\u002F*.ts",[659,3124,3125,3126,3128],{},"In ",[449,3127,1149],{}," (centralised) or each catalog file (decentralised)",[642,3130,3131,3134],{},[659,3132,3133],{},"npm package",[659,3135,3136,3137,3139,3140],{},"At the bottom of the package's main ",[449,3138,580],{}," so it ships in the published ",[449,3141,584],{},[642,3143,3144,3147],{},[659,3145,3146],{},"Monorepo",[659,3148,3149],{},"One augmentation per package, no central registry needed",[445,3151,3152,3153,3155],{},"Both centralised and decentralised work — TypeScript merges multiple ",[449,3154,576],{}," blocks across files automatically.",[752,3157,3159],{"id":3158},"how-to-add-custom-domains","How to add custom domains",[445,3161,3162],{},"Each augmentation key is the namespace name. Multiple catalogs sharing a prefix can either be merged into one key or split:",[771,3164,3167],{"className":773,"code":3165,"filename":3166,"language":776,"meta":777,"style":777},"declare module 'evlog' {\n  interface RegisteredErrorCatalogs {\n    billing: typeof billingErrors\n  }\n}\n","Centralised — one key per package",[449,3168,3169,3183,3191,3201,3205],{"__ignoreMap":777},[781,3170,3171,3173,3175,3177,3179,3181],{"class":783,"line":784},[781,3172,1285],{"class":828},[781,3174,1288],{"class":828},[781,3176,805],{"class":791},[781,3178,809],{"class":808},[781,3180,844],{"class":791},[781,3182,855],{"class":791},[781,3184,3185,3187,3189],{"class":783,"line":815},[781,3186,1301],{"class":828},[781,3188,1304],{"class":976},[781,3190,855],{"class":791},[781,3192,3193,3195,3197,3199],{"class":783,"line":822},[781,3194,1326],{"class":861},[781,3196,865],{"class":791},[781,3198,1317],{"class":791},[781,3200,1333],{"class":795},[781,3202,3203],{"class":783,"line":858},[781,3204,1352],{"class":791},[781,3206,3207],{"class":783,"line":896},[781,3208,1358],{"class":791},[771,3210,3213],{"className":773,"code":3211,"filename":3212,"language":776,"meta":777,"style":777},"declare module 'evlog' {\n  interface RegisteredErrorCatalogs {\n    'billing.payment': typeof billingPaymentErrors\n    'billing.subscription': typeof billingSubscriptionErrors\n    'billing.invoice': typeof billingInvoiceErrors\n  }\n}\n","Decentralised — one key per sub-domain",[449,3214,3215,3229,3237,3253,3268,3284,3288],{"__ignoreMap":777},[781,3216,3217,3219,3221,3223,3225,3227],{"class":783,"line":784},[781,3218,1285],{"class":828},[781,3220,1288],{"class":828},[781,3222,805],{"class":791},[781,3224,809],{"class":808},[781,3226,844],{"class":791},[781,3228,855],{"class":791},[781,3230,3231,3233,3235],{"class":783,"line":815},[781,3232,1301],{"class":828},[781,3234,1304],{"class":976},[781,3236,855],{"class":791},[781,3238,3239,3242,3244,3246,3248,3250],{"class":783,"line":822},[781,3240,3241],{"class":791},"    '",[781,3243,569],{"class":808},[781,3245,844],{"class":791},[781,3247,865],{"class":791},[781,3249,1317],{"class":791},[781,3251,3252],{"class":795}," billingPaymentErrors\n",[781,3254,3255,3257,3259,3261,3263,3265],{"class":783,"line":858},[781,3256,3241],{"class":791},[781,3258,1381],{"class":808},[781,3260,844],{"class":791},[781,3262,865],{"class":791},[781,3264,1317],{"class":791},[781,3266,3267],{"class":795}," billingSubscriptionErrors\n",[781,3269,3270,3272,3275,3277,3279,3281],{"class":783,"line":896},[781,3271,3241],{"class":791},[781,3273,3274],{"class":808},"billing.invoice",[781,3276,844],{"class":791},[781,3278,865],{"class":791},[781,3280,1317],{"class":791},[781,3282,3283],{"class":795}," billingInvoiceErrors\n",[781,3285,3286],{"class":783,"line":928},[781,3287,1352],{"class":791},[781,3289,3290],{"class":783,"line":938},[781,3291,1358],{"class":791},[445,3293,2165,3294,3297,3298,3300],{},[449,3295,3296],{},"_codes"," literal union is what produces the actual ",[449,3299,3081],{}," type — the keys themselves are arbitrary, choose what feels right for your structure.",[752,3302,3304],{"id":3303},"verifying-the-augmentation","Verifying the augmentation",[771,3306,3309],{"className":773,"code":3307,"filename":3308,"language":776,"meta":777,"style":777},"import type { ErrorCode, AuditAction } from 'evlog'\n\n\u002F\u002F Hover the type in your IDE — should show the union of all registered codes.\ntype AllErrorCodes = ErrorCode\ntype AllAuditActions = AuditAction\n\n\u002F\u002F Compile-time check:\nconst validCode: ErrorCode = 'billing.PAYMENT_DECLINED' \u002F\u002F OK\nconst invalidCode: ErrorCode = 'billing.NOPE' \u002F\u002F ← TS error if catalog is registered\n","Anywhere in the codebase",[449,3310,3311,3337,3341,3346,3359,3371,3375,3380,3402],{"__ignoreMap":777},[781,3312,3313,3315,3317,3319,3322,3324,3327,3329,3331,3333,3335],{"class":783,"line":784},[781,3314,788],{"class":787},[781,3316,1158],{"class":787},[781,3318,792],{"class":791},[781,3320,3321],{"class":795}," ErrorCode",[781,3323,852],{"class":791},[781,3325,3326],{"class":795}," AuditAction",[781,3328,799],{"class":791},[781,3330,802],{"class":787},[781,3332,805],{"class":791},[781,3334,809],{"class":808},[781,3336,812],{"class":791},[781,3338,3339],{"class":783,"line":815},[781,3340,819],{"emptyLinePlaceholder":818},[781,3342,3343],{"class":783,"line":822},[781,3344,3345],{"class":2105},"\u002F\u002F Hover the type in your IDE — should show the union of all registered codes.\n",[781,3347,3348,3350,3353,3356],{"class":783,"line":858},[781,3349,1680],{"class":828},[781,3351,3352],{"class":976}," AllErrorCodes",[781,3354,3355],{"class":791}," =",[781,3357,3358],{"class":976}," ErrorCode\n",[781,3360,3361,3363,3366,3368],{"class":783,"line":896},[781,3362,1680],{"class":828},[781,3364,3365],{"class":976}," AllAuditActions",[781,3367,3355],{"class":791},[781,3369,3370],{"class":976}," AuditAction\n",[781,3372,3373],{"class":783,"line":928},[781,3374,819],{"emptyLinePlaceholder":818},[781,3376,3377],{"class":783,"line":938},[781,3378,3379],{"class":2105},"\u002F\u002F Compile-time check:\n",[781,3381,3382,3384,3387,3389,3391,3393,3395,3397,3399],{"class":783,"line":952},[781,3383,2411],{"class":828},[781,3385,3386],{"class":795}," validCode",[781,3388,865],{"class":791},[781,3390,3321],{"class":976},[781,3392,3355],{"class":791},[781,3394,805],{"class":791},[781,3396,508],{"class":808},[781,3398,844],{"class":791},[781,3400,3401],{"class":2105}," \u002F\u002F OK\n",[781,3403,3404,3406,3409,3411,3413,3415,3417,3420,3422],{"class":783,"line":1003},[781,3405,2411],{"class":828},[781,3407,3408],{"class":795}," invalidCode",[781,3410,865],{"class":791},[781,3412,3321],{"class":976},[781,3414,3355],{"class":791},[781,3416,805],{"class":791},[781,3418,3419],{"class":808},"billing.NOPE",[781,3421,844],{"class":791},[781,3423,3424],{"class":2105}," \u002F\u002F ← TS error if catalog is registered\n",[445,3426,3427,3428,3431],{},"If autocomplete is empty, either no catalog is registered yet, or the augmentation file is not in the TypeScript program (check ",[449,3429,3430],{},"tsconfig.json"," includes).",[628,3433,3435],{"id":3434},"common-pitfalls","Common pitfalls",[3437,3438,3439,3445,3446,3448,3449,1595],"warning",{},[662,3440,3441,3442,3444],{},"Don't put ",[449,3443,603],{}," blocks in test files."," Augmentations from test files leak into the type-checker for the rest of the codebase if the test files are included in the main ",[449,3447,3430],{},". Keep augmentations next to the catalog source, never inside ",[449,3450,3451],{},"*.test.ts",[3437,3453,3454,3457,3458,3461,3462,3464],{},[662,3455,3456],{},"Avoid prefix collisions across packages."," If two packages augment the same ",[449,3459,3460],{},"RegisteredErrorCatalogs"," key (say both ship a ",[449,3463,1920],{}," catalog), TypeScript merges them silently and the runtime keeps the last-registered factory. Convention: one prefix per package, no overlap.",[3437,3466,3467,3473,3474,3477,3478,3480],{},[662,3468,3469,3470,3472],{},"Never override the ",[449,3471,449],{}," at the call site."," The catalog defines the code identity — overriding it would break dashboards, alerts, and consumer code branching on ",[449,3475,3476],{},"err.code",". The factory's call-site signature deliberately omits ",[449,3479,449],{}," from the overridable fields.",[615,3482,3483,3492],{},[445,3484,3485,3491],{},[662,3486,3487,3488,3490],{},"Prefer ",[449,3489,590],{}," over string comparisons in tests."," Both forms below are valid; the first survives renames (refactor-safe), the second doesn't.",[771,3493,3495],{"className":773,"code":3494,"language":776,"meta":777,"style":777},"expect(err.code).toBe(billingErrors.PAYMENT_DECLINED.code) \u002F\u002F ✓ refactor-safe\nexpect(err.code).toBe('billing.PAYMENT_DECLINED')          \u002F\u002F ✗ string literal\n",[449,3496,3497,3530],{"__ignoreMap":777},[781,3498,3499,3502,3505,3507,3510,3512,3515,3518,3520,3522,3524,3527],{"class":783,"line":784},[781,3500,3501],{"class":838},"expect",[781,3503,3504],{"class":795},"(err",[781,3506,1595],{"class":791},[781,3508,3509],{"class":795},"code)",[781,3511,1595],{"class":791},[781,3513,3514],{"class":838},"toBe",[781,3516,3517],{"class":795},"(billingErrors",[781,3519,1595],{"class":791},[781,3521,675],{"class":795},[781,3523,1595],{"class":791},[781,3525,3526],{"class":795},"code) ",[781,3528,3529],{"class":2105},"\u002F\u002F ✓ refactor-safe\n",[781,3531,3532,3534,3536,3538,3540,3542,3544,3546,3548,3550,3552,3555],{"class":783,"line":815},[781,3533,3501],{"class":838},[781,3535,3504],{"class":795},[781,3537,1595],{"class":791},[781,3539,3509],{"class":795},[781,3541,1595],{"class":791},[781,3543,3514],{"class":838},[781,3545,841],{"class":795},[781,3547,844],{"class":791},[781,3549,508],{"class":808},[781,3551,844],{"class":791},[781,3553,3554],{"class":795},")          ",[781,3556,3557],{"class":2105},"\u002F\u002F ✗ string literal\n",[628,3559,3561],{"id":3560},"api-reference","API reference",[636,3563,3564,3577],{},[639,3565,3566],{},[642,3567,3568,3571,3574],{},[645,3569,3570],{},"Symbol",[645,3572,3573],{},"Kind",[645,3575,3576],{},"Purpose",[654,3578,3579,3591,3602,3613,3624,3636,3648,3659],{},[642,3580,3581,3585,3588],{},[659,3582,3583],{},[449,3584,493],{},[659,3586,3587],{},"factory",[659,3589,3590],{},"Standalone single-error factory. No prefix derivation.",[642,3592,3593,3597,3599],{},[659,3594,3595],{},[449,3596,483],{},[659,3598,3587],{},[659,3600,3601],{},"Bundle of typed errors sharing a prefix.",[642,3603,3604,3608,3610],{},[659,3605,3606],{},[449,3607,497],{},[659,3609,3587],{},[659,3611,3612],{},"Standalone single-action audit factory.",[642,3614,3615,3619,3621],{},[659,3616,3617],{},[449,3618,487],{},[659,3620,3587],{},[659,3622,3623],{},"Bundle of typed audit actions sharing a prefix.",[642,3625,3626,3630,3633],{},[659,3627,3628],{},[449,3629,3460],{},[659,3631,3632],{},"interface",[659,3634,3635],{},"Augmentable registry of error catalogs.",[642,3637,3638,3643,3645],{},[659,3639,3640],{},[449,3641,3642],{},"RegisteredAuditCatalogs",[659,3644,3632],{},[659,3646,3647],{},"Augmentable registry of audit catalogs.",[642,3649,3650,3654,3656],{},[659,3651,3652],{},[449,3653,3081],{},[659,3655,1680],{},[659,3657,3658],{},"Union of all registered error codes.",[642,3660,3661,3665,3667],{},[659,3662,3663],{},[449,3664,3085],{},[659,3666,1680],{},[659,3668,3669],{},"Union of all registered audit actions.",[445,3671,3672,3673,3675],{},"Everything ships from the main ",[449,3674,809],{}," entrypoint.",[628,3677,3679],{"id":3678},"next-steps","Next Steps",[475,3681,3682,3695,3708],{},[478,3683,3684,3686,3687,3690,3691,3694],{},[609,3685,51],{"href":52},": The full ",[449,3688,3689],{},"createError"," API and ",[449,3692,3693],{},"parseError"," reference.",[478,3696,3697,3700,3701,452,3704,3707],{},[609,3698,3699],{"href":332},"Audit → Recording",": All audit-emission APIs (",[449,3702,3703],{},"log.audit",[449,3705,3706],{},"withAudit",", etc.).",[478,3709,3710,3712],{},[609,3711,158],{"href":163},": Auto-managed per-request loggers and HTTP error serialization.",[3714,3715,3716],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":777,"searchDepth":815,"depth":815,"links":3718},[3719,3720,3726,3731,3736,3741,3742,3743],{"id":630,"depth":815,"text":631},{"id":746,"depth":815,"text":747,"children":3721},[3722,3723,3724,3725],{"id":754,"depth":822,"text":755},{"id":1122,"depth":822,"text":1123},{"id":1372,"depth":822,"text":1373},{"id":1584,"depth":822,"text":1585},{"id":1604,"depth":815,"text":1605,"children":3727},[3728,3729,3730],{"id":1614,"depth":822,"text":1617},{"id":1871,"depth":822,"text":1872},{"id":2178,"depth":822,"text":2179},{"id":2481,"depth":815,"text":2482,"children":3732},[3733,3734,3735],{"id":2485,"depth":822,"text":2486},{"id":2727,"depth":822,"text":2728},{"id":2901,"depth":822,"text":2902},{"id":3066,"depth":815,"text":3067,"children":3737},[3738,3739,3740],{"id":3089,"depth":822,"text":3090},{"id":3158,"depth":822,"text":3159},{"id":3303,"depth":822,"text":3304},{"id":3434,"depth":815,"text":3435},{"id":3560,"depth":815,"text":3561},{"id":3678,"depth":815,"text":3679},"Scale typed error and audit catalogs from a single file to multi-package monorepos. Conventions, npm packaging recipe, composition patterns, and the type-augmentation deep dive.","md",[3747,3749],{"label":51,"icon":54,"to":52,"color":2461,"variant":3748},"subtle",{"label":317,"icon":318,"to":323,"color":2461,"variant":3748},{},{"icon":79},{"title":76,"description":3744},"rxgEH5JJlZL4JdqQ3ye4sgoiNST32cNX_8E6aKoBQUo",[3755,3757],{"title":71,"path":72,"stem":73,"description":3756,"icon":74,"children":-1},"Add compile-time type safety to your wide events with TypeScript module augmentation. Prevent typos and ensure consistent field names across your codebase.",{"title":36,"path":86,"stem":87,"description":3758,"icon":88,"children":-1},"Wire evlog into your stack — pick a framework integration to capture requests automatically, then pick adapters to ship events to Axiom, Sentry, PostHog, OTLP, and more. Frameworks decide where the logger lives; adapters decide where events go.",1779694501670]