Skip to main content

Module ts_types

Module ts_types 

Source
Expand description

TypeScript type rendering: ts_type_ref*, ts_ty, and the TsType builders.

Functions§

ts_type_of
The TypeScript type of a Bynk type reference, as a node (1A.39a, Decision G). A caller that needs text prints it itself: the driver’s test harness does, at its own boundary.
ts_type_ref_qualified_multi_ts_type
TsType-returning sibling of ts_type_ref, like ts_type_ref_qualified but with each in-scope name carrying its own namespace via type_ns rather than one shared ns — needed when a signature mixes names owned by the target unit with names reached only through a usesd commons (e.g. a stub class implementing an adapter-sourced capability whose return type lives in a commons the capability’s own unit uses, never in the target context itself — Locale capability track, slice 1, #844). Qualifying such a name under the target’s own namespace would reference an export emit_context_rebrands never emits (it only rebrands names the target’s own lowered body references), so each name is qualified under the namespace that actually exports it. Used by emit_stub_class (project/tests_emit.rs) for its own method params/return-type.
ts_type_ref_qualified_ts_type
TsType-returning sibling of ts_type_ref, qualifying named types that live in scope with the namespace ns (Order → Ns.Order). Used by observation_call_record_types (project/tests_emit.rs) for mock method signatures that sit outside the destructuring that brings a namespace’s value-side names into local scope, so the types must be referenced fully qualified. Qualification recurses through generic arguments; base/unit types are unaffected.