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

sql-parser-cst

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-parser-cst - npm Package Compare versions

Comparing version 0.12.0 to 0.12.1

13

lib/cstTransformer.d.ts
import { Node } from "./cst/Node";
type NodeByType<TType, TNode> = Extract<TNode, {
type: TType;
}>;
/**

@@ -10,7 +13,6 @@ * A map with a transform function for each Node type, like:

*/
export type FullTransformMap<T> = {
[K in Node["type"]]: (node: Extract<Node, {
type: K;
}>) => T;
export type FullTransformMap<T, TNode extends Node = Node> = {
[TType in TNode["type"]]: (node: NodeByType<TType, TNode>) => T;
};
export type TransformMap<T, TNode extends Node = Node> = Partial<FullTransformMap<T, TNode>>;
/**

@@ -20,2 +22,3 @@ * Creates a function that transforms the whole syntax tree to data type T.

*/
export declare function cstTransformer<T>(map: Partial<FullTransformMap<T>>): (node: Node) => T;
export declare function cstTransformer<T>(map: TransformMap<T>): (node: Node) => T;
export {};

@@ -5,3 +5,3 @@ {

"license": "GPL-2.0-or-later",
"version": "0.12.0",
"version": "0.12.1",
"main": "lib/main.js",

@@ -8,0 +8,0 @@ "types": "lib/main.d.ts",

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