@types/esprima

  • Version 4.0.6
  • Published
  • 6.55 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: ESTree.Node, meta: any) => void
      ) => Program;

        function parseScript

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

          function tokenize

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

            Interfaces

            interface ParseOptions

            interface ParseOptions {}

              property comment

              comment?: boolean | undefined;

                property jsx

                jsx?: boolean | undefined;

                  property loc

                  loc?: boolean | undefined;

                    property range

                    range?: boolean | undefined;

                      property tokens

                      tokens?: boolean | undefined;

                        property tolerant

                        tolerant?: boolean | undefined;

                          interface Program

                          interface Program extends ESTree.Program {}

                            property tokens

                            tokens?: Token[] | undefined;

                              interface Token

                              interface Token {}

                                property type

                                type: string;

                                  property value

                                  value: string;

                                    interface TokenizeOptions

                                    interface TokenizeOptions {}

                                      property comment

                                      comment?: boolean | undefined;

                                        property loc

                                        loc?: boolean | undefined;

                                          property range

                                          range?: boolean | undefined;

                                            property tolerant

                                            tolerant?: boolean | undefined;

                                              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>