providence-analytics
Version:
Providence is the 'All Seeing Eye' that measures effectivity and popularity of software. Release management will become highly efficient due to an accurate impact analysis of (breaking) changes
37 lines (31 loc) • 991 B
TypeScript
import { IdentifierName } from '../index.js';
export type SwcScope = {
id: number;
parentScope?: Scope;
bindings: { [key: string]: SwcBinding };
path: SwcPath | null;
getBinding: (IdentifierName: string) => SwcBinding;
_pendingRefsWithoutBinding: SwcNode[];
_isIsolatedBlockStatement: boolean;
};
/* Binding https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md#toc-bindings */
export type SwcBinding = {
identifier: SwcNode;
// kind: string;
refs: SwcNode[];
path: SwcPath;
};
export type SwcPath = {
node: SwcNode;
parent: SwcNode;
stop: function;
scope: SwcScope;
parentPath: SwcPath | null | undefined;
get: (id: string) => SwcPath | undefined;
type: string;
};
type SwcVisitorFn = (swcPath: SwcPath) => void;
export type SwcVisitor = {
[key: string]: SwcVisitorFn | { enter?: SwcVisitorFn; leave?: SwcVisitorFn };
};
export type SwcTraversalContext = { visitOnExitFns: (() => void)[]; scopeId: number };