Socket
Socket
Sign inDemoInstall

@typescript-eslint/typescript-estree

Package Overview
Dependencies
Maintainers
1
Versions
3860
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/typescript-estree - npm Package Compare versions

Comparing version 1.3.1-alpha.2 to 1.3.1-alpha.3

dist/ast-converter.d.ts.map

3

dist/ast-converter.d.ts
import ts from 'typescript';
import { Extra } from './parser-options';
export default function astConverter(ast: ts.SourceFile, extra: Extra, shouldProvideParserServices: boolean): {
estree: import("./typedefs").Program;
estree: import("./ts-estree/ts-estree").Program;
astMaps: {

@@ -10,1 +10,2 @@ esTreeNodeToTSNodeMap: WeakMap<object, any>;

};
//# sourceMappingURL=ast-converter.d.ts.map

@@ -48,1 +48,2 @@ "use strict";

exports.default = astConverter;
//# sourceMappingURL=ast-converter.js.map

@@ -17,1 +17,2 @@ /**

export declare function convertComments(ast: ts.SourceFile, code: string): TSESTree.Comment[];
//# sourceMappingURL=convert-comments.d.ts.map

@@ -125,1 +125,2 @@ "use strict";

exports.convertComments = convertComments;
//# sourceMappingURL=convert-comments.js.map

@@ -147,1 +147,2 @@ /**

export {};
//# sourceMappingURL=convert.d.ts.map

@@ -8,4 +8,3 @@ /**

import ts from 'typescript';
import { TSESTree } from './ts-estree';
import { AST_NODE_TYPES } from './ast-node-types';
import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from './ts-estree';
/**

@@ -180,3 +179,3 @@ * Returns true if the given ts.Token is the assignment operator

*/
export declare function getTokenType(token: any): TSESTree.TokenType;
export declare function getTokenType(token: any): AST_TOKEN_TYPES;
/**

@@ -229,1 +228,2 @@ * Extends and formats a given ts.Token, for a given AST

export declare function firstDefined<T, U>(array: ReadonlyArray<T> | undefined, callback: (element: T, index: number) => U | undefined): U | undefined;
//# sourceMappingURL=node-utils.d.ts.map

@@ -14,3 +14,3 @@ "use strict";

const lodash_unescape_1 = __importDefault(require("lodash.unescape"));
const ast_node_types_1 = require("./ast-node-types");
const ts_estree_1 = require("./ts-estree");
const SyntaxKind = typescript_1.default.SyntaxKind;

@@ -193,8 +193,8 @@ const ASSIGNMENT_OPERATORS = [

if (isAssignmentOperator(operator)) {
return ast_node_types_1.AST_NODE_TYPES.AssignmentExpression;
return ts_estree_1.AST_NODE_TYPES.AssignmentExpression;
}
else if (isLogicalOperator(operator)) {
return ast_node_types_1.AST_NODE_TYPES.LogicalExpression;
return ts_estree_1.AST_NODE_TYPES.LogicalExpression;
}
return ast_node_types_1.AST_NODE_TYPES.BinaryExpression;
return ts_estree_1.AST_NODE_TYPES.BinaryExpression;
}

@@ -430,3 +430,3 @@ exports.getBinaryExpressionType = getBinaryExpressionType;

return {
type: ast_node_types_1.AST_NODE_TYPES.ExportDefaultDeclaration,
type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
declaration: result,

@@ -439,3 +439,3 @@ range: [exportKeyword.getStart(ast), result.range[1]],

return {
type: ast_node_types_1.AST_NODE_TYPES.ExportNamedDeclaration,
type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
declaration: result,

@@ -462,3 +462,3 @@ range: [exportKeyword.getStart(ast), result.range[1]],

case SyntaxKind.NullKeyword:
return 'Null';
return ts_estree_1.AST_TOKEN_TYPES.Null;
case SyntaxKind.GetKeyword:

@@ -468,5 +468,5 @@ case SyntaxKind.SetKeyword:

case SyntaxKind.ModuleKeyword:
return 'Identifier';
return ts_estree_1.AST_TOKEN_TYPES.Identifier;
default:
return 'Keyword';
return ts_estree_1.AST_TOKEN_TYPES.Keyword;
}

@@ -478,19 +478,19 @@ }

token.kind === SyntaxKind.TrueKeyword) {
return 'Boolean';
return ts_estree_1.AST_TOKEN_TYPES.Boolean;
}
return 'Keyword';
return ts_estree_1.AST_TOKEN_TYPES.Keyword;
}
if (token.kind >= SyntaxKind.FirstPunctuation &&
token.kind <= SyntaxKind.LastBinaryOperator) {
return 'Punctuator';
return ts_estree_1.AST_TOKEN_TYPES.Punctuator;
}
if (token.kind >= SyntaxKind.NoSubstitutionTemplateLiteral &&
token.kind <= SyntaxKind.TemplateTail) {
return 'Template';
return ts_estree_1.AST_TOKEN_TYPES.Template;
}
switch (token.kind) {
case SyntaxKind.NumericLiteral:
return 'Numeric';
return ts_estree_1.AST_TOKEN_TYPES.Numeric;
case SyntaxKind.JsxText:
return 'JSXText';
return ts_estree_1.AST_TOKEN_TYPES.JSXText;
case SyntaxKind.StringLiteral:

@@ -502,7 +502,7 @@ // A TypeScript-StringLiteral token with a TypeScript-JsxAttribute or TypeScript-JsxElement parent,

token.parent.kind === SyntaxKind.JsxElement)) {
return 'JSXText';
return ts_estree_1.AST_TOKEN_TYPES.JSXText;
}
return 'String';
return ts_estree_1.AST_TOKEN_TYPES.String;
case SyntaxKind.RegularExpressionLiteral:
return 'RegularExpression';
return ts_estree_1.AST_TOKEN_TYPES.RegularExpression;
case SyntaxKind.Identifier:

@@ -520,14 +520,14 @@ case SyntaxKind.ConstructorKeyword:

hasJSXAncestor(token)) {
return 'JSXIdentifier';
return ts_estree_1.AST_TOKEN_TYPES.JSXIdentifier;
}
if (isJSXToken(token.parent)) {
if (token.kind === SyntaxKind.PropertyAccessExpression) {
return 'JSXMemberExpression';
return ts_estree_1.AST_TOKEN_TYPES.JSXMemberExpression;
}
if (token.kind === SyntaxKind.Identifier) {
return 'JSXIdentifier';
return ts_estree_1.AST_TOKEN_TYPES.JSXIdentifier;
}
}
}
return 'Identifier';
return ts_estree_1.AST_TOKEN_TYPES.Identifier;
}

@@ -666,1 +666,2 @@ exports.getTokenType = getTokenType;

exports.firstDefined = firstDefined;
//# sourceMappingURL=node-utils.js.map
import { Program } from 'typescript';
import { Token, Comment, Node } from './typedefs';
import { Token, Comment, Node } from './ts-estree/ts-estree';
import { TSNode } from './ts-nodes';

@@ -44,1 +44,2 @@ export interface Extra {

}
//# sourceMappingURL=parser-options.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=parser-options.js.map

@@ -17,5 +17,4 @@ import { TSESTree } from './ts-estree';

export declare function parseAndGenerateServices<T extends ParserOptions = ParserOptions>(code: string, options: T): ParseAndGenerateServicesResult<T>;
export { AST_NODE_TYPES } from './ast-node-types';
export { ParserOptions };
export { ParserServices };
export { TSESTree };
export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from './ts-estree';
export { ParserOptions, ParserServices };
//# sourceMappingURL=parser.d.ts.map

@@ -19,4 +19,2 @@ "use strict";

const node_utils_1 = require("./node-utils");
const ts_estree_1 = require("./ts-estree");
exports.TSESTree = ts_estree_1.TSESTree;
const semantic_errors_1 = require("./semantic-errors");

@@ -338,3 +336,6 @@ /**

exports.parseAndGenerateServices = parseAndGenerateServices;
var ast_node_types_1 = require("./ast-node-types");
exports.AST_NODE_TYPES = ast_node_types_1.AST_NODE_TYPES;
var ts_estree_1 = require("./ts-estree");
exports.AST_NODE_TYPES = ts_estree_1.AST_NODE_TYPES;
exports.AST_TOKEN_TYPES = ts_estree_1.AST_TOKEN_TYPES;
exports.TSESTree = ts_estree_1.TSESTree;
//# sourceMappingURL=parser.js.map

@@ -14,1 +14,2 @@ import ts from 'typescript';

export {};
//# sourceMappingURL=semantic-errors.d.ts.map

@@ -89,1 +89,2 @@ "use strict";

}
//# sourceMappingURL=semantic-errors.js.map
import ts from 'typescript';
export declare type TSNode = ts.Node & (ts.Modifier | ts.Identifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.CommentRange | ts.JSDocTypeExpression | ts.JSDoc | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral);
//# sourceMappingURL=ts-nodes.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ts-nodes.js.map

@@ -21,1 +21,2 @@ import ts from 'typescript';

export declare function createProgram(code: string, filePath: string, extra: Extra): ts.Program | undefined;
//# sourceMappingURL=tsconfig-parser.d.ts.map

@@ -156,1 +156,2 @@ 'use strict';

exports.createProgram = createProgram;
//# sourceMappingURL=tsconfig-parser.js.map
{
"name": "@typescript-eslint/typescript-estree",
"version": "1.3.1-alpha.2+5e3e285",
"version": "1.3.1-alpha.3+61c60dc",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",

@@ -31,7 +31,8 @@ "main": "dist/parser.js",

"prebuild": "npm run clean",
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/",
"test": "jest --coverage",
"unit-tests": "jest \"./tests/lib/.*\"",
"ast-alignment-tests": "jest spec.ts"
"ast-alignment-tests": "jest spec.ts",
"typecheck": "tsc --noEmit"
},

@@ -46,5 +47,6 @@ "dependencies": {

"devDependencies": {
"@typescript-eslint/shared-fixtures": "1.3.1-alpha.2+5e3e285"
"@babel/types": "^7.3.2",
"@typescript-eslint/shared-fixtures": "1.3.1-alpha.3+61c60dc"
},
"gitHead": "5e3e285eb937ebdfaada23d8687e3e9dbcce4d18"
"gitHead": "61c60dc047da680b8cc74943c52c33562942c95a"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc