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.23 to 1.3.1-alpha.24

11

dist/convert.d.ts

@@ -55,2 +55,13 @@ /**

/**
* Fixes the exports of the given ts.Node
* @param node the ts.Node
* @param result result
* @returns the ESTreeNode with fixed exports
*/
private fixExports;
/**
* Register specific TypeScript node into map with first ESTree node provided
*/
private registerTSNodeInNodeMap;
/**
* Converts a TypeScript node into an ESTree node.

@@ -57,0 +68,0 @@ * @param child the child ts.Node

8

dist/node-utils.d.ts

@@ -166,10 +166,2 @@ /**

/**
* Fixes the exports of the given ts.Node
* @param node the ts.Node
* @param result result
* @param ast the AST
* @returns the ESTreeNode with fixed exports
*/
export declare function fixExports<T extends TSESTree.BaseNode>(node: ts.Node, result: T, ast: ts.SourceFile): TSESTree.ExportDefaultDeclaration | TSESTree.ExportNamedDeclaration | T;
/**
* Returns the type of a given ts.Token

@@ -176,0 +168,0 @@ * @param token the ts.Token

@@ -409,42 +409,2 @@ "use strict";

/**
* Fixes the exports of the given ts.Node
* @param node the ts.Node
* @param result result
* @param ast the AST
* @returns the ESTreeNode with fixed exports
*/
function fixExports(node, result, ast) {
// check for exports
if (node.modifiers && node.modifiers[0].kind === SyntaxKind.ExportKeyword) {
const exportKeyword = node.modifiers[0];
const nextModifier = node.modifiers[1];
const declarationIsDefault = nextModifier && nextModifier.kind === SyntaxKind.DefaultKeyword;
const varToken = declarationIsDefault
? findNextToken(nextModifier, ast, ast)
: findNextToken(exportKeyword, ast, ast);
result.range[0] = varToken.getStart(ast);
result.loc = getLocFor(result.range[0], result.range[1], ast);
if (declarationIsDefault) {
return {
type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
declaration: result,
range: [exportKeyword.getStart(ast), result.range[1]],
loc: getLocFor(exportKeyword.getStart(ast), result.range[1], ast)
};
}
else {
return {
type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
declaration: result,
range: [exportKeyword.getStart(ast), result.range[1]],
loc: getLocFor(exportKeyword.getStart(ast), result.range[1], ast),
specifiers: [],
source: null
};
}
}
return result;
}
exports.fixExports = fixExports;
/**
* Returns the type of a given ts.Token

@@ -451,0 +411,0 @@ * @param token the ts.Token

4

dist/ts-estree/ts-estree.d.ts

@@ -54,3 +54,3 @@ import { AST_NODE_TYPES, AST_TOKEN_TYPES } from './ast-node-types';

};
export declare type Node = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ClassBody | ClassDeclaration | ClassExpression | ClassProperty | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | Program | Property | RestElement | ReturnStatement | SequenceExpression | SpreadElement | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractClassProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInterfaceDeclaration | TSInterfaceBody | TSInterfaceHeritage | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSPublicKeyword | TSPrivateKeyword | TSProtectedKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UpdateExpression | UnaryExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
export declare type Node = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ClassBody | ClassDeclaration | ClassExpression | ClassProperty | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXMemberExpression | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | Program | Property | RestElement | ReturnStatement | SequenceExpression | SpreadElement | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractClassProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInterfaceDeclaration | TSInterfaceBody | TSInterfaceHeritage | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSPublicKeyword | TSPrivateKeyword | TSProtectedKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UpdateExpression | UnaryExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
export declare type Accessibility = 'public' | 'protected' | 'private';

@@ -62,3 +62,3 @@ export declare type BindingPattern = ArrayPattern | ObjectPattern;

export declare type EntityName = Identifier | TSQualifiedName;
export declare type ExportDeclaration = ClassDeclaration | ClassExpression | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclarator;
export declare type ExportDeclaration = ClassDeclaration | ClassExpression | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration;
export declare type Expression = ArrowFunctionExpression | AssignmentExpression | BinaryExpression | ConditionalExpression | JSXClosingElement | JSXClosingFragment | JSXExpressionContainer | JSXOpeningElement | JSXOpeningFragment | JSXSpreadChild | LogicalExpression | RestElement | SequenceExpression | SpreadElement | TSAsExpression | TSUnaryExpression | YieldExpression;

@@ -65,0 +65,0 @@ export declare type ExpressionWithTypeArguments = TSClassImplements | TSInterfaceHeritage;

{
"name": "@typescript-eslint/typescript-estree",
"version": "1.3.1-alpha.23+80bd72c",
"version": "1.3.1-alpha.24+9f1d314",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",

@@ -47,5 +47,5 @@ "main": "dist/parser.js",

"@babel/types": "^7.3.2",
"@typescript-eslint/shared-fixtures": "1.3.1-alpha.23+80bd72c"
"@typescript-eslint/shared-fixtures": "1.3.1-alpha.24+9f1d314"
},
"gitHead": "80bd72c96944c637bcc94e8cc2219a9d416e2ed5"
"gitHead": "9f1d314c039a5e789be52cae732ce3a3ea17b587"
}

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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