Skip to main content

Crate type_export

Crate type_export 

Source
Expand description

Shared export infrastructure for type declaration generators.

Provides the core traits and utilities that both flowjs-rs and ts-rs (and any future type-declaration-from-Rust project) need:

  • TypeVisitor trait for dependency graph walking
  • Dependency struct for import generation
  • ExportConfig for configuring output paths and extensions
  • ExportError for error handling
  • File export with thread-safe locking and idempotent writes
  • Relative import path calculation

Structs§

Dependency
A type dependency for import generation.
ExportConfig
Configuration for type export.

Enums§

ExportError
Export error.

Traits§

ExportableType
Core trait that all exportable types implement.
TypeVisitor
A visitor used to iterate over all dependencies or generics of a type.

Functions§

diff_paths
Compute a relative path from base to target.
export_recursive
Recursively export a type and all its dependencies.
file_lock
Per-file mutex for thread-safe exports.
normalize_separators
Normalize Windows backslashes to forward slashes for JS import paths.
relative_import_path
Compute a relative import path from one file to another.
write_with_lock
Write content to a file, with idempotent marker checking.