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