Skip to main content

inline

Function inline 

Source
pub fn inline(
    exporter: &dyn AsRef<Exporter>,
    types: &Types,
    dt: &DataType,
) -> Result<String, Error>
Expand description

Generate an anonymous Typescript string for a specific DataType.

This method leaves all the same things as the export method up to the user.

Note that calling this method with a tagged struct or enum may cause the tag to not be exported. The type should be wrapped in a NamedDataType to provide a proper name.

You are responsible for apply Serde or other format mapping to the top-level datatype in the same way as the Types graph before calling this helper.