@types/esprima

  • Version 4.0.2
  • Published
  • 6.62 kB
  • 1 dependency
  • MIT license

Install

npm i @types/esprima
yarn add @types/esprima
pnpm add @types/esprima

Overview

TypeScript definitions for Esprima

Index

Variables

variable Syntax

const Syntax: {
ArrayExpression: 'ArrayExpression';
ArrayPattern: 'ArrayPattern';
ArrowFunctionExpression: 'ArrowFunctionExpression';
AssignmentExpression: 'AssignmentExpression';
AssignmentPattern: 'AssignmentPattern';
AwaitExpression: 'AwaitExpression';
BinaryExpression: 'BinaryExpression';
BlockStatement: 'BlockStatement';
BreakStatement: 'BreakStatement';
CallExpression: 'CallExpression';
CatchClause: 'CatchClause';
ClassBody: 'ClassBody';
ClassDeclaration: 'ClassDeclaration';
ClassExpression: 'ClassExpression';
ConditionalExpression: 'ConditionalExpression';
ContinueStatement: 'ContinueStatement';
DebuggerStatement: 'DebuggerStatement';
DoWhileStatement: 'DoWhileStatement';
EmptyStatement: 'EmptyStatement';
ExportAllDeclaration: 'ExportAllDeclaration';
ExportDefaultDeclaration: 'ExportDefaultDeclaration';
ExportNamedDeclaration: 'ExportNamedDeclaration';
ExportSpecifier: 'ExportSpecifier';
ExpressionStatement: 'ExpressionStatement';
ForInStatement: 'ForInStatement';
ForOfStatement: 'ForOfStatement';
ForStatement: 'ForStatement';
FunctionDeclaration: 'FunctionDeclaration';
FunctionExpression: 'FunctionExpression';
Identifier: 'Identifier';
IfStatement: 'IfStatement';
Import: 'Import';
ImportDeclaration: 'ImportDeclaration';
ImportDefaultSpecifier: 'ImportDefaultSpecifier';
ImportNamespaceSpecifier: 'ImportNamespaceSpecifier';
ImportSpecifier: 'ImportSpecifier';
LabeledStatement: 'LabeledStatement';
Literal: 'Literal';
LogicalExpression: 'LogicalExpression';
MemberExpression: 'MemberExpression';
MetaProperty: 'MetaProperty';
MethodDefinition: 'MethodDefinition';
NewExpression: 'NewExpression';
ObjectExpression: 'ObjectExpression';
ObjectPattern: 'ObjectPattern';
Program: 'Program';
Property: 'Property';
RestElement: 'RestElement';
ReturnStatement: 'ReturnStatement';
SequenceExpression: 'SequenceExpression';
SpreadElement: 'SpreadElement';
Super: 'Super';
SwitchCase: 'SwitchCase';
SwitchStatement: 'SwitchStatement';
TaggedTemplateExpression: 'TaggedTemplateExpression';
TemplateElement: 'TemplateElement';
TemplateLiteral: 'TemplateLiteral';
ThisExpression: 'ThisExpression';
ThrowStatement: 'ThrowStatement';
TryStatement: 'TryStatement';
UnaryExpression: 'UnaryExpression';
UpdateExpression: 'UpdateExpression';
VariableDeclaration: 'VariableDeclaration';
VariableDeclarator: 'VariableDeclarator';
WhileStatement: 'WhileStatement';
WithStatement: 'WithStatement';
YieldExpression: 'YieldExpression';
};

    variable version

    const version: string;

      Functions

      function parseModule

      parseModule: (
      input: string,
      config?: ParseOptions,
      delegate?: (node: any, meta: any) => void
      ) => Program;

        function parseScript

        parseScript: (
        input: string,
        config?: ParseOptions,
        delegate?: (node: any, meta: any) => void
        ) => Program;

          function tokenize

          tokenize: (input: string, config?: TokenizeOptions) => Token[];

            Interfaces

            interface ParseOptions

            interface ParseOptions {}

              property comment

              comment?: boolean;

                property jsx

                jsx?: boolean;

                  property loc

                  loc?: boolean;

                    property range

                    range?: boolean;

                      property tokens

                      tokens?: boolean;

                        property tolerant

                        tolerant?: boolean;

                          interface Program

                          interface Program extends ESTree.Program {}

                            property tokens

                            tokens?: Token[];

                              interface Token

                              interface Token {}

                                property type

                                type: string;

                                  property value

                                  value: string;

                                    interface TokenizeOptions

                                    interface TokenizeOptions {}

                                      property comment

                                      comment?: boolean;

                                        property loc

                                        loc?: boolean;

                                          property range

                                          range?: boolean;

                                            property tolerant

                                            tolerant?: boolean;

                                              Package Files (1)

                                              Dependencies (1)

                                              Dev Dependencies (0)

                                              No dev dependencies.

                                              Peer Dependencies (0)

                                              No peer dependencies.

                                              Badge

                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/esprima.

                                              • Markdown
                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/esprima)
                                              • HTML
                                                <a href="https://www.jsdocs.io/package/@types/esprima"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>