pub fn export<'a>(
exporter: &dyn AsRef<Exporter>,
types: &TypeCollection,
ndts: impl Iterator<Item = &'a NamedDataType>,
indent: &str,
) -> Result<String, Error>Expand description
Generate a group of export Type = ... Typescript string for a specific NamedDataType.
This method leaves the following up to the implementer:
- Ensuring all referenced types are exported
- Handling multiple type with overlapping names
- Transforming the type for your serialization format (Eg. Serde)
We recommend passing in your types in bulk instead of doing individual calls as it leaves formatting to us and also allows us to merge the JSDoc types into a single large comment.