Skip to main content

print_type

Function print_type 

Source
pub fn print_type(ty: &TsType) -> String
Expand description

Print a single TsType on its own — the real callers this closes R7.2 for (bynk-emit’s ts_type_ref*/ts_ty families, P7.9, #1315) each want one type fragment to interpolate into a larger, still-hand-built line (a field’s own type annotation, a parameter list, …), not a whole TsProgram. No source-map/buffer machinery — print() owns that for a whole document; this is the printer’s other, narrower entry point, sharing the same internal recursion rather than a second copy.