docs(ast): move type annotation span comment to span field (#26522)

This commit is contained in:
camc314
2026-09-10 10:01:29 +00:00
parent 586f27a166
commit 38533ace80
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -187,8 +187,8 @@ pub enum TSEnumMemberName<'a> {
#[generate_derive(CloneIn, Dummy, ReplaceWith, TakeIn)]
#[generate_derive(ContentEq, ESTree, GetNodeId, GetSpan, GetSpanMut, UnstableAddress)]
pub struct TSTypeAnnotation<'a> {
/// starts at the `:` token and ends at the end of the type annotation
pub node_id: Cell<NodeId>,
/// Starts at the `:` token and ends at the end of the type annotation.
pub span: Span,
/// The actual type in the annotation
pub type_annotation: TSType<'a>,
+2 -2
View File
@@ -21081,7 +21081,7 @@ impl<'a> TSTypeAnnotation<'a> {
/// use [`TSTypeAnnotation::boxed`] instead.
///
/// ## Parameters
/// * `span`: The [`Span`] covering this node
/// * `span`: Starts at the `:` token and ends at the end of the type annotation.
/// * `type_annotation`: The actual type in the annotation
#[inline]
pub fn new(span: Span, type_annotation: TSType<'a>, builder: &impl GetAstBuilder<'a>) -> Self {
@@ -21095,7 +21095,7 @@ impl<'a> TSTypeAnnotation<'a> {
/// If you want a stack-allocated node, use [`TSTypeAnnotation::new`] instead.
///
/// ## Parameters
/// * `span`: The [`Span`] covering this node
/// * `span`: Starts at the `:` token and ends at the end of the type annotation.
/// * `type_annotation`: The actual type in the annotation
#[inline]
pub fn boxed(