Bogdan Savluk d98418efbe
Convert @babel/traverse to TypeScript (#12488)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-24 01:33:09 +01:00

23 lines
487 B
TypeScript

import type Scope from "./scope";
export interface HubInterface {
getCode(): string | void;
getScope(): Scope | void;
addHelper(name: string): any;
buildError(node: any, msg: string, Error: new () => Error): Error;
}
export default class Hub implements HubInterface {
getCode() {}
getScope() {}
addHelper() {
throw new Error("Helpers are not supported by the default hub.");
}
buildError(node, msg, Error = TypeError): Error {
return new Error(msg);
}
}