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.2.1-alpha.16 to 1.2.1-alpha.18

dist/ts-estree.d.ts

4

dist/convert-comments.d.ts

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

import ts from 'typescript';
import * as es from './typedefs';
import { TSESTree } from './ts-estree';
/**

@@ -17,2 +17,2 @@ * Convert all comments for the given AST.

*/
export declare function convertComments(ast: ts.SourceFile, code: string): es.Comment[];
export declare function convertComments(ast: ts.SourceFile, code: string): TSESTree.Comment[];

@@ -9,3 +9,3 @@ /**

import ts from 'typescript';
import * as es from './typedefs';
import { TSESTree } from './ts-estree';
interface ConverterOptions {

@@ -45,3 +45,3 @@ errorOnUnknownASTType: boolean;

};
convertProgram(): es.Program;
convertProgram(): TSESTree.Program;
/**

@@ -48,0 +48,0 @@ * Converts a TypeScript node into an ESTree node.

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

import ts from 'typescript';
import * as es from './typedefs';
import { TSESTree } from './ts-estree';
import { AST_NODE_TYPES } from './ast-node-types';

@@ -78,3 +78,3 @@ /**

*/
export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): es.LineAndColumnData;
export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): TSESTree.LineAndColumnData;
/**

@@ -88,3 +88,3 @@ * Returns line and column data for the given start and end positions,

*/
export declare function getLocFor(start: number, end: number, ast: ts.SourceFile): es.SourceLocation;
export declare function getLocFor(start: number, end: number, ast: ts.SourceFile): TSESTree.SourceLocation;
/**

@@ -176,3 +176,3 @@ * Check whatever node can contain directive

*/
export declare function fixExports<T extends es.BaseNode>(node: ts.Node, result: T, ast: ts.SourceFile): es.ExportDefaultDeclaration | es.ExportNamedDeclaration | T;
export declare function fixExports<T extends TSESTree.BaseNode>(node: ts.Node, result: T, ast: ts.SourceFile): TSESTree.ExportDefaultDeclaration | TSESTree.ExportNamedDeclaration | T;
/**

@@ -183,3 +183,3 @@ * Returns the type of a given ts.Token

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

@@ -189,5 +189,5 @@ * Extends and formats a given ts.Token, for a given AST

* @param ast the AST object
* @returns the converted es.Token
* @returns the converted Token
*/
export declare function convertToken(token: ts.Node, ast: ts.SourceFile): es.Token;
export declare function convertToken(token: ts.Node, ast: ts.SourceFile): TSESTree.Token;
/**

@@ -198,3 +198,3 @@ * Converts all tokens for the given AST

*/
export declare function convertTokens(ast: ts.SourceFile): es.Token[];
export declare function convertTokens(ast: ts.SourceFile): TSESTree.Token[];
/**

@@ -201,0 +201,0 @@ * Get container token node between range

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

* @param ast the AST object
* @returns the converted es.Token
* @returns the converted Token
*/

@@ -533,0 +533,0 @@ function convertToken(token, ast) {

@@ -1,2 +0,4 @@

import { Token, Comment } from './typedefs';
import { Program } from 'typescript';
import { Token, Comment, Node } from './typedefs';
import { TSNode } from './ts-nodes';
export interface Extra {

@@ -34,1 +36,9 @@ errorOnUnknownASTType: boolean;

}
export interface ParserWeakMap<TKey, TValueBase> {
get<TValue extends TValueBase>(key: TKey): TValue;
}
export interface ParserServices {
program: Program | undefined;
esTreeNodeToTSNodeMap: ParserWeakMap<Node, TSNode> | undefined;
tsNodeToESTreeNodeMap: ParserWeakMap<TSNode, Node> | undefined;
}

@@ -1,18 +0,13 @@

import ts from 'typescript';
import * as es from './typedefs';
import { ParserOptions } from './parser-options';
declare type AST<T extends ParserOptions> = es.Program & (T['range'] extends true ? {
import { TSESTree } from './ts-estree';
import { ParserOptions, ParserServices } from './parser-options';
declare type AST<T extends ParserOptions> = TSESTree.Program & (T['range'] extends true ? {
range: [number, number];
} : {}) & (T['tokens'] extends true ? {
tokens: es.Token[];
tokens: TSESTree.Token[];
} : {}) & (T['comment'] extends true ? {
comments: es.Comment[];
comments: TSESTree.Comment[];
} : {});
interface ParseAndGenerateServicesResult<T extends ParserOptions> {
ast: AST<T>;
services: {
program: ts.Program | undefined;
esTreeNodeToTSNodeMap: WeakMap<object, any> | undefined;
tsNodeToESTreeNodeMap: WeakMap<object, any> | undefined;
};
services: ParserServices;
}

@@ -24,1 +19,3 @@ export declare const version: string;

export { ParserOptions };
export { ParserServices };
export { TSESTree };

@@ -19,2 +19,4 @@ "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");

@@ -21,0 +23,0 @@ /**

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

id: Identifier | Literal;
body?: TSModuleBlock | Identifier;
body?: TSModuleBlock | TSModuleDeclaration;
global?: boolean;

@@ -692,0 +692,0 @@ declare?: boolean;

{
"name": "@typescript-eslint/typescript-estree",
"version": "1.2.1-alpha.16+3306198",
"version": "1.2.1-alpha.18+07e950e",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",

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

"devDependencies": {
"@typescript-eslint/shared-fixtures": "1.2.1-alpha.16+3306198"
"@typescript-eslint/shared-fixtures": "1.2.1-alpha.18+07e950e"
},
"gitHead": "33061987c0cfd235014134dfd75e28c3eb4cfc2a"
"gitHead": "07e950eb877746ae34a7ce2f0afe4805178cbc43"
}
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