https://github.com/paroi-tech/typeonly
Parses typing definitions from TypeScript and brings them at runtime.
https://github.com/paroi-tech/typeonly
Last synced: about 1 year ago
JSON representation
Parses typing definitions from TypeScript and brings them at runtime.
- Host: GitHub
- URL: https://github.com/paroi-tech/typeonly
- Owner: paroi-tech
- License: cc0-1.0
- Created: 2019-06-05T05:47:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-06T17:25:34.000Z (over 1 year ago)
- Last Synced: 2025-04-10T02:43:43.001Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 730 KB
- Stars: 53
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monorepo for TypeOnly
[](https://travis-ci.com/paroi-tech/typeonly)
**TypeOnly** is a lightweight validation library that uses TypeScript type definitions to validate JSON data. **[Learn more about TypeOnly here](https://github.com/paroi-tech/typeonly/tree/master/packages/typeonly)**.
## Projects
* [typeonly](https://github.com/paroi-tech/typeonly/tree/master/packages/typeonly): Parses types and interfaces from TypeScript and stores them as JSON files;
* [@typeonly/loader](https://github.com/paroi-tech/typeonly/tree/master/packages/loader): Brings types and interfaces from TypeScript at runtime;
* [@typeonly/validator](https://github.com/paroi-tech/typeonly/tree/master/packages/validator): An API to validate JSON data or JavaScript objects, using TypeScript typing definitions;
* [@typeonly/validator-cli](https://github.com/paroi-tech/typeonly/tree/master/packages/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](https://www.antlr.org/), which is a Java program. So, at first, install a JVM on your system.
In a terminal, open the cloned `typeonly/typeonly/` repository. Then:
```sh
# 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`)