From f8256bba8bf13fa0e3811f0b26282b38ead9c057 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 7 Mar 2024 08:41:30 -0300 Subject: [PATCH] Document change to export_to made in #250 --- ts-rs/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts-rs/src/lib.rs b/ts-rs/src/lib.rs index 4b44defa3..b087b5306 100644 --- a/ts-rs/src/lib.rs +++ b/ts-rs/src/lib.rs @@ -184,7 +184,9 @@ pub mod typelist; /// /// - **`#[ts(export_to = "..")]`** /// Specifies where the type should be exported to. Defaults to `bindings/.ts`. -/// The `export_to` attribute will also override the `TS_RS_EXPORT_DIR` environment variable. +/// The path given to the `export_to` attribute is relative to the `TS_RS_EXPORT_DIR` environment variable, +/// or, if `TS_RS_EXPORT_DIR` is not set, to you project's root directory - more specifically, +/// it'll be relative to the `Cargo.toml` file. /// If the provided path ends in a trailing `/`, it is interpreted as a directory. /// Note that you need to add the `export` attribute as well, in order to generate a test which exports the type. ///