File: scripts/generate-dts.js

Recommend this page to a friend!
  Packages of ikhsan   jQuery Calx   scripts/generate-dts.js   Download  
File: scripts/generate-dts.js
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: jQuery Calx
Calculate form input values based on formulas
Author: By
Last change:
Date: 5 months ago
Size: 596 bytes
 

Contents

Class file image Download
/** * This is a minimal script that generates TypeScript definitions * from a Chevrotain parser. */ import { writeFileSync } from "fs"; import { resolve, dirname } from "path"; import { generateCstDts } from "chevrotain"; import { productions } from "../typescript_json.js"; import { fileURLToPath } from "url"; import { CalxInterpreter } from "../src/Calx/Parser/Chevrotain/Interpreter.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); const dtsString = generateCstDts(productions); const dtsPath = resolve(__dirname, "..", "json_cst.d.ts"); writeFileSync(dtsPath, dtsString);