Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.68 KB

README.md

File metadata and controls

35 lines (22 loc) · 1.68 KB

Monorepo for TypeOnly

Build Status

TypeOnly is a lightweight validation library that uses TypeScript type definitions to validate JSON data. Learn more about TypeOnly here.

Projects

  • typeonly: Parses types and interfaces from TypeScript and stores them as JSON files;
  • @typeonly/loader: Brings types and interfaces from TypeScript at runtime;
  • @typeonly/validator: An API to validate JSON data or JavaScript objects, using TypeScript typing definitions;
  • @typeonly/validator-cli: A CLI to validate JSON files, using TypeScript typing definitions.

Contribute

Install and Build

We need a JVM (Java Virtual Machine) to build the parser because we use ANTLR, which is a Java program. So, at first, install a JVM on your system.

In a terminal, open the cloned typeonly/typeonly/ repository. Then:

# Download once the ANTLR JAR file in the project's root directory
wget https://www.antlr.org/download/antlr-4.13.2-complete.jar

# Install once all Node.js dependencies
npm install

Development environment

With VS Code, our recommanded plugins are:

  • Biome from biomejs (biomejs.dev)
  • ANTLR4 grammar syntax support from Mike Lischke (mike-lischke.vscode-antlr4)