New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rehearsal/ts-utils

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rehearsal/ts-utils - npm Package Compare versions

Comparing version 3.0.4-beta to 3.0.5-beta

11

dist/src/helpers/typescript-ast.d.ts
/**
* This file contains helper functions to work with Typescript AST nodes and diagnostics
*/
import type { DiagnosticWithLocation, Node, SourceFile, TypeChecker, TypeNode } from 'typescript';
import type { Node, SourceFile, TypeChecker, TypeNode } from 'typescript';
/**

@@ -10,6 +10,2 @@ * Checks if node starts with `start` position and its length equals to `length`.

/**
* Checks if node is the node related to diagnostic.
*/
export declare function isNodeDiagnosed(node: Node, diagnostic: DiagnosticWithLocation): boolean;
/**
* Checks if node is the first in the line.

@@ -26,7 +22,2 @@ * e.g. for the node `revert` of `function revert(...)` the `function` is the first in the line.

/**
* Finds the first node in the line.
* e.g. in `function revert(...)` the `revert` node has `function` node is the first in the line.
*/
export declare function findTheFirstParentNodeInTheLine(node: Node): Node;
/**
* Checks if the node is the part of JSX Text (Element or Fragment)

@@ -33,0 +24,0 @@ */

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

/**
* Checks if node is the node related to diagnostic.
*/
export function isNodeDiagnosed(node, diagnostic) {
return isNodeAtPosition(node, diagnostic.start, diagnostic.length);
}
/**
* Checks if node is the first in the line.

@@ -62,10 +56,2 @@ * e.g. for the node `revert` of `function revert(...)` the `function` is the first in the line.

/**
* Finds the first node in the line.
* e.g. in `function revert(...)` the `revert` node has `function` node is the first in the line.
*/
export function findTheFirstParentNodeInTheLine(node) {
const visit = (node) => isTheFirstParentNodeInTheLIne(node) ? node : visit(node.parent);
return visit(node);
}
/**
* Checks if the node is the part of JSX Text (Element or Fragment)

@@ -110,3 +96,4 @@ */

};
return isTypeNodeStrict(checker, typeNode) && !typeArguments.find((node) => !canTypeBeResolved(checker, node));
return (isTypeNodeStrict(checker, typeNode) &&
!typeArguments.find((node) => !canTypeBeResolved(checker, node)));
}

@@ -113,0 +100,0 @@ if (ts.isParenthesizedTypeNode(typeNode)) {

2

package.json
{
"name": "@rehearsal/ts-utils",
"version": "3.0.4-beta",
"version": "3.0.5-beta",
"description": "Rehearsal TypeScript Utils",

@@ -5,0 +5,0 @@ "keywords": [

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