Debian Codegraph @

packages/babel-traverse/src/hub.ts

raw symbols SCIP
1 import type Scope from "./scope";
2 import type { Node } from "@babel/types";
3
4 export interface HubInterface {
5 getCode(): string | void;
6 getScope(): Scope | void;
7 addHelper(name: string): any;
8 buildError(node: Node, msg: string, Error: new () => Error): Error;
9 }
10
11 export default class Hub implements HubInterface {
12 getCode() {}
13
14 getScope() {}
15
16 addHelper() {
17 throw new Error("Helpers are not supported by the default hub.");
18 }
19
20 buildError(node: Node, msg: string, Error = TypeError): Error {
21 return new Error(msg);
22 }
23 }