@babel/types APIs
- ObjectExpression
- Expression
- Identifier
- CallExpression
- Node
- ImportDeclaration
- ArrayExpression
- VariableDeclarator
- JSXElement
- File
- JSXAttribute
- ImportSpecifier
- Statement
- ObjectProperty
- JSXExpressionContainer
- JSXMemberExpression
- BlockStatement
- JSXIdentifier
- ObjectPattern
- isIdentifier
- identifier
- stringLiteral
- booleanLiteral
- isObjectProperty
- isMemberExpression
- StringLiteral
- ArrowFunctionExpression
- VariableDeclaration
- ImportDefaultSpecifier
- FunctionExpression
- jsxAttribute
- jsxIdentifier
- JSXFragment
- JSXSpreadChild
- JSXText
- expressionStatement
- Program
- BooleanLiteral
- JSXOpeningElement
- MemberExpression
- FunctionDeclaration
- PatternLike
- RestElement
- LVal
- SourceLocation
- SpreadElement
- file
- Comment
- isCallExpression
- isVariableDeclarator
- isLogicalExpression
- isReturnStatement
- conditionalExpression
- isAssignmentExpression
- isNumericLiteral
- arrayPattern
- jsxElement
- isStringLiteral
- isBooleanLiteral
- jsxExpressionContainer
- isExpression
- jsxOpeningElement
- jsxMemberExpression
- isObjectExpression
- jsxClosingElement
- jsxText
- isArrayPattern
- isExpressionStatement
- isFunctionExpression
- ExpressionStatement
- ImportNamespaceSpecifier
- ReturnStatement
- JSXNamespacedName
- JSX
- LogicalExpression
- AssignmentPattern
- objectProperty
- objectExpression
- arrayExpression
- objectPattern
- nullLiteral
- numericLiteral
- isAssignmentPattern
- isRestElement
- importDeclaration
- importSpecifier
- isTemplateLiteral
- callExpression
- isImportSpecifier
- isArrowFunctionExpression
- isTSTypeReference
- isTypeAnnotation
- isObjectPattern
- BinaryExpression
- UnaryExpression
- ArrayPattern
- CatchClause
- DoWhileStatement
- ForInStatement
- ForOfStatement
- ForStatement
- NewExpression
- SwitchCase
- TemplateLiteral
- WhileStatement
- program
- isJSXIdentifier
- isJSXMemberExpression
- ClassDeclaration
- DebuggerStatement
- Declaration
- ExportDefaultDeclaration
- ExportNamedDeclaration
- ExportSpecifier
- NumericLiteral
- ObjectMethod
- Pattern
- TSDeclareFunction
- ExportDeclaration
- AssignmentExpression
- JSXEmptyExpression
- JSXSpreadAttribute
- isTSModuleDeclaration
- CommentBlock
- CommentLine
- InterpreterDirective
- addComments
- removeComments
Other Related APIs
- path#relative
- lodash#cloneDeep
- @babel/core#PluginPass
- @babel/types#Expression
- @babel/types#Node
- @babel/types#JSXElement
- @babel/types#ImportDeclaration
- @babel/types#JSXAttribute
- @babel/types#JSXOpeningElement
- @babel/types#JSXExpressionContainer
- @babel/types#JSXMemberExpression
- @babel/types#Comment
- @babel/types#JSXIdentifier
- @babel/types#JSXFragment
- @babel/types#JSXSpreadChild
- @babel/types#JSXText
- @babel/types#ReturnStatement
- @babel/types#AssignmentExpression
- @babel/types#JSXEmptyExpression
- @babel/types#JSXSpreadAttribute
- @babel/traverse#Node
@babel/types#JSXNamespacedName TypeScript Examples
The following examples show how to use
@babel/types#JSXNamespacedName.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts From plasmic with MIT License | 6 votes |
serializeNamedAttribute = (
attrName: JSXIdentifier | JSXNamespacedName,
rawValue: PlasmicASTNode | null | undefined,
codeVersions: CodeVersions
) => {
const attrValue = rawValue
? serializePlasmicASTNode(rawValue, codeVersions)
: undefined;
return babel.types.jsxAttribute(attrName, wrapAsJsxAttrValue(attrValue));
}
Example #2
Source File: visitor.ts From react-dev-inspector with MIT License | 6 votes |
doJSXPathName: NodeHandler<JSXOpeningElement['name']> = (name) => {
const visitors: { [key in ElementTypes]: NodeHandler } = {
JSXIdentifier: doJSXIdentifierName,
JSXMemberExpression: doJSXMemberExpressionName,
JSXNamespacedName: doJSXNamespacedNameName,
}
return visitors[name.type](name)
}
Example #3
Source File: visitor.ts From react-dev-inspector with MIT License | 5 votes |
doJSXNamespacedNameName: NodeHandler<JSXNamespacedName> = (name) => {
return doJSXIdentifierName(name.name)
}