mirror of
https://github.com/aphrody-labs/oxc.git
synced 2026-10-15 06:39:17 +00:00
docs(ast): correct JSXText example (#26970)
This commit is contained in:
1 parent
3471f2944c
commit
278288e1e9
1 file changed
+6
-2
@@ -520,8 +520,12 @@ pub struct JSXSpreadChild<'a> {
|
||||
/// ## Example
|
||||
///
|
||||
/// ```tsx
|
||||
/// <Foo>Some text</Foo> // `Some Text` is a JSXText,
|
||||
/// <Foo>"Some string"</Foo> // but `"Some string"` is a StringLiteral.
|
||||
/// // Both children are JSXText, including the quotation marks:
|
||||
/// const plain = <Foo>Some text</Foo>;
|
||||
/// const quoted = <Foo>"Some string"</Foo>;
|
||||
///
|
||||
/// // The expression container contains a StringLiteral:
|
||||
/// const expression = <Foo>{"Some string"}</Foo>;
|
||||
/// ```
|
||||
#[ast(visit)]
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in new issue
Block a user