1 | import * as t from "babel-types";
|
2 | import { BabylonOptions } from "babylon";
|
3 | type Node = t.Node;
|
4 |
|
5 | // NB: This export doesn't match the handbook example, where `template` is the default export.
|
6 | // But it does match the runtime behaviour (at least at the time of this writing). For some reason,
|
7 | // babel-template/lib/index.js has this line at the bottom: module.exports = exports["default"];
|
8 | export = template;
|
9 | declare function template(code: string, opts?: BabylonOptions): UseTemplate;
|
10 |
|
11 | type UseTemplate = (nodes?: { [placeholder: string]: Node }) => Node;
|