Skip to main content

Module ts_export

Module ts_export 

Source
Expand description

TypeScript type generation using ts-rs

This module collects all API types with #[derive(TS)] and generates TypeScript declarations that are combined with the proc macro output. The generated TypeScript is validated and formatted using oxc.

Types are automatically collected based on JSEDITORAPI_REFERENCED_TYPES from the proc macro, so when you add a new type to method signatures, it will automatically be included if it has #[derive(TS)].

Functionsยง

collect_ts_types
Collect TypeScript type declarations based on referenced types from proc macro
format_typescript
Format TypeScript source code using oxc codegen
validate_typescript
Validate TypeScript syntax using oxc parser
write_fresh_dts
Generate and write the complete fresh.d.ts file