From 28c87fc28fc7dfd8b79eae451b876ac4a9e06cb9 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Thu, 3 Jul 2025 11:07:22 +0100 Subject: [PATCH] docs(ast): improve docs for TS types --- crates/oxc_ast/src/ast/ts.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/oxc_ast/src/ast/ts.rs b/crates/oxc_ast/src/ast/ts.rs index 7b883d2e5499b..cc212d8cc2416 100644 --- a/crates/oxc_ast/src/ast/ts.rs +++ b/crates/oxc_ast/src/ast/ts.rs @@ -751,9 +751,12 @@ pub struct TSBigIntKeyword { /// /// ## Example /// ```ts -/// type C = A; -/// type D = B.a; -/// type E = D.c.b.a; +/// type A = X; +/// // ^ +/// type B = Y.a; +/// // ^^^ +/// type C = Z.b; +/// // ^^^^^^ /// ``` #[ast(visit)] #[derive(Debug)] @@ -764,9 +767,9 @@ pub struct TSTypeReference<'a> { pub type_arguments: Option>>, } -/// TypeName: +/// TSTypeName: /// IdentifierReference -/// NamespaceName . IdentifierReference +/// TSTypeName . IdentifierName #[ast(visit)] #[derive(Debug)] #[generate_derive(CloneIn, Dummy, TakeIn, GetSpan, GetSpanMut, GetAddress, ContentEq, ESTree)] @@ -792,6 +795,7 @@ pub use match_ts_type_name; /// ## Example /// ```ts /// type Foo = A.B.C; +/// // ^^^^^ /// ``` #[ast(visit)] #[derive(Debug)]