mirror of
https://github.com/aphrody-labs/oxc.git
synced 2026-10-14 22:29:17 +00:00
docs(ast): Add docs for TSNamespaceExportDeclaration (#26909)
Relatively simple change adding an example of the syntax for this node.
This commit is contained in:
1 parent
de41927a4e
commit
4a76723a15
2 files changed
+12
-6
No files matched your search
@@ -1800,9 +1800,14 @@ pub struct TSExportAssignment<'a> {
|
||||
pub expression: Expression<'a>,
|
||||
}
|
||||
|
||||
/// Namespace Export Declaration in declaration files
|
||||
/// Namespace export declaration in declaration files (.d.ts).
|
||||
///
|
||||
/// `export as namespace foo`
|
||||
/// ## Example
|
||||
///
|
||||
/// ```ts
|
||||
/// export as namespace foo;
|
||||
/// // ^^^ id
|
||||
/// ```
|
||||
#[ast(visit)]
|
||||
#[derive(Debug)]
|
||||
#[generate_derive(CloneIn, Dummy, ReplaceWith, TakeIn)]
|
||||
@@ -1810,6 +1815,7 @@ pub struct TSExportAssignment<'a> {
|
||||
pub struct TSNamespaceExportDeclaration<'a> {
|
||||
pub node_id: Cell<NodeId>,
|
||||
pub span: Span,
|
||||
/// Name of the exported namespace.
|
||||
pub id: IdentifierName<'a>,
|
||||
}
|
||||
|
||||
|
||||
@@ -9193,7 +9193,7 @@ impl<'a> Statement<'a> {
|
||||
///
|
||||
/// ## Parameters
|
||||
/// * `span`: The [`Span`] covering this node
|
||||
/// * `id`
|
||||
/// * `id`: Name of the exported namespace.
|
||||
#[inline]
|
||||
pub fn new_ts_namespace_export_declaration(
|
||||
span: Span,
|
||||
@@ -15805,7 +15805,7 @@ impl<'a> ModuleDeclaration<'a> {
|
||||
///
|
||||
/// ## Parameters
|
||||
/// * `span`: The [`Span`] covering this node
|
||||
/// * `id`
|
||||
/// * `id`: Name of the exported namespace.
|
||||
#[inline]
|
||||
pub fn new_ts_namespace_export_declaration(
|
||||
span: Span,
|
||||
@@ -27125,7 +27125,7 @@ impl<'a> TSNamespaceExportDeclaration<'a> {
|
||||
///
|
||||
/// ## Parameters
|
||||
/// * `span`: The [`Span`] covering this node
|
||||
/// * `id`
|
||||
/// * `id`: Name of the exported namespace.
|
||||
#[inline]
|
||||
pub fn new(span: Span, id: IdentifierName<'a>, builder: &impl GetAstBuilder<'a>) -> Self {
|
||||
let builder = builder.builder();
|
||||
@@ -27139,7 +27139,7 @@ impl<'a> TSNamespaceExportDeclaration<'a> {
|
||||
///
|
||||
/// ## Parameters
|
||||
/// * `span`: The [`Span`] covering this node
|
||||
/// * `id`
|
||||
/// * `id`: Name of the exported namespace.
|
||||
#[inline]
|
||||
pub fn boxed(
|
||||
span: Span,
|
||||
|
||||
Reference in new issue
Block a user