docs: make technical prose concrete

This commit is contained in:
Turtle
2026-08-09 15:27:21 +08:00
parent 673e7cddc5
commit a27efdef36
459 changed files with 1342 additions and 1329 deletions
+3 -3
View File
@@ -18,8 +18,8 @@
* current entries. Package verdicts and imported manifests are cached per
* package name and never expire — plugin-set changes take effect on restart.
*
* Manual `ctx.typert.register()` remains the escape hatch for contributions
* that do not ride a `./typert` artifact (hand-written contract schemas,
* Manual `ctx.typert.register()` remains available for contributions
* that do not use a `./typert` artifact (hand-written wire schemas,
* tests, non-loader compositions).
*
* @module @deepseek-ai/dsh-typert-loader
@@ -68,7 +68,7 @@ function typertExportOf(pkgName: string, exportsField: unknown): string | undefi
const fallback = (target as Record<string, unknown>).default
if (typeof fallback === 'string') return fallback
}
throw new Error(`typert-loader: ${pkgName} exports["${TYPERT_HOST_EXPORT}"] has an unsupported shape`)
throw new Error(`typert-loader: ${pkgName} exports["${TYPERT_HOST_EXPORT}"] must be a string or an object with a string default`)
}
/**
+1 -1
View File
@@ -356,7 +356,7 @@ describe('typert loader', () => {
await ctx.loader.create({ name: '@fixture/export-primitive' })
await ctx.loader.await()
await expect(mountTypertLoader(ctx)).rejects.toThrow('unsupported shape')
await expect(mountTypertLoader(ctx)).rejects.toThrow('must be a string or an object with a string default')
})
it('caches a negative verdict for loader entries without a package root', LOADER_TEST_TIMEOUT, async () => {