Skip to main content

Module statements

Module statements 

Source

Structs§

BlockStatement
BreakStatement
CatchClause
ClassDeclaration
ContinueStatement
DebuggerStatement
Directive
DirectiveLiteral
DoWhileStatement
EmptyStatement
ExpressionStatement
ForInStatement
ForOfStatement
ForStatement
FunctionDeclaration
IfStatement
LabeledStatement
ReturnStatement
SwitchCase
SwitchStatement
ThrowStatement
TryStatement
UnknownStatement
VariableDeclaration
VariableDeclarator
WhileStatement
WithStatement

Enums§

ForInOfLeft
ForInit
Statement
VariableDeclarationKind

Functions§

is_known_statement_type
Whether node_type is a statement type tag modeled by Statement, i.e. one that deserializes into a typed variant rather than the Statement::Unknown catch-all. Callers that need to discriminate statements from other node kinds must use this instead of attempting a Statement deserialization: with the tolerant catch-all, that attempt succeeds for any object carrying a string type tag.