source: trip-planner-front/node_modules/@babel/traverse/scripts/generators/asserts.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 485 bytes
Line 
1import t from "@babel/types";
2
3export default function generateAsserts() {
4 let output = `/*
5 * This file is auto-generated! Do not modify it directly.
6 * To re-generate run 'make build'
7 */
8import * as t from "@babel/types";
9import NodePath from "../index";
10
11
12export interface NodePathAssetions {`;
13
14 for (const type of [...t.TYPES].sort()) {
15 output += `
16 assert${type}(
17 opts?: object,
18 ): asserts this is NodePath<t.${type}>;`;
19 }
20
21 output += `
22}`;
23
24 return output;
25}
Note: See TracBrowser for help on using the repository browser.