Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@typescript-eslint/typescript-estree

Package Overview
Dependencies
Maintainers
2
Versions
3957
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 8.14.1-alpha.7 to 8.14.1-alpha.8

59

dist/node-utils.d.ts

@@ -18,4 +18,2 @@ import * as ts from 'typescript';

* Returns true if the given ts.Token is a logical operator
* @param operator the operator token
* @returns is a logical operator
*/

@@ -27,4 +25,2 @@ export declare function isLogicalOperator(operator: ts.BinaryOperatorToken): operator is ts.Token<LogicalOperatorKind>;

* Returns the string form of the given TSToken SyntaxKind
* @param kind the token's SyntaxKind
* @returns the token applicable token as a string
*/

@@ -34,4 +30,2 @@ export declare function getTextForTokenKind<T extends ts.SyntaxKind>(kind: T): TokenForTokenKind<T>;

* Returns true if the given ts.Node is a valid ESTree class member
* @param node TypeScript AST node
* @returns is valid ESTree class member
*/

@@ -41,5 +35,2 @@ export declare function isESTreeClassMember(node: ts.Node): boolean;

* Checks if a ts.Node has a modifier
* @param modifierKind TypeScript SyntaxKind modifier
* @param node TypeScript AST node
* @returns has the modifier specified
*/

@@ -49,3 +40,2 @@ export declare function hasModifier(modifierKind: ts.KeywordSyntaxKind, node: ts.Node): boolean;

* Get last last modifier in ast
* @param node TypeScript AST node
* @returns returns last modifier if present or null

@@ -56,4 +46,2 @@ */

* Returns true if the given ts.Token is a comma
* @param token the TypeScript token
* @returns is comma
*/

@@ -63,4 +51,2 @@ export declare function isComma(token: ts.Node): token is ts.Token<ts.SyntaxKind.CommaToken>;

* Returns true if the given ts.Node is a comment
* @param node the TypeScript node
* @returns is comment
*/

@@ -70,4 +56,2 @@ export declare function isComment(node: ts.Node): boolean;

* Returns the binary expression type of the given ts.Token
* @param operator the operator token
* @returns the binary expression type
*/

@@ -85,6 +69,3 @@ export declare function getBinaryExpressionType(operator: ts.BinaryOperatorToken): {

/**
* Returns line and column data for the given positions,
* @param pos position to check
* @param ast the AST object
* @returns line and column
* Returns line and column data for the given positions
*/

@@ -95,5 +76,2 @@ export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): TSESTree.Position;

* for the given AST
* @param range start end data
* @param ast the AST object
* @returns the loc data
*/

@@ -103,3 +81,2 @@ export declare function getLocFor(range: TSESTree.Range, ast: ts.SourceFile): TSESTree.SourceLocation;

* Check whatever node can contain directive
* @returns returns true if node can contain directive
*/

@@ -109,5 +86,2 @@ export declare function canContainDirective(node: ts.Block | ts.ClassStaticBlockDeclaration | ts.ModuleBlock | ts.SourceFile): boolean;

* Returns range for the given ts.Node
* @param node the ts.Node or ts.Token
* @param ast the AST object
* @returns the range data
*/

@@ -117,4 +91,2 @@ export declare function getRange(node: Pick<ts.Node, 'getEnd' | 'getStart'>, ast: ts.SourceFile): [number, number];

* Returns true if a given ts.Node is a JSX token
* @param node ts.Node to be checked
* @returns is a JSX token
*/

@@ -124,4 +96,2 @@ export declare function isJSXToken(node: ts.Node): boolean;

* Returns the declaration kind of the given ts.Node
* @param node TypeScript AST node
* @returns declaration kind
*/

@@ -131,4 +101,2 @@ export declare function getDeclarationKind(node: ts.VariableDeclarationList): DeclarationKind;

* Gets a ts.Node's accessibility level
* @param node The ts.Node
* @returns accessibility "public", "protected", "private", or null
*/

@@ -139,6 +107,2 @@ export declare function getTSNodeAccessibility(node: ts.Node): 'private' | 'protected' | 'public' | undefined;

* Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren
* @param previousToken The previous TSToken
* @param parent The parent TSNode
* @param ast The TS AST
* @returns the next TSToken
*/

@@ -155,4 +119,2 @@ export declare function findNextToken(previousToken: ts.TextRange, parent: ts.Node, ast: ts.SourceFile): ts.Node | undefined;

* Returns true if a given ts.Node has a JSX token within its hierarchy
* @param node ts.Node to be checked
* @returns has JSX ancestor
*/

@@ -168,4 +130,2 @@ export declare function hasJSXAncestor(node: ts.Node): boolean;

* Returns true if a given ts.Node is a computed property
* @param node ts.Node to be checked
* @returns is Computed Property
*/

@@ -176,3 +136,2 @@ export declare function isComputedProperty(node: ts.Node): node is ts.ComputedPropertyName;

* @param node ts.Node to be checked
* @returns is Optional
*/

@@ -192,4 +151,2 @@ export declare function isOptional(node: {

* Returns the type of a given ts.Token
* @param token the ts.Token
* @returns the token type
*/

@@ -199,5 +156,2 @@ export declare function getTokenType(token: ts.Identifier | ts.Token<ts.SyntaxKind>): Exclude<AST_TOKEN_TYPES, AST_TOKEN_TYPES.Block | AST_TOKEN_TYPES.Line>;

* Extends and formats a given ts.Token, for a given AST
* @param token the ts.Token
* @param ast the AST object
* @returns the converted Token
*/

@@ -241,9 +195,2 @@ export declare function convertToken(token: ts.Token<ts.TokenSyntaxKind>, ast: ts.SourceFile): TSESTree.Token;

}
/**
* @param message the error message
* @param ast the AST object
* @param startIndex the index at which the error starts
* @param endIndex the index at which the error ends
* @returns converted error object
*/
export declare function createError(message: string, ast: ts.SourceFile, startIndex: number, endIndex?: number): TSError;

@@ -253,6 +200,2 @@ export declare function nodeHasIllegalDecorators(node: ts.Node): node is {

} & ts.Node;
/**
* @param n the TSNode
* @param ast the TS AST
*/
export declare function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean;

@@ -259,0 +202,0 @@ /**

@@ -124,3 +124,2 @@ "use strict";

* Returns true if the given ts.Token is the assignment operator
* @param operator the operator token
*/

@@ -132,4 +131,2 @@ function isAssignmentOperator(operator) {

* Returns true if the given ts.Token is a logical operator
* @param operator the operator token
* @returns is a logical operator
*/

@@ -144,4 +141,2 @@ function isLogicalOperator(operator) {

* Returns the string form of the given TSToken SyntaxKind
* @param kind the token's SyntaxKind
* @returns the token applicable token as a string
*/

@@ -153,4 +148,2 @@ function getTextForTokenKind(kind) {

* Returns true if the given ts.Node is a valid ESTree class member
* @param node TypeScript AST node
* @returns is valid ESTree class member
*/

@@ -162,5 +155,2 @@ function isESTreeClassMember(node) {

* Checks if a ts.Node has a modifier
* @param modifierKind TypeScript SyntaxKind modifier
* @param node TypeScript AST node
* @returns has the modifier specified
*/

@@ -173,3 +163,2 @@ function hasModifier(modifierKind, node) {

* Get last last modifier in ast
* @param node TypeScript AST node
* @returns returns last modifier if present or null

@@ -186,4 +175,2 @@ */

* Returns true if the given ts.Token is a comma
* @param token the TypeScript token
* @returns is comma
*/

@@ -195,4 +182,2 @@ function isComma(token) {

* Returns true if the given ts.Node is a comment
* @param node the TypeScript node
* @returns is comment
*/

@@ -205,3 +190,2 @@ function isComment(node) {

* Returns true if the given ts.Node is a JSDoc comment
* @param node the TypeScript node
*/

@@ -214,4 +198,2 @@ function isJSDocComment(node) {

* Returns the binary expression type of the given ts.Token
* @param operator the operator token
* @returns the binary expression type
*/

@@ -240,6 +222,3 @@ function getBinaryExpressionType(operator) {

/**
* Returns line and column data for the given positions,
* @param pos position to check
* @param ast the AST object
* @returns line and column
* Returns line and column data for the given positions
*/

@@ -256,5 +235,2 @@ function getLineAndCharacterFor(pos, ast) {

* for the given AST
* @param range start end data
* @param ast the AST object
* @returns the loc data
*/

@@ -267,3 +243,2 @@ function getLocFor(range, ast) {

* Check whatever node can contain directive
* @returns returns true if node can contain directive
*/

@@ -289,5 +264,2 @@ function canContainDirective(node) {

* Returns range for the given ts.Node
* @param node the ts.Node or ts.Token
* @param ast the AST object
* @returns the range data
*/

@@ -299,4 +271,2 @@ function getRange(node, ast) {

* Returns true if a given ts.Node is a token
* @param node the ts.Node
* @returns is a token
*/

@@ -308,4 +278,2 @@ function isToken(node) {

* Returns true if a given ts.Node is a JSX token
* @param node ts.Node to be checked
* @returns is a JSX token
*/

@@ -317,4 +285,2 @@ function isJSXToken(node) {

* Returns the declaration kind of the given ts.Node
* @param node TypeScript AST node
* @returns declaration kind
*/

@@ -339,4 +305,2 @@ function getDeclarationKind(node) {

* Gets a ts.Node's accessibility level
* @param node The ts.Node
* @returns accessibility "public", "protected", "private", or null
*/

@@ -365,6 +329,2 @@ function getTSNodeAccessibility(node) {

* Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren
* @param previousToken The previous TSToken
* @param parent The parent TSNode
* @param ast The TS AST
* @returns the next TSToken
*/

@@ -408,4 +368,2 @@ function findNextToken(previousToken, parent, ast) {

* Returns true if a given ts.Node has a JSX token within its hierarchy
* @param node ts.Node to be checked
* @returns has JSX ancestor
*/

@@ -436,4 +394,2 @@ function hasJSXAncestor(node) {

* Returns true if a given ts.Node is a computed property
* @param node ts.Node to be checked
* @returns is Computed Property
*/

@@ -446,3 +402,2 @@ function isComputedProperty(node) {

* @param node ts.Node to be checked
* @returns is Optional
*/

@@ -468,4 +423,2 @@ function isOptional(node) {

* Returns the type of a given ts.Token
* @param token the ts.Token
* @returns the token type
*/

@@ -543,5 +496,2 @@ function getTokenType(token) {

* Extends and formats a given ts.Token, for a given AST
* @param token the ts.Token
* @param ast the AST object
* @returns the converted Token
*/

@@ -631,9 +581,2 @@ function convertToken(token, ast) {

exports.TSError = TSError;
/**
* @param message the error message
* @param ast the AST object
* @param startIndex the index at which the error starts
* @param endIndex the index at which the error ends
* @returns converted error object
*/
function createError(message, ast, startIndex, endIndex = startIndex) {

@@ -650,6 +593,2 @@ const [start, end] = [startIndex, endIndex].map(offset => {

}
/**
* @param n the TSNode
* @param ast the TS AST
*/
function nodeHasTokens(n, ast) {

@@ -656,0 +595,0 @@ // If we have a token or node that has a non-zero width, it must have tokens.

6

package.json
{
"name": "@typescript-eslint/typescript-estree",
"version": "8.14.1-alpha.7",
"version": "8.14.1-alpha.8",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",

@@ -57,4 +57,4 @@ "files": [

"dependencies": {
"@typescript-eslint/types": "8.14.1-alpha.7",
"@typescript-eslint/visitor-keys": "8.14.1-alpha.7",
"@typescript-eslint/types": "8.14.1-alpha.8",
"@typescript-eslint/visitor-keys": "8.14.1-alpha.8",
"debug": "^4.3.4",

@@ -61,0 +61,0 @@ "fast-glob": "^3.3.2",

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