pub fn render_packages_d_ts(
packages: &[&PackageDeclaration],
context: &[&PackageDeclaration],
) -> StringExpand description
Render editor-facing TypeScript declarations for packages, one
declare module block each, in the order given.
A declaration names the types it borrows from another module without
saying where they come from, so each block imports them. A borrowed type is
matched to its module by the reference’s mangled name, not by its text:
many modules export a Page or an Item. context holds further modules
those types may come from that get no block here, such as the project’s
own packages.