mirror of
https://github.com/aphrody-labs/oxc.git
synced 2026-10-14 22:29:17 +00:00
docs(ast): correct JSXExpressionContainer example (#26975)
This commit is contained in:
1 parent
8cb05e3ecc
commit
cd80e3f10d
1 file changed
+7
-5
@@ -272,11 +272,13 @@ pub enum JSXMemberExpressionObject<'a> {
|
||||
/// ## Example
|
||||
///
|
||||
/// ```tsx
|
||||
/// // boolean-like and string-like expressions are not wrapped in containers.
|
||||
/// // Here, only `container` is a JSXExpressionContainer.
|
||||
/// <Foo bar baz="bang" container={4}/>
|
||||
/// {4} // <- wrapped in container
|
||||
/// </Foo>
|
||||
/// // `bar` has no value; `baz` has a StringLiteral value.
|
||||
/// // Both `{4}` parts are JSXExpressionContainer nodes.
|
||||
/// const element = (
|
||||
/// <Foo bar baz="bang" container={4}>
|
||||
/// {4}
|
||||
/// </Foo>
|
||||
/// );
|
||||
/// ```
|
||||
#[ast(visit)]
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in new issue
Block a user