Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

asserts.js 485B

12345678910111213141516171819202122232425
  1. import t from "@babel/types";
  2. export default function generateAsserts() {
  3. let output = `/*
  4. * This file is auto-generated! Do not modify it directly.
  5. * To re-generate run 'make build'
  6. */
  7. import * as t from "@babel/types";
  8. import NodePath from "../index";
  9. export interface NodePathAssetions {`;
  10. for (const type of [...t.TYPES].sort()) {
  11. output += `
  12. assert${type}(
  13. opts?: object,
  14. ): asserts this is NodePath<t.${type}>;`;
  15. }
  16. output += `
  17. }`;
  18. return output;
  19. }