Skip to main content

luaur_analysis/functions/
dump_to_string.rs

1//! Node: `cxx:Function:Luau.Analysis:Analysis/src/ToString.cpp:1840:dump`
2//! Source: `Analysis/src/ToString.cpp:1840-1845` (hand-ported)
3
4use crate::functions::dump_options::dump_options;
5use crate::type_aliases::type_id::TypeId;
6use alloc::string::String;
7
8/// C++ `std::string dump(TypeId ty)`.
9pub fn dump_type_id(ty: TypeId) -> String {
10    let s = crate::functions::to_string_to_string_alt_m::to_string_type_id_to_string_options(
11        ty,
12        dump_options(),
13    );
14    std::println!("{}", s);
15    s
16}