Socket
Socket
Sign inDemoInstall

@types/babel-traverse

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/babel-traverse - npm Package Compare versions

Comparing version 6.25.7 to 6.25.8

48

babel-traverse/index.d.ts

@@ -9,7 +9,19 @@ // Type definitions for babel-traverse 6.25

import * as t from 'babel-types';
import * as t from "babel-types";
export type Node = t.Node;
export default function traverse<S>(parent: Node | Node[], opts: TraverseOptions<S>, scope: Scope, state: S, parentPath?: NodePath): void;
export default function traverse(parent: Node | Node[], opts: TraverseOptions, scope?: Scope, state?: any, parentPath?: NodePath): void;
export default function traverse<S>(
parent: Node | Node[],
opts: TraverseOptions<S>,
scope: Scope,
state: S,
parentPath?: NodePath,
): void;
export default function traverse(
parent: Node | Node[],
opts: TraverseOptions,
scope?: Scope,
state?: any,
parentPath?: NodePath,
): void;

@@ -28,3 +40,3 @@ export interface TraverseOptions<S = Node> extends Visitor<S> {

hub: Hub;
bindings: { [name: string]: Binding; };
bindings: { [name: string]: Binding };

@@ -129,7 +141,15 @@ /** Traverse node with current scope and path. */

export class Binding {
constructor(opts: { existing: Binding; identifier: t.Identifier; scope: Scope; path: NodePath; kind: 'var' | 'let' | 'const'; });
constructor(
opts: {
existing: Binding;
identifier: t.Identifier;
scope: Scope;
path: NodePath;
kind: "var" | "let" | "const";
},
);
identifier: t.Identifier;
scope: Scope;
path: NodePath;
kind: 'var' | 'let' | 'const' | 'module';
kind: "var" | "let" | "const" | "module";
referenced: boolean;

@@ -360,3 +380,3 @@ references: number;

buildCodeFrameError<TError extends Error>(msg: string, Error?: new (msg: string) => TError): TError;
buildCodeFrameError<TError extends Error>(msg: string, Error?: new(msg: string) => TError): TError;

@@ -400,3 +420,3 @@ traverse<T>(visitor: Visitor<T>, state: T): void;

paths: NodePath[],
filter?: (deepest: Node, i: number, ancestries: NodePath[]) => NodePath
filter?: (deepest: Node, i: number, ancestries: NodePath[]) => NodePath,
): NodePath;

@@ -603,6 +623,8 @@

get<K extends keyof T>(key: K, context?: boolean | TraversalContext):
T[K] extends Array<Node | null | undefined> ? Array<NodePath<T[K][number]>> :
T[K] extends Node | null | undefined ? NodePath<T[K]> :
never;
get<K extends keyof T>(
key: K,
context?: boolean | TraversalContext,
): T[K] extends Array<Node | null | undefined> ? Array<NodePath<T[K][number]>>
: T[K] extends Node | null | undefined ? NodePath<T[K]>
: never;
get(key: string, context?: boolean | TraversalContext): NodePath | NodePath[];

@@ -624,3 +646,3 @@

// ------------------------- isXXX -------------------------
isArrayExpression(opts?: object): this is NodePath<t.ArrayExpression> ;
isArrayExpression(opts?: object): this is NodePath<t.ArrayExpression>;
isAssignmentExpression(opts?: object): this is NodePath<t.AssignmentExpression>;

@@ -627,0 +649,0 @@ isBinaryExpression(opts?: object): this is NodePath<t.BinaryExpression>;

{
"name": "@types/babel-traverse",
"version": "6.25.7",
"version": "6.25.8",
"description": "TypeScript definitions for babel-traverse",

@@ -35,4 +35,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-traverse",

},
"typesPublisherContentHash": "6eff4001df6d0381d7f442aa6119aef770a90e7661a061c2aa766f1f50239af7",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "3c75b445140e68e921cfefa753586112e1e8ace3c37d200f26e3306910489711",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 20 Aug 2021 03:31:19 GMT
* Last updated: Fri, 15 Sep 2023 19:06:48 GMT
* Dependencies: [@types/babel-types](https://npmjs.com/package/@types/babel-types)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc