diff --git a/README.md b/README.md index 8c0827ee..9ecc3f0a 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,13 @@ struct User { last_name: String, } ``` -When running `cargo test` or `cargo test export_bindings`, the TypeScript bindings will be exported to the file `bindings/User.ts`. + +When running `cargo test` or `cargo test export_bindings`, the TypeScript bindings will be exported to the file `bindings/User.ts` +and will contain the following code: + +```ts +export type User = { user_id: number, first_name: string, last_name: string, }; +``` ### Features - generate type declarations from rust structs diff --git a/ts-rs/src/lib.rs b/ts-rs/src/lib.rs index 9a720644..3d0ad6cd 100644 --- a/ts-rs/src/lib.rs +++ b/ts-rs/src/lib.rs @@ -54,7 +54,13 @@ //! last_name: String, //! } //! ``` -//! When running `cargo test` or `cargo test export_bindings`, the TypeScript bindings will be exported to the file `bindings/User.ts`. +//! +//! When running `cargo test` or `cargo test export_bindings`, the TypeScript bindings will be exported to the file `bindings/User.ts` +//! and will contain the following code: +//! +//! ```ts +//! export type User = { user_id: number, first_name: string, last_name: string, }; +//! ``` //! //! ## Features //! - generate type declarations from rust structs