Skip to content

Instantly share code, notes, and snippets.

@erukiti
Last active November 8, 2017 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erukiti/45c9b532d4c934e74b6c4f3ae5208003 to your computer and use it in GitHub Desktop.
Save erukiti/45c9b532d4c934e74b6c4f3ae5208003 to your computer and use it in GitHub Desktop.
babel-types のcore定義を表にしたもの
where Node property alias
core.js ArrayExpression elements (null, Expression, SpreadElement) Expression
core.js AssignmentExpression operator (string), left (LVal), right (Expression) Expression
core.js BinaryExpression operator (BINARY_OPERATORS), left (Expression), right (Expression) Binary, Expression
core.js Directive value (DirectiveLiteral)
core.js DirectiveLiteral value (string)
core.js BlockStatement body (Statement), directives (Directive) Scopable, BlockParent, Block, Statement
core.js BreakStatement label (Identifier) Statement, Terminatorless, CompletionStatement
core.js CallExpression callee (Expression), arguments (Expression, SpreadElement, JSXNamespacedName), typeParameters (TypeParameterInstantiation), optional (true, false) Expression
core.js CatchClause param (Identifier), body (BlockStatement) Scopable, BlockParent
core.js ConditionalExpression test (Expression), consequent (Expression), alternate (Expression) Expression, Conditional
core.js ContinueStatement label (Identifier) Statement, Terminatorless, CompletionStatement
core.js DebuggerStatement - Statement
core.js DoWhileStatement test (Expression), body (Statement) Statement, BlockParent, Loop, While, Scopable
core.js EmptyStatement - Statement
core.js ExpressionStatement expression (Expression) Statement, ExpressionWrapper
core.js File program (Program), comments, tokens
core.js ForInStatement left (VariableDeclaration, LVal), right (Expression), body (Statement) Scopable, Statement, For, BlockParent, Loop, ForXStatement
core.js ForStatement init (VariableDeclaration, Expression), test (Expression), update (Expression), body (Statement) Scopable, Statement, For, BlockParent, Loop
core.js FunctionDeclaration id (Identifier), params (LVal), body (BlockStatement), generator (boolean), async (boolean), returnType (TypeAnnotation, TSTypeAnnotation, Noop), typeParameters (TypeParameterDeclaration, Noop), declare (boolean) Scopable, Function, BlockParent, FunctionParent, Statement, Pureish, Declaration
core.js FunctionExpression params (LVal), generator (boolean), async (boolean), returnType (TypeAnnotation, TSTypeAnnotation, Noop), typeParameters (TypeParameterDeclaration, Noop), id (Identifier), body (BlockStatement) Scopable, Function, BlockParent, FunctionParent, Expression, Pureish
core.js Identifier -
core.js IfStatement test (Expression), consequent (Statement), alternate (Statement) Statement, Conditional
core.js LabeledStatement label (Identifier), body (Statement) Statement
core.js StringLiteral value (string) Expression, Pureish, Literal, Immutable
core.js NumericLiteral value (number) Expression, Pureish, Literal, Immutable
core.js NullLiteral - Expression, Pureish, Literal, Immutable
core.js BooleanLiteral value (boolean) Expression, Pureish, Literal, Immutable
core.js RegExpLiteral pattern (string), flags (string) Expression, Literal
core.js LogicalExpression operator (LOGICAL_OPERATORS), left (Expression), right (Expression) Binary, Expression
core.js MemberExpression object (Expression), property, computed, optional (true, false) Expression, LVal
core.js NewExpression -
core.js Program directives (Directive), body (Statement), sourceType (script, module), sourceFile (string) Scopable, BlockParent, Block
core.js ObjectExpression properties (ObjectMethod, ObjectProperty, SpreadElement) Expression
core.js ObjectMethod kind (method, get, set), key, params (LVal), body (BlockStatement), computed (boolean), generator (boolean), async (boolean), returnType (TypeAnnotation, TSTypeAnnotation, Noop), typeParameters (TypeParameterDeclaration, Noop), decorators (Decorator) UserWhitespacable, Function, Scopable, BlockParent, FunctionParent, Method, ObjectMember
core.js ObjectProperty key, value (Expression, PatternLike), computed (boolean), shorthand (boolean), decorators (Decorator) UserWhitespacable, Property, ObjectMember
core.js RestElement argument (LVal), typeAnnotation (TypeAnnotation, TSTypeAnnotation, Noop), decorators (Decorator) LVal, PatternLike
core.js ReturnStatement argument (Expression) Statement, Terminatorless, CompletionStatement
core.js SequenceExpression expressions (Expression) Expression
core.js SwitchCase test (Expression), consequent (Statement)
core.js SwitchStatement discriminant (Expression), cases (SwitchCase) Statement, BlockParent, Scopable
core.js ThisExpression - Expression
core.js ThrowStatement argument (Expression) Statement, Terminatorless, CompletionStatement
core.js TryStatement block (BlockStatement), handler (CatchClause), finalizer (BlockStatement) Statement
core.js UnaryExpression operator (UNARY_OPERATORS), argument (Expression), prefix UnaryLike, Expression
core.js UpdateExpression operator (UPDATE_OPERATORS), argument (Expression), prefix Expression
core.js VariableDeclaration kind (var, let, const), declarations (VariableDeclarator), declare (boolean) Statement, Declaration
core.js VariableDeclarator id (LVal), init (Expression)
core.js WhileStatement test (Expression), body (BlockStatement, Statement) Statement, BlockParent, Loop, While, Scopable
core.js WithStatement object, body (BlockStatement, Statement) Statement
es2015.js AssignmentPattern left (Identifier, ObjectPattern, ArrayPattern), right (Expression), decorators (Decorator) Pattern, PatternLike, LVal
es2015.js ArrayPattern elements (PatternLike), typeAnnotation, decorators (Decorator) Pattern, PatternLike, LVal
es2015.js ArrowFunctionExpression params, body (BlockStatement, Expression), async, returnType, typeParameters, expression (boolean) Scopable, Function, BlockParent, FunctionParent, Expression, Pureish
es2015.js ClassBody body (ClassMethod, ClassProperty, TSDeclareMethod, TSIndexSignature)
es2015.js ClassDeclaration id (Identifier), superClass (Expression), body (ClassBody), decorators (Decorator), mixins, typeParameters (TypeParameterDeclaration, Noop), superTypeParameters (TypeParameterInstantiation), implements (TSExpressionWithTypeArguments, FlowClassImplements), declare (boolean), abstract (boolean) Scopable, Class, Statement, Declaration, Pureish
es2015.js ClassExpression typeParameters (TypeParameterDeclaration, Noop), body (ClassBody, ClassBody), superClass (Expression, Expression), superTypeParameters (TypeParameterInstantiation), implements (TSExpressionWithTypeArguments, FlowClassImplements), id (Identifier), decorators (Decorator) Scopable, Class, Expression, Pureish
es2015.js ExportAllDeclaration source (StringLiteral) Statement, Declaration, ModuleDeclaration, ExportDeclaration
es2015.js ExportDefaultDeclaration declaration (FunctionDeclaration, TSDeclareFunction, ClassDeclaration, Expression) Statement, Declaration, ModuleDeclaration, ExportDeclaration
es2015.js ExportNamedDeclaration declaration (Declaration), specifiers (ExportSpecifier, ExportDefaultSpecifier, ExportNamespaceSpecifier), source (StringLiteral) Statement, Declaration, ModuleDeclaration, ExportDeclaration
es2015.js ExportSpecifier local (Identifier), exported (Identifier) ModuleSpecifier
es2015.js ForOfStatement left (VariableDeclaration, LVal), right (Expression), body (Statement), await (boolean) Scopable, Statement, For, BlockParent, Loop, ForXStatement
es2015.js ImportDeclaration specifiers (ImportSpecifier, ImportDefaultSpecifier, ImportNamespaceSpecifier), source (StringLiteral) Statement, Declaration, ModuleDeclaration
es2015.js ImportDefaultSpecifier local (Identifier) ModuleSpecifier
es2015.js ImportNamespaceSpecifier local (Identifier) ModuleSpecifier
es2015.js ImportSpecifier local (Identifier), imported (Identifier), importKind (, type, typeof) ModuleSpecifier
es2015.js MetaProperty meta (Identifier), property (Identifier) Expression
es2015.js ClassMethod kind (get, set, method, constructor), key, params, body (BlockStatement), computed (boolean), static (boolean), decorators (Decorator), returnType, typeParameters, abstract (boolean), accessibility (public, private, protected), optional (boolean), access (public, private, protected) Function, Scopable, BlockParent, FunctionParent, Method
es2015.js ObjectPattern properties (RestElement, ObjectProperty), typeAnnotation Pattern, PatternLike, LVal
es2015.js SpreadElement argument (Expression) UnaryLike
es2015.js Super - Expression
es2015.js TaggedTemplateExpression tag (Expression), quasi (TemplateLiteral) Expression
es2015.js TemplateElement value, tail (boolean)
es2015.js TemplateLiteral quasis (TemplateElement), expressions (Expression) Expression, Literal
es2015.js YieldExpression argument (Expression), delegate (boolean) Expression, Terminatorless
experimental.js AwaitExpression argument (Expression) Expression, Terminatorless
experimental.js BindExpression object, callee Expression
experimental.js ClassProperty key, value (Expression), typeAnnotation (TypeAnnotation, TSTypeAnnotation, Noop), decorators (Decorator), computed, readonly (boolean) Property
experimental.js Import - Expression
experimental.js Decorator expression (Expression)
experimental.js DoExpression body (BlockStatement) Expression
experimental.js ExportDefaultSpecifier exported (Identifier) ModuleSpecifier
experimental.js ExportNamespaceSpecifier exported (Identifier) ModuleSpecifier
flow.js AnyTypeAnnotation - Flow, FlowBaseAnnotation
flow.js ArrayTypeAnnotation elementType Flow
flow.js BooleanTypeAnnotation - Flow, FlowBaseAnnotation
flow.js BooleanLiteralTypeAnnotation - Flow
flow.js NullLiteralTypeAnnotation - Flow, FlowBaseAnnotation
flow.js ClassImplements id, typeParameters Flow
flow.js DeclareClass id, typeParameters, extends, body Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareFunction id Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareInterface id, typeParameters, extends, body Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareModule id, body Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareModuleExports typeAnnotation Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareTypeAlias id, typeParameters, right Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareOpaqueType id, typeParameters, supertype Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareVariable id Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareExportDeclaration declaration, specifiers, source Flow, FlowDeclaration, Statement, Declaration
flow.js DeclareExportAllDeclaration source Flow, FlowDeclaration, Statement, Declaration
flow.js DeclaredPredicate value Flow, FlowPredicate
flow.js ExistsTypeAnnotation - Flow
flow.js FunctionTypeAnnotation typeParameters, params, rest, returnType Flow
flow.js FunctionTypeParam name, typeAnnotation Flow
flow.js GenericTypeAnnotation id, typeParameters Flow
flow.js InferredPredicate - Flow, FlowPredicate
flow.js InterfaceExtends id, typeParameters Flow
flow.js InterfaceDeclaration id, typeParameters, extends, body Flow, FlowDeclaration, Statement, Declaration
flow.js IntersectionTypeAnnotation types Flow
flow.js MixedTypeAnnotation - Flow, FlowBaseAnnotation
flow.js EmptyTypeAnnotation - Flow, FlowBaseAnnotation
flow.js NullableTypeAnnotation typeAnnotation Flow
flow.js NumberLiteralTypeAnnotation - Flow
flow.js NumberTypeAnnotation - Flow, FlowBaseAnnotation
flow.js ObjectTypeAnnotation properties, indexers, callProperties Flow
flow.js ObjectTypeCallProperty value Flow, UserWhitespacable
flow.js ObjectTypeIndexer id, key, value Flow, UserWhitespacable
flow.js ObjectTypeProperty key, value Flow, UserWhitespacable
flow.js ObjectTypeSpreadProperty argument Flow, UserWhitespacable
flow.js OpaqueType id, typeParameters, supertype, impltype Flow, FlowDeclaration, Statement, Declaration
flow.js QualifiedTypeIdentifier id, qualification Flow
flow.js StringLiteralTypeAnnotation - Flow
flow.js StringTypeAnnotation - Flow, FlowBaseAnnotation
flow.js ThisTypeAnnotation - Flow, FlowBaseAnnotation
flow.js TupleTypeAnnotation types Flow
flow.js TypeofTypeAnnotation argument Flow
flow.js TypeAlias id, typeParameters, right Flow, FlowDeclaration, Statement, Declaration
flow.js TypeAnnotation typeAnnotation (Flow) Flow
flow.js TypeCastExpression expression, typeAnnotation Flow, ExpressionWrapper, Expression
flow.js TypeParameter bound (TypeAnnotation), default (Flow), name (string) Flow
flow.js TypeParameterDeclaration params (TypeParameter) Flow
flow.js TypeParameterInstantiation params (Flow) Flow
flow.js UnionTypeAnnotation types Flow
flow.js VoidTypeAnnotation - Flow, FlowBaseAnnotation
jsx.js JSXAttribute name (JSXIdentifier, JSXNamespacedName), value (JSXElement, JSXFragment, StringLiteral, JSXExpressionContainer) JSX, Immutable
jsx.js JSXClosingElement name (JSXIdentifier, JSXMemberExpression) JSX, Immutable
jsx.js JSXElement openingElement (JSXOpeningElement), closingElement (JSXClosingElement), children (JSXText, JSXExpressionContainer, JSXSpreadChild, JSXElement, JSXFragment), selfClosing JSX, Immutable, Expression
jsx.js JSXEmptyExpression - JSX, Expression
jsx.js JSXExpressionContainer expression (Expression) JSX, Immutable
jsx.js JSXSpreadChild expression (Expression) JSX, Immutable
jsx.js JSXIdentifier name (string) JSX, Expression
jsx.js JSXMemberExpression object (JSXMemberExpression, JSXIdentifier), property (JSXIdentifier) JSX, Expression
jsx.js JSXNamespacedName namespace (JSXIdentifier), name (JSXIdentifier) JSX
jsx.js JSXOpeningElement name (JSXIdentifier, JSXMemberExpression), attributes (JSXAttribute, JSXSpreadAttribute), selfClosing (boolean) JSX, Immutable
jsx.js JSXSpreadAttribute argument (Expression) JSX
jsx.js JSXText value (string) JSX, Immutable
jsx.js JSXFragment openingFragment (JSXOpeningFragment), closingFragment (JSXClosingFragment), children (JSXText, JSXExpressionContainer, JSXSpreadChild, JSXElement, JSXFragment) JSX, Immutable, Expression
jsx.js JSXOpeningFragment - JSX, Immutable
jsx.js JSXClosingFragment - JSX, Immutable
typescript.js TSParameterProperty parameter (Identifier, AssignmentPattern), accessibility (public, private, protected), readonly (boolean) LVal
typescript.js TSDeclareFunction id, typeParameters, params, returnType Statement, Declaration
typescript.js TSDeclareMethod decorators, key, typeParameters, params, returnType
typescript.js TSQualifiedName left, right TSEntityName
typescript.js TSCallSignatureDeclaration -
typescript.js TSConstructSignatureDeclaration -
typescript.js TSPropertySignature key, typeAnnotation, initializer TSTypeElement
typescript.js TSMethodSignature key, typeParameters, parameters, typeAnnotation TSTypeElement
typescript.js TSIndexSignature parameters, typeAnnotation TSTypeElement
typescript.js undefined - TSType
typescript.js TSThisType - TSType
typescript.js TSFunctionType -
typescript.js TSConstructorType -
typescript.js TSTypeReference typeName, typeParameters TSType
typescript.js TSTypePredicate parameterName, typeAnnotation TSType
typescript.js TSTypeQuery exprName TSType
typescript.js TSTypeLiteral members TSType
typescript.js TSArrayType elementType TSType
typescript.js TSTupleType elementTypes TSType
typescript.js TSUnionType -
typescript.js TSIntersectionType -
typescript.js TSParenthesizedType typeAnnotation TSType
typescript.js TSTypeOperator typeAnnotation TSType
typescript.js TSIndexedAccessType objectType, indexType TSType
typescript.js TSMappedType typeParameter, typeAnnotation TSType
typescript.js TSLiteralType literal TSType
typescript.js TSExpressionWithTypeArguments expression, typeParameters TSType
typescript.js TSInterfaceDeclaration id, typeParameters, extends, body Statement, Declaration
typescript.js TSInterfaceBody body
typescript.js TSTypeAliasDeclaration id, typeParameters, typeAnnotation Statement, Declaration
typescript.js TSAsExpression expression, typeAnnotation Expression
typescript.js TSTypeAssertion typeAnnotation, expression Expression
typescript.js TSEnumDeclaration id, members Statement, Declaration
typescript.js TSEnumMember id, initializer
typescript.js TSModuleDeclaration id, body Statement, Declaration
typescript.js TSModuleBlock body
typescript.js TSImportEqualsDeclaration id, moduleReference Statement
typescript.js TSExternalModuleReference expression
typescript.js TSNonNullExpression expression Expression
typescript.js TSExportAssignment expression Statement
typescript.js TSNamespaceExportDeclaration id Statement
typescript.js TSTypeAnnotation typeAnnotation (TSType)
typescript.js TSTypeParameterInstantiation params (TSType)
typescript.js TSTypeParameterDeclaration params (TSTypeParameter)
typescript.js TSTypeParameter constraint (TSType), default (TSType), name (string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment