Adapter: Fitting a Wasp into a Bee-Shaped Hole
Placeholder prose. A wasp is not a bee, but if it can carry pollen the hive can work with it, given a translator at the door. The opening section sets up the analogy and states the pattern in one sentence.
Second paragraph of placeholder body copy. It names the mess the pattern contains and where that mess ends up without it.
Foreign shapes leaking inward
Placeholder lead-in to the code sample below.
hive/intake.ts
// third-party shape, used raw, in forty places
type WaspPayload = { wsp_id: string; load_mg: number };
function record(p: WaspPayload) {
store.save({ id: p.wsp_id, grams: p.load_mg / 1000 });
}Every foreign type you let past the boundary is a translation you will do again later.
One translator at the door
Closing placeholder paragraph. It restates the pattern, concedes where direct use is fine, and hands off to the next article.