#[repr(u16)]pub enum TypeScriptElementType {
Show 245 variants
NamedImports = 0,
Decorator = 1,
ArrowFunction = 2,
PredefinedType = 3,
Abstract = 4,
Any = 5,
As = 6,
Asserts = 7,
Async = 8,
Await = 9,
Boolean = 10,
Break = 11,
Case = 12,
Catch = 13,
Class = 14,
Const = 15,
Constructor = 16,
Continue = 17,
Debugger = 18,
Declare = 19,
Default = 20,
Delete = 21,
Do = 22,
Else = 23,
Enum = 24,
Export = 25,
Extends = 26,
False = 27,
Finally = 28,
For = 29,
From = 30,
Function = 31,
Get = 32,
Global = 33,
If = 34,
Implements = 35,
Import = 36,
In = 37,
Infer = 38,
Instanceof = 39,
Interface = 40,
Is = 41,
Keyof = 42,
Let = 43,
Namespace = 44,
Never = 45,
New = 46,
Null = 47,
Number = 48,
Object = 49,
Of = 50,
Override = 51,
Package = 52,
Private = 53,
Protected = 54,
Public = 55,
Readonly = 56,
Require = 57,
Return = 58,
Set = 59,
Static = 60,
String = 61,
Super = 62,
Switch = 63,
Symbol = 64,
This = 65,
Throw = 66,
True = 67,
Try = 68,
Type = 69,
Typeof = 70,
Undefined = 71,
Unique = 72,
Unknown = 73,
Var = 74,
Void = 75,
While = 76,
With = 77,
Yield = 78,
Plus = 79,
Minus = 80,
Star = 81,
Slash = 82,
Percent = 83,
StarStar = 84,
Question = 85,
DotDotDot = 86,
Less = 87,
Greater = 88,
LessEqual = 89,
GreaterEqual = 90,
EqualEqual = 91,
NotEqual = 92,
EqualEqualEqual = 93,
NotEqualEqual = 94,
AndAnd = 95,
OrOr = 96,
Exclamation = 97,
Tilde = 98,
Ampersand = 99,
Bar = 100,
Caret = 101,
LessLess = 102,
GreaterGreater = 103,
GreaterGreaterGreater = 104,
QuestionQuestion = 105,
QuestionDot = 106,
Equal = 107,
PlusEqual = 108,
MinusEqual = 109,
StarEqual = 110,
SlashEqual = 111,
PercentEqual = 112,
StarStarEqual = 113,
AmpersandEqual = 114,
BarEqual = 115,
CaretEqual = 116,
LessLessEqual = 117,
GreaterGreaterEqual = 118,
GreaterGreaterGreaterEqual = 119,
QuestionQuestionEqual = 120,
PlusPlus = 121,
MinusMinus = 122,
OpenParen = 123,
CloseParen = 124,
OpenBracket = 125,
CloseBracket = 126,
OpenBrace = 127,
CloseBrace = 128,
Comma = 129,
Dot = 130,
Semicolon = 131,
Colon = 132,
At = 133,
EqualsGreater = 134,
StringLiteral = 135,
NumericLiteral = 136,
BigIntLiteral = 137,
BooleanLiteral = 138,
TemplateString = 139,
RegexLiteral = 140,
IdentifierName = 141,
LineComment = 142,
BlockComment = 143,
Whitespace = 144,
Newline = 145,
Eof = 146,
Root = 147,
SourceFile = 148,
Module = 149,
VariableDeclaration = 150,
FunctionDeclaration = 151,
ClassDeclaration = 152,
InterfaceDeclaration = 153,
TypeAliasDeclaration = 154,
EnumDeclaration = 155,
NamespaceDeclaration = 156,
ClassBody = 157,
ImportDeclaration = 158,
ExportDeclaration = 159,
ImportClause = 160,
ImportSpecifier = 161,
NamespaceImport = 162,
NamedExports = 163,
ExportSpecifier = 164,
Parameter = 165,
CallArgument = 166,
PropertyDeclaration = 167,
MethodDeclaration = 168,
ConstructorDeclaration = 169,
PropertyAssignment = 170,
ShorthandPropertyAssignment = 171,
SpreadElement = 172,
Error = 173,
JsxElement = 174,
JsxSelfClosingElement = 175,
JsxOpeningElement = 176,
JsxClosingElement = 177,
JsxFragment = 178,
JsxOpeningFragment = 179,
JsxClosingFragment = 180,
JsxAttribute = 181,
JsxAttributes = 182,
JsxExpressionContainer = 183,
JsxSpreadAttribute = 184,
JsxText = 185,
BinaryExpression = 186,
UnaryExpression = 187,
ConditionalExpression = 188,
CallExpression = 189,
NewExpression = 190,
MemberExpression = 191,
ArrayExpression = 192,
ObjectExpression = 193,
FunctionExpression = 194,
TemplateExpression = 195,
TaggedTemplateExpression = 196,
AsExpression = 197,
TypeAssertionExpression = 198,
NonNullExpression = 199,
UpdateExpression = 200,
ExpressionStatement = 201,
BlockStatement = 202,
IfStatement = 203,
WhileStatement = 204,
ForStatement = 205,
ForInStatement = 206,
ForOfStatement = 207,
DoWhileStatement = 208,
SwitchStatement = 209,
CaseClause = 210,
DefaultClause = 211,
TryStatement = 212,
CatchClause = 213,
FinallyClause = 214,
ThrowStatement = 215,
ReturnStatement = 216,
BreakStatement = 217,
ContinueStatement = 218,
DebuggerStatement = 219,
WithStatement = 220,
BindingPattern = 221,
ArrayBindingPattern = 222,
ObjectBindingPattern = 223,
BindingElement = 224,
TypeReference = 225,
TypeLiteral = 226,
FunctionType = 227,
ConstructorType = 228,
ArrayType = 229,
TupleType = 230,
UnionType = 231,
IntersectionType = 232,
ConditionalType = 233,
MappedType = 234,
IndexedAccessType = 235,
PropertySignature = 236,
MethodSignature = 237,
LiteralType = 238,
TypeQuery = 239,
TypePredicate = 240,
TypeAnnotation = 241,
TypeParameter = 242,
HeritageClause = 243,
EnumMember = 244,
}Expand description
Element types for TypeScript.
Variants§
NamedImports = 0
Named imports.
Decorator = 1
A decorator.
ArrowFunction = 2
An arrow function.
PredefinedType = 3
A predefined type.
Abstract = 4
abstract keyword.
Any = 5
any keyword.
As = 6
as keyword.
Asserts = 7
asserts keyword.
Async = 8
async keyword.
Await = 9
await keyword.
Boolean = 10
boolean keyword.
Break = 11
break keyword.
Case = 12
case keyword.
Catch = 13
catch keyword.
Class = 14
class keyword.
Const = 15
const keyword.
Constructor = 16
constructor keyword.
Continue = 17
continue keyword.
Debugger = 18
debugger keyword.
Declare = 19
declare keyword.
Default = 20
default keyword.
Delete = 21
delete keyword.
Do = 22
do keyword.
Else = 23
else keyword.
Enum = 24
enum keyword.
Export = 25
export keyword.
Extends = 26
extends keyword.
False = 27
false keyword.
Finally = 28
finally keyword.
For = 29
for keyword.
From = 30
from keyword.
Function = 31
function keyword.
Get = 32
get keyword.
Global = 33
global keyword.
If = 34
if keyword.
Implements = 35
implements keyword.
Import = 36
import keyword.
In = 37
in keyword.
Infer = 38
infer keyword.
Instanceof = 39
instanceof keyword.
Interface = 40
interface keyword.
Is = 41
is keyword.
Keyof = 42
keyof keyword.
Let = 43
let keyword.
Namespace = 44
namespace keyword.
Never = 45
never keyword.
New = 46
new keyword.
Null = 47
null keyword.
Number = 48
number keyword.
Object = 49
object keyword.
Of = 50
of keyword.
Override = 51
override keyword.
Package = 52
package keyword.
Private = 53
private keyword.
Protected = 54
protected keyword.
Public = 55
public keyword.
Readonly = 56
readonly keyword.
Require = 57
require keyword.
Return = 58
return keyword.
Set = 59
set keyword.
Static = 60
static keyword.
String = 61
string keyword.
Super = 62
super keyword.
Switch = 63
switch keyword.
Symbol = 64
symbol keyword.
This = 65
this keyword.
Throw = 66
throw keyword.
True = 67
true keyword.
Try = 68
try keyword.
Type = 69
type keyword.
Typeof = 70
typeof keyword.
Undefined = 71
undefined keyword.
Unique = 72
unique keyword.
Unknown = 73
unknown keyword.
Var = 74
var keyword.
Void = 75
void keyword.
While = 76
while keyword.
With = 77
with keyword.
Yield = 78
yield keyword.
Plus = 79
+.
Minus = 80
-.
Star = 81
*.
Slash = 82
/.
Percent = 83
%.
StarStar = 84
**.
Question = 85
?.
DotDotDot = 86
....
Less = 87
<.
Greater = 88
>.
LessEqual = 89
<=.
GreaterEqual = 90
>=.
EqualEqual = 91
==.
NotEqual = 92
!=.
EqualEqualEqual = 93
===.
NotEqualEqual = 94
!==.
AndAnd = 95
&&.
OrOr = 96
||.
Exclamation = 97
!.
Tilde = 98
~.
Ampersand = 99
&.
Bar = 100
|.
Caret = 101
^.
LessLess = 102
<<.
GreaterGreater = 103
>>.
GreaterGreaterGreater = 104
>>>.
QuestionQuestion = 105
??.
QuestionDot = 106
?..
Equal = 107
=.
PlusEqual = 108
+=.
MinusEqual = 109
-=.
StarEqual = 110
*=.
SlashEqual = 111
/=.
PercentEqual = 112
%=.
StarStarEqual = 113
**=.
AmpersandEqual = 114
&=.
BarEqual = 115
|=.
CaretEqual = 116
^=.
LessLessEqual = 117
<<=.
GreaterGreaterEqual = 118
>>=.
GreaterGreaterGreaterEqual = 119
>>>=.
QuestionQuestionEqual = 120
??=.
PlusPlus = 121
++.
MinusMinus = 122
--.
OpenParen = 123
(.
CloseParen = 124
).
OpenBracket = 125
[.
CloseBracket = 126
].
OpenBrace = 127
{.
CloseBrace = 128
}.
Comma = 129
,.
Dot = 130
..
Semicolon = 131
;.
Colon = 132
:.
At = 133
@.
EqualsGreater = 134
=>.
StringLiteral = 135
String literal.
NumericLiteral = 136
Numeric literal.
BigIntLiteral = 137
BigInt literal.
BooleanLiteral = 138
Boolean literal.
TemplateString = 139
Template string.
RegexLiteral = 140
Regular expression literal.
IdentifierName = 141
Identifier name.
LineComment = 142
Line comment //.
BlockComment = 143
Block comment /* */.
Whitespace = 144
Whitespace.
Newline = 145
Newline.
Eof = 146
End of stream.
Root = 147
Root node.
SourceFile = 148
Source file.
Module = 149
Module.
VariableDeclaration = 150
Variable declaration.
FunctionDeclaration = 151
Function declaration.
ClassDeclaration = 152
Class declaration.
InterfaceDeclaration = 153
Interface declaration.
TypeAliasDeclaration = 154
Type alias declaration.
EnumDeclaration = 155
Enum declaration.
NamespaceDeclaration = 156
Namespace declaration.
ClassBody = 157
Class body.
ImportDeclaration = 158
Import declaration.
ExportDeclaration = 159
Export declaration.
ImportClause = 160
Import clause.
ImportSpecifier = 161
Import specifier.
NamespaceImport = 162
Namespace import.
NamedExports = 163
Named exports.
ExportSpecifier = 164
Export specifier.
Parameter = 165
Parameter.
CallArgument = 166
Call argument.
PropertyDeclaration = 167
Property declaration.
MethodDeclaration = 168
Method declaration.
ConstructorDeclaration = 169
Constructor declaration.
PropertyAssignment = 170
Property assignment.
ShorthandPropertyAssignment = 171
Shorthand property assignment.
SpreadElement = 172
Spread element.
Error = 173
Error token.
JsxElement = 174
JSX element.
JsxSelfClosingElement = 175
JSX self-closing element.
JsxOpeningElement = 176
JSX opening element.
JsxClosingElement = 177
JSX closing element.
JsxFragment = 178
JSX fragment.
JsxOpeningFragment = 179
JSX opening fragment.
JsxClosingFragment = 180
JSX closing fragment.
JsxAttribute = 181
JSX attribute.
JsxAttributes = 182
JSX attributes.
JsxExpressionContainer = 183
JSX expression container.
JsxSpreadAttribute = 184
JSX spread attribute.
JsxText = 185
JSX text.
BinaryExpression = 186
Binary expression.
UnaryExpression = 187
Unary expression.
ConditionalExpression = 188
Conditional expression a ? b : c.
CallExpression = 189
Call expression f().
NewExpression = 190
New expression new C().
MemberExpression = 191
Member expression a.b or a[b].
ArrayExpression = 192
Array expression [a, b].
ObjectExpression = 193
Object expression {a: b}.
FunctionExpression = 194
Function expression function() {}.
TemplateExpression = 195
Template expression `...`.
TaggedTemplateExpression = 196
Tagged template expression f ... ``.
AsExpression = 197
As expression a as T.
TypeAssertionExpression = 198
Type assertion expression <T>a.
NonNullExpression = 199
Non-null expression a!.
UpdateExpression = 200
Update expression ++a or a--.
ExpressionStatement = 201
Expression statement.
BlockStatement = 202
Block statement.
IfStatement = 203
If statement.
WhileStatement = 204
While statement.
ForStatement = 205
For statement.
ForInStatement = 206
For-in statement.
ForOfStatement = 207
For-of statement.
DoWhileStatement = 208
Do-while statement.
SwitchStatement = 209
Switch statement.
CaseClause = 210
Case clause.
DefaultClause = 211
Default clause.
TryStatement = 212
Try statement.
CatchClause = 213
Catch clause.
FinallyClause = 214
Finally clause.
ThrowStatement = 215
Throw statement.
ReturnStatement = 216
Return statement.
BreakStatement = 217
Break statement.
ContinueStatement = 218
Continue statement.
DebuggerStatement = 219
Debugger statement.
WithStatement = 220
With statement.
BindingPattern = 221
Binding pattern.
ArrayBindingPattern = 222
Array binding pattern.
ObjectBindingPattern = 223
Object binding pattern.
BindingElement = 224
Binding element.
TypeReference = 225
Type reference.
TypeLiteral = 226
Type literal.
FunctionType = 227
Function type.
ConstructorType = 228
Constructor type.
ArrayType = 229
Array type.
TupleType = 230
Tuple type.
UnionType = 231
Union type.
IntersectionType = 232
Intersection type.
ConditionalType = 233
Conditional type.
MappedType = 234
Mapped type.
IndexedAccessType = 235
Indexed access type.
PropertySignature = 236
Property signature.
MethodSignature = 237
Method signature.
LiteralType = 238
Literal type.
TypeQuery = 239
Type query.
TypePredicate = 240
Type predicate.
TypeAnnotation = 241
Type annotation.
TypeParameter = 242
Type parameter.
HeritageClause = 243
Heritage clause.
EnumMember = 244
Enum member.
Implementations§
Source§impl TypeScriptElementType
impl TypeScriptElementType
Sourcepub fn from_keyword(text: &str) -> Option<Self>
pub fn from_keyword(text: &str) -> Option<Self>
Returns the element type for the given keyword.
Trait Implementations§
Source§impl Clone for TypeScriptElementType
impl Clone for TypeScriptElementType
Source§fn clone(&self) -> TypeScriptElementType
fn clone(&self) -> TypeScriptElementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more