♻️ Drop assert imports from doc fences

`assert` is the sole injected exception: the generated test always binds
it, so a fence must not import it. Revert the README imports and the
generator's node:assert merging; the fences keep the assigned variables
and `assert.equal` calls, and the generator again rejects a fence that
imports node:assert.
This commit is contained in:
tmu committed 2026-09-24 12:17:24 +00:00
1 parent d0dd8641f2
commit a9b588e1c3
3 files changed
+11 -22

No files matched your search

-3
View File
@@ -47,7 +47,6 @@ builder. Calling the builder with a handler map keyed by `T`'s members returns a
matcher: a function from `T` to the common return type.
```ts
import { strict as assert } from "node:assert";
import { getPrimitiveUnionMatcher } from "tiny-pattern-ts";
const matchAnswer = getPrimitiveUnionMatcher<"yes" | "no">();
@@ -65,7 +64,6 @@ Add a fallback as the second argument to leave members unhandled; the fallback
receives the remainder:
```ts
import { strict as assert } from "node:assert";
import { getPrimitiveUnionMatcher } from "tiny-pattern-ts";
const matchLabel = getPrimitiveUnionMatcher<"yes" | "no" | "maybe">();
@@ -92,7 +90,6 @@ function takes the discriminant property's name and returns the handler-map
builder, keyed by that property's tags.
```ts
import { strict as assert } from "node:assert";
import { getTaggedUnionMatcher } from "tiny-pattern-ts";
type Shape =