/** Arcade literals. */ export const Literals: { readonly False: "false"; readonly Null: "null"; readonly True: "true"; }; /** Arcade literals. */ export type Literals = (typeof Literals)[keyof typeof Literals]; /** Arcade keywords. */ export const Keywords: { readonly Break: "break"; readonly Continue: "continue"; readonly Else: "else"; readonly For: "for"; readonly Function: "function"; readonly If: "if"; readonly Import: "import"; readonly Export: "export"; readonly In: "in"; readonly Return: "return"; readonly Var: "var"; readonly While: "while"; }; /** Arcade contextual keywords. */ export const ContextualKeywords: { From: string; Of: string; }; /** Arcade keywords. */ export type Keywords = (typeof Keywords)[keyof typeof Keywords]; /** Arcade AST Node Types. */ export const NodeTypes: { readonly AssignmentExpression: "AssignmentExpression"; readonly ArrayExpression: "ArrayExpression"; readonly BlockComment: "BlockComment"; readonly BlockStatement: "BlockStatement"; readonly BinaryExpression: "BinaryExpression"; readonly BreakStatement: "BreakStatement"; readonly CallExpression: "CallExpression"; readonly ContinueStatement: "ContinueStatement"; readonly EmptyStatement: "EmptyStatement"; readonly ExpressionStatement: "ExpressionStatement"; readonly ExportNamedDeclaration: "ExportNamedDeclaration"; readonly ExportSpecifier: "ExportSpecifier"; readonly ForStatement: "ForStatement"; readonly ForInStatement: "ForInStatement"; readonly ForOfStatement: "ForOfStatement"; readonly FunctionDeclaration: "FunctionDeclaration"; readonly Identifier: "Identifier"; readonly IfStatement: "IfStatement"; readonly ImportDeclaration: "ImportDeclaration"; readonly ImportDefaultSpecifier: "ImportDefaultSpecifier"; readonly LineComment: "LineComment"; readonly Literal: "Literal"; readonly LogicalExpression: "LogicalExpression"; readonly MemberAccessChainExpression: "MemberAccessChainExpression"; readonly MemberExpression: "MemberExpression"; readonly ObjectExpression: "ObjectExpression"; readonly Program: "Program"; readonly Property: "Property"; readonly ReturnStatement: "ReturnStatement"; readonly SafeMemberExpression: "SafeMemberExpression"; readonly TemplateElement: "TemplateElement"; readonly TemplateLiteral: "TemplateLiteral"; readonly UnaryExpression: "UnaryExpression"; readonly UpdateExpression: "UpdateExpression"; readonly VariableDeclaration: "VariableDeclaration"; readonly VariableDeclarator: "VariableDeclarator"; readonly WhileStatement: "WhileStatement"; }; /** Arcade AST Node Types. */ export type NodeTypes = (typeof NodeTypes)[keyof typeof NodeTypes]; /** Arcade update operators. */ export const UpdateOperators: readonly [ "++", "--" ]; /** Arcade update operators. */ export type UpdateOperators = (typeof UpdateOperators)[number]; /** Arcade unary operators. */ export const UnaryOperators: readonly [ "-", "+", "!", "~" ]; /** Arcade unary operators. */ export type UnaryOperators = (typeof UnaryOperators)[number]; /** Arcade assignment operators. */ export const AssignmentOperators: readonly [ "=", "/=", "*=", "%=", "+=", "-=" ]; /** Arcade assignment operators. */ export type AssignmentOperators = (typeof AssignmentOperators)[number]; /** Arcade logical operators. */ export const LogicalOperators: readonly [ "||", "&&" ]; /** Arcade logical operators. */ export type LogicalOperators = (typeof LogicalOperators)[number]; /** Arcade binary operators. */ export const BinaryOperators: readonly [ "|", "&", ">>", "<<", ">>>", "^", "==", "!=", "<", "<=", ">", ">=", "+", "-", "*", "/", "%" ]; /** Arcade binary operators. */ export type BinaryOperators = (typeof BinaryOperators)[number]; export const SafeAccessOperator: "?."; export type SafeAccessOperator = typeof SafeAccessOperator; /** Arcade operators precedence. */ export const OperatorPrecedence: { readonly "||": 1; readonly "&&": 2; readonly "|": 3; readonly "^": 4; readonly "&": 5; readonly "==": 6; readonly "!=": 6; readonly "<": 7; readonly ">": 7; readonly "<=": 7; readonly ">=": 7; readonly "<<": 8; readonly ">>": 8; readonly ">>>": 8; readonly "+": 9; readonly "-": 9; readonly "*": 10; readonly "/": 10; readonly "%": 10; }; /** Describe a position in the source code as 1-based line number and 0-based column number. */ export interface Position { /** The 1-based line number. */ line: number; /** The 0-based column number. */ column: number; } /** * Describe a range in the source code between two positions as [start, end]. * Start is inclusive and end is exclusive. * Positions are 1-based line number and 0-based column number. */ export interface SourceLocation { /** The position of the first character of the parsed source region (inclusive). */ start: Position; /** The position of the first character after the parsed source region (exclusive). */ end: Position; } /** Describe the location of a character in the source code. */ export interface Marker extends Position { /** The zero based index of the character where the marker begins in the source code. */ index: number; } /** * Describe the location of a an item in the source code. * The range is [inclusive, exclusive]. * The location is 1-based line number and 0-based column number. */ export interface ItemLocation { /** The location of the item in the source code as start and end positions. */ loc: SourceLocation; /** * The range of the item in the source code as start and end indexes. * The range is [inclusive, exclusive]. */ range: [number, number]; } /** Arcade scanner token types. */ export const TokenTypes: { readonly Unknown: 0; readonly BooleanLiteral: 1; readonly EOF: 2; readonly Identifier: 3; readonly Keyword: 4; readonly NullLiteral: 5; readonly NumericLiteral: 6; readonly Punctuator: 7; readonly StringLiteral: 8; readonly Template: 10; }; /** Arcade scanner token types. */ export type TokenTypes = (typeof TokenTypes)[keyof typeof TokenTypes]; /** Arcade scanner token names. */ export const TokenNames: readonly [ "Unknown", "Boolean", "", "Identifier", "Keyword", "Null", "Numeric", "Punctuator", "String", "RegularExpression", "Template" ]; /** Arcade scanner token names. */ export type TokenNames = (typeof TokenNames)[number]; /** Define the options for the scanner. */ export interface TokenizeOptions { tolerant?: boolean; range?: boolean; loc?: boolean; comment?: boolean; } /** Define a token returned by the scanner. */ export interface Token extends ItemLocation { /** The type of the token found. */ type: TokenNames | typeof NodeTypes.BlockComment | typeof NodeTypes.LineComment; /** The value of the token. */ value: string; } /** Define the options for the parser. */ export interface ParseOptions { tolerant?: boolean; tokens?: boolean; comments?: boolean; } /** Arcade diagnostic error codes. */ export const DiagnosticCodes: { readonly InvalidModuleUri: "InvalidModuleUri"; readonly ForInOfLoopInitializer: "ForInOfLoopInitializer"; readonly IdentifierExpected: "IdentifierExpected"; readonly InvalidEscapedReservedWord: "InvalidEscapedReservedWord"; readonly InvalidExpression: "InvalidExpression"; readonly InvalidFunctionIdentifier: "InvalidFunctionIdentifier"; readonly InvalidHexEscapeSequence: "InvalidHexEscapeSequence"; readonly InvalidLeftHandSideInAssignment: "InvalidLeftHandSideInAssignment"; readonly InvalidLeftHandSideInForIn: "InvalidLeftHandSideInForIn"; readonly InvalidTemplateHead: "InvalidTemplateHead"; readonly InvalidVariableAssignment: "InvalidVariableAssignment"; readonly KeyMustBeString: "KeyMustBeString"; readonly NoFunctionInsideBlock: "NoFunctionInsideBlock"; readonly NoFunctionInsideFunction: "NoFunctionInsideFunction"; readonly ModuleExportRootOnly: "ModuleExportRootOnly"; readonly ModuleImportRootOnly: "ModuleImportRootOnly"; readonly PunctuatorExpected: "PunctuatorExpected"; readonly TemplateOctalLiteral: "TemplateOctalLiteral"; readonly UnexpectedBoolean: "UnexpectedBoolean"; readonly UnexpectedEndOfScript: "UnexpectedEndOfScript"; readonly UnexpectedIdentifier: "UnexpectedIdentifier"; readonly UnexpectedKeyword: "UnexpectedKeyword"; readonly UnexpectedNull: "UnexpectedNull"; readonly UnexpectedNumber: "UnexpectedNumber"; readonly UnexpectedPunctuator: "UnexpectedPunctuator"; readonly UnexpectedString: "UnexpectedString"; readonly UnexpectedTemplate: "UnexpectedTemplate"; readonly UnexpectedToken: "UnexpectedToken"; }; /** Arcade diagnostic error codes. */ export type DiagnosticCodes = (typeof DiagnosticCodes)[keyof typeof DiagnosticCodes]; /** Arcade diagnostic messages. */ export const DiagnosticMessages: Record; /** Arcade diagnostic data. */ export type DiagnosticData = Record; /** Define the properties of a diagnostic. */ export interface DiagnosticApi extends Marker { /** The diagnostic code. */ code: DiagnosticCodes; /** The diagnostic description. */ description?: string; /** The length of the token. */ len?: number; /** The associated diagnostic data. */ data?: DiagnosticData | null; } /** The Arcade diagnostic class. */ export class Diagnostic extends Error { constructor(diagnosticApi: DiagnosticApi); code: DiagnosticCodes; column: number; data?: DiagnosticData | null; /** @default "esri.arcade.lib.diagnostic" */ readonly declaredRootClass: string; description?: string; index: number; len: number; line: number; range: SourceLocation; } /** Define a line comment. */ export interface LineComment extends ItemLocation { readonly type: typeof NodeTypes.LineComment; /** The value of the comment. */ value: string; } /** Define a block comment. */ export interface BlockComment extends ItemLocation { readonly type: typeof NodeTypes.BlockComment; /** The value of the comment. */ value: string; } /** Define a comment of type block or line. */ export type Comment = BlockComment | LineComment; /** * Define the delegate for the parser. * * @param node */ export type Delegate = (node: Node) => void; /** Define the types of Arcade Declaration. */ export type Declaration = ExportNamedDeclaration | FunctionDeclaration | ImportDeclaration | VariableDeclaration; /** Define the types of Arcade Statement. */ export type Statement = BlockStatement | BreakStatement | ContinueStatement | Declaration | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ReturnStatement | WhileStatement; /** Define the types of Arcade Expression. */ export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | Identifier | Literal | LogicalExpression | MemberAccessChainExpression | MemberExpression | ObjectExpression | SafeMemberExpression | TemplateLiteral | UnaryExpression | UpdateExpression; /** Define the types of Arcade AST Node (excluding comments). */ export type Node = Expression | ImportDefaultSpecifier | Program | Property | Statement | TemplateElement | VariableDeclarator; /** Define the base properties of any Arcade AST Node. */ export interface NodeBase extends ItemLocation { /** The type of the node. */ type: T; /** The leading comments of the node. */ leadingComments?: Comment[]; /** The trailing comments of the node. */ trailingComments?: Comment[]; } /** Define an Arcade program. */ export interface Program extends NodeBase { /** The collection of statements in the program. */ body: Statement[]; /** The collection of comments inside the program. */ comments?: Comment[]; /** The collection of tokens inside the program. */ tokens?: Token[]; /** The collection of errors inside the program. */ errors?: Error[]; } /** * Define an Arcade export declaration. * Example: export function foo() {} * The declaration is the function declaration: function foo() {} * The specifiers are foo and bar */ export interface ExportNamedDeclaration extends NodeBase { /** * The declaration of the export. * Example: export function foo() {} * The declaration is the function declaration: function foo() {} */ declaration: FunctionDeclaration | VariableDeclaration; /** * The specifiers of the export. * Example: export { foo, bar } * The specifiers are foo and bar. */ specifiers: ExportSpecifier[]; /** * The source of the export. * Example: export { foo, bar } from "./my-module" * The source is "./my-module" */ source: Literal | null; } /** * Define an Arcade export specifier. * Example: export { foo as bar } * The specifier is foo as bar. */ export interface ExportSpecifier extends NodeBase { /** * The exported identifier. * Example: export { foo as bar } * The exported identifier is bar. */ exported: Identifier; /** * The local identifier. * Example: export { foo as bar } * The local identifier is foo. */ local: Identifier; } /** * Define an Arcade import declaration. * Example: import { foo, bar } from "./my-module" * The specifiers are foo and bar. * The source is "./my-module" */ export interface ImportDeclaration extends NodeBase { /** * The specifiers of the import. * Example: import { foo, bar } from "./my-module" * The specifiers are foo and bar. */ specifiers: ImportDefaultSpecifier[]; /** * The source of the import. * Example: import { foo, bar } from "./my-module" * The source is "./my-module" */ source: Literal; } /** * Define an Arcade import default specifier. * Example: import "./my-module" * The local is "./my-module" */ export interface ImportDefaultSpecifier extends NodeBase { /** * The local identifier. * Example: import "./my-module" * The local is "./my-module" */ local: Identifier; } /** Define an Arcade function declaration. */ export interface FunctionDeclaration extends NodeBase { /** * The identifier of the function. * Example: function foo() {} * The identifier is foo. */ id: Identifier; /** * The parameters of the function. * Example: function foo(bar, baz) {} * The parameters are bar and baz. */ params: Identifier[]; /** * The body of the function. * Example: function foo() { return 1; } * The body is { return 1; } */ body: BlockStatement; } /** * Define an Arcade variable declaration. * Example: var foo = 1, bar = 2; * The declarators are foo = 1 and bar = 2. */ export interface VariableDeclaration extends NodeBase { /** * The declarators of the variable declaration. * Example: var foo = 1, bar = 2; * The declarators are foo = 1 and bar = 2. */ declarations: VariableDeclarator[]; /** The kind is always "var" for Arcade. */ kind: "var"; } /** * Define an Arcade variable declarator. * Example: var foo = 1; * The identifier is foo. * The init is 1. */ export interface VariableDeclarator extends NodeBase { /** The identifier of the variable declarator. */ id: Identifier; /** The init of the variable declarator. */ init: Expression | null; } /** * Define an Arcade block statement. * Example: { return 1; } */ export interface BlockStatement extends NodeBase { /** The collection of statements in the block. */ body: Statement[]; /** The collection of comments inside the block. */ innerComments?: Comment[]; } /** * Define an Arcade break statement. * Example: for (var i = 0; i < 10; i++) { break; } */ export type BreakStatement = NodeBase; /** * Define an Arcade continue statement. * Example: for (var i = 0; i < 10; i++) { continue; } */ export type ContinueStatement = NodeBase; /** Define an Arcade empty statement. */ export type EmptyStatement = NodeBase; /** * Define an Arcade expression statement. * Example: a = 1; */ export interface ExpressionStatement extends NodeBase { /** The expression of the statement. */ expression: Expression; } /** * Define an Arcade for-in statement. * Example: * ``` * var arr = ['a', 'b']; * for (var i in arr) { * Console(arr[i]) * } * ``` */ export interface ForInStatement extends NodeBase { /** The left: `var i`. */ left: Identifier | VariableDeclaration; /** The right: `arr`. */ right: Expression; /** The body: `Console(arr[i])`. */ body: Statement; } /** * Define an Arcade for-of statement. * Example: * ``` * var arr = ['a', 'b']; * for (var v in arr) { * Console(v) * } * ``` */ export interface ForOfStatement extends NodeBase { /** The left side: `var v`. */ left: Identifier | VariableDeclaration; /** The right side: `arr`. */ right: Expression; /** The body: `Console(v)`. */ body: Statement; } /** * Define an Arcade for statement. * Example: for (var i = 0; i < 10; i++) { console(i); } */ export interface ForStatement extends NodeBase { /** * The init of the for statement. * Example: for (var i = 0; i < 10; i++) { console(i); } * The init is var i = 0. */ init: Expression | VariableDeclaration | null; /** * The test of the for statement. * Example: for (var i = 0; i < 10; i++) { console(i); } * The test is i < 10. */ test: Expression | null; /** * The update of the for statement. * Example: for (var i = 0; i < 10; i++) { console(i); } * The update is i++. */ update: Expression | null; /** The body of the for statement. */ body: Statement; } /** * Define an Arcade function declaration. * Example: while (a < 10) { console(a++); } */ export interface WhileStatement extends NodeBase { /** * The test of the while statement. * Example: while (a < 10) { console(a++); } * The test is a < 10. */ test: Exclude; /** The body of the while statement. */ body: Statement; } /** * Define an Arcade if statement. * Example: if (a < 10) { console(a++); } else { console(a--); } */ export interface IfStatement extends NodeBase { /** * The test of the if statement. * Example: if (a < 10) { console(a++); } else { console(a--); } * The test is a < 10. */ test: Exclude; /** * The consequent of the if statement. * Example: if (a < 10) { console(a++); } else { console(a--); } * The consequent is console(a++). */ consequent: Statement; /** * The alternate of the if statement. * Example: if (a < 10) { console(a++); } else { console(a--); } * The alternate is console(a--). */ alternate: Statement | null; } /** * Define an Arcade return statement. * Example: return 1; */ export interface ReturnStatement extends NodeBase { /** The argument of the return statement. */ argument: Expression | null; } /** * Define an Arcade array expression. * Example: [1, 2, 3] */ export interface ArrayExpression extends NodeBase { /** The elements of the array expression. */ elements: Expression[]; } /** * Define an Arcade assignment expression. * Example: a = 1; */ export interface AssignmentExpression extends NodeBase { /** * The operator of the assignment expression. * Example: a = 1; */ operator: AssignmentOperators; /** * The left side of the assignment expression. * Example: a = 1; * The left side is a. */ left: Identifier | MemberExpression; /** * The right side of the assignment expression. * Example: a = 1; * The right side is 1. */ right: Expression; } /** * Define an Arcade binary expression. * Example: a << 1; or a + 1; */ export interface BinaryExpression extends NodeBase { /** * The operator of the binary expression. * Example: a << 1; or a + 1; * The operator is << or +. */ operator: BinaryOperators; /** * The left side of the binary expression. * Example: a << 1; or a + 1; * The left side is a. */ left: Expression; /** * The right side of the binary expression. * Example: a << 1; or a + 1; * The right side is 1. */ right: Expression; } /** * Define an Arcade call expression. * Example: foo(1, 2, 3) */ export interface CallExpression extends NodeBase { /** * The callee of the call expression. * Example: foo(1, 2, 3) * The callee is foo. */ callee: Expression; /** * The arguments of the call expression. * Example: foo(1, 2, 3) * The arguments are 1, 2 and 3. */ arguments: Expression[]; } /** * Define an Arcade identifier. * Example: foo */ export interface Identifier extends NodeBase { /** * The name of the identifier. * Example: foo * The name is foo. */ name: string; } /** * Define an Arcade literal. * Example: 1 or "foo" * The value is 1 or "foo". */ export interface Literal extends NodeBase { /** Indicate if the literal is a string. */ isString: boolean; /** * The value of the literal. * Example: 1 or "foo" * The value is 1 or "foo". */ value: boolean | number | string | null; /** * The raw value of the literal. * Example: 1 or "foo" * The raw value is "1" or "foo". */ raw: string; } /** * Define an Arcade logical expression. * Example: a || b */ export interface LogicalExpression extends NodeBase { /** * The operator of the logical expression. * Example: a || b * The operator is ||. */ operator: LogicalOperators; /** * The left side of the logical expression. * Example: a || b * The left side is a. * Note that left can never be an AssignmentExpression or an UpdateExpression. */ left: Expression; /** * The right side of the logical expression. * Example: a || b * The right side is b. * Note that right can never be an AssignmentExpression or an UpdateExpression. */ right: Expression; } /** * Define an Arcade computed member expression. * Example: foo[1] */ export interface ComputedMemberExpression extends NodeBase { readonly computed: true; /** * The object of the member expression. * Example: foo[1] * The object is foo. */ object: Expression; /** * The property of the member expression. * Example: foo[1] * The property is 1. */ property: Expression; } /** * Define an Arcade safe computed member expression. * Example: foo?.[1] */ export interface SafeComputedMemberExpression extends NodeBase { readonly computed: true; /** * The object of the member expression. * Example: foo?.[1] * The object is foo. */ object: Expression; /** * The property of the member expression. * Example: foo?.[1] * The property is 1. */ property: Expression; } /** * Define an Arcade non-computed member expression. * Example: foo.bar */ export interface NonComputedMemberExpression extends NodeBase { readonly computed: false; /** * The object of the member expression. * Example: foo.bar * The object is foo. */ object: Expression; /** * The property of the member expression. * Example: foo.bar * The property is bar. */ property: Identifier; } /** * Define an Arcade safe non-computed member expression. * Example: foo?.bar */ export interface SafeNonComputedMemberExpression extends NodeBase { readonly computed: false; /** * The object of the member expression. * Example: foo?.bar * The object is foo. */ object: Expression; /** * The property of the member expression. * Example: foo?.bar * The property is bar. */ property: Identifier; } /** * Define an Arcade member expression. * Example: foo.bar or foo[1] */ export type MemberExpression = ComputedMemberExpression | NonComputedMemberExpression; /** * Define an Arcade safe member expression. * Example: foo?.bar or foo?.[1] */ export type SafeMemberExpression = SafeComputedMemberExpression | SafeNonComputedMemberExpression; /** * The enclosing scope for SafeMemberExpressions. Failed accesses in `expression` (or descendent `callee`/`object` expressions) * result in this entire chain evaluating to `null`. * Example: `foo?.bar?.["baz"]`, `foo()?.bar`, `foo.bar?.baz`, `foo?.bar.baz`, `foo?.bar()` are all single chains */ export interface MemberAccessChainExpression extends NodeBase { expression: Expression; } /** * Define an Arcade object expression. * Example: { foo: 1, bar: 2 } */ export interface ObjectExpression extends NodeBase { /** The collection of properties of the object expression. */ properties: Property[]; } /** Define an Arcade object property. */ export interface Property extends NodeBase { kind: "init"; /** * The key of the property. * Example: { foo: 1 } or { foo } * The key is foo. */ key: Identifier | Literal; /** * The value of the property. * Example: { foo: 1 } or { foo } * The value is 1 or foo. */ value: Expression; /** * Indicate if the property is a shorthand. * Example: { foo } * The property is a shorthand. */ shorthand: boolean; } /** * Define an Arcade template literal. * Example: `foo ${value} bar` */ export interface TemplateLiteral extends NodeBase { /** * The collection of quasis of the template literal. * Example: `foo ${value} bar` * The quasis are foo and bar. */ quasis: TemplateElement[]; /** * The collection of expressions of the template literal. * Example: `foo ${value1} - ${value2} bar` * The expressions are value1 and value2. */ expressions: Expression[]; } /** Define an Arcade template element. */ export interface TemplateElement extends NodeBase { /** * The value of the template element. * Example: `foo ${value}` * The value is foo. */ value: TemplateElementValue; /** * Indicate if the template element is a tail. * Example: `foo ${value} bar` * The template element for foo is not a tail. * The template element for bar is a tail. */ tail?: boolean; } /** Define an Arcade template element value. */ export interface TemplateElementValue { /** The cooked value of the template element. */ cooked?: string; /** The raw value of the template element. */ raw: string; } /** * Define an Arcade unary expression. * Example: -1 */ export interface UnaryExpression extends NodeBase { readonly prefix: true; /** * The operator of the unary expression. * Example: -1 * The operator is -. */ operator: UnaryOperators; /** * The argument of the unary expression. * Example: -1 * The argument is 1. */ argument: Expression; } /** * Define an Arcade update expression. * Example: a++ */ export interface UpdateExpression extends NodeBase { /** * The operator of the update expression. * Example: a++ * The operator is ++. */ operator: UpdateOperators; /** * The argument of the update expression. * Example: a++ * The argument is a. */ argument: CallExpression | Identifier | MemberExpression; /** * Indicate if the update expression is a prefix. * Example: ++a * The update expression is a prefix. */ prefix: boolean; } /** * Test if the item is an Arcade Program. * * @param item */ export function isProgram(item: unknown): item is Program; /** * Test if the item is an Arcade Statement. * * @param item */ export function isStatement(item: unknown): item is Statement; /** * Test if the item is an Arcade BlockStatement. * * @param item */ export function isBlockStatement(item: unknown): item is BlockStatement; /** * Test if the item is an Arcade BlockComment. * * @param item */ export function isBlockComment(item: unknown): item is BlockComment; /** * Test if the item is an Arcade BreakStatement. * * @param item */ export function isBreakStatement(item: unknown): item is BreakStatement; /** * Test if the item is an Arcade ContinueStatement. * * @param item */ export function isContinueStatement(item: unknown): item is ContinueStatement; /** * Test if the item is an Arcade EmptyStatement. * * @param item */ export function isEmptyStatement(item: unknown): item is EmptyStatement; /** * Test if the item is an Arcade ExpressionStatement. * * @param item */ export function isExpressionStatement(item: unknown): item is ExpressionStatement; /** * Test if the item is an Arcade ForInStatement. * * @param item */ export function isForInStatement(item: unknown): item is ForInStatement; /** * Test if the item is an Arcade ForOfStatement. * * @param item */ export function isForOfStatement(item: unknown): item is ForOfStatement; /** * Test if the item is an Arcade ForStatement. * * @param item */ export function isForStatement(item: unknown): item is ForStatement; /** * Test if the item is an Arcade FunctionDeclaration. * * @param item */ export function isFunctionDeclaration(item: unknown): item is FunctionDeclaration; /** * Test if the item is an Arcade IfStatement. * * @param item */ export function isIfStatement(item: unknown): item is IfStatement; /** * Test if the item is an Arcade ReturnStatement. * * @param item */ export function isReturnStatement(item: unknown): item is ReturnStatement; /** * Test if the item is an Arcade VariableDeclaration. * * @param item */ export function isVariableDeclaration(item: unknown): item is VariableDeclaration; /** * Test if the item is an Arcade Expression. * * @param item */ export function isExpression(item: unknown): item is Expression; /** * Test if the item is an Arcade ArrayExpression. * * @param item */ export function isArrayExpression(item: unknown): item is ArrayExpression; /** * Test if the item is an Arcade AssignmentExpression. * * @param item */ export function isAssignmentExpression(item: unknown): item is AssignmentExpression; /** * Test if the item is an Arcade BinaryExpression. * * @param item */ export function isBinaryExpression(item: unknown): item is BinaryExpression; /** * Test if the item is an Arcade CallExpression. * * @param item */ export function isCallExpression(item: unknown): item is CallExpression; /** * Test if the item is an Arcade Identifier. * * @param item */ export function isIdentifier(item: unknown): item is Identifier; /** * Test if the item is an Arcade Literal. * * @param item */ export function isLiteral(item: unknown): item is Literal; /** * Test if the item is an Arcade LogicalExpression. * * @param item */ export function isLogicalExpression(item: unknown): item is LogicalExpression; /** * Test if the item is an Arcade ObjectExpression. * * @param item */ export function isObjectExpression(item: unknown): item is ObjectExpression; /** * Test if the item is an Arcade TemplateLiteral. * * @param item */ export function isTemplateLiteral(item: unknown): item is TemplateLiteral; /** * Test if the item is an Arcade MemberExpression. * * @param item */ export function isMemberExpression(item: unknown): item is MemberExpression; /** * Test if the item is an Arcade SafeMemberExpression. * * @param item */ export function isSafeMemberExpression(item: unknown): item is SafeMemberExpression; /** * Test if the item is an Arcade MemberAccessChainExpression. * * @param item */ export function isMemberAccessChainExpression(item: unknown): item is MemberAccessChainExpression; /** * Test if the item is an Arcade UnaryExpression. * * @param item */ export function isUnaryExpression(item: unknown): item is UnaryExpression; /** * Test if the item is an Arcade UpdateExpression. * * @param item */ export function isUpdateExpression(item: unknown): item is UpdateExpression; /** * Test if the item is an Arcade VariableDeclarator. * * @param item */ export function isVariableDeclarator(item: unknown): item is VariableDeclarator; /** * Test if the item is an Arcade Property. * * @param item */ export function isProperty(item: unknown): item is Property; /** * Test if the item is an Arcade TemplateElement. * * @param item */ export function isTemplateElement(item: unknown): item is TemplateElement;