Check TypeScript types against their corresponding backend models to assure that all fields have been accounted for.
Project description
Check TypeScript types against backend models
ts-backend-check is a Python package used to check TypeScript types against their corresponding backend models to assure that all fields have been accounted for.
Contents
Usage ⇧
Installation
pip install ts-backend-check
Command Options
backend-model-file(bmf): Path to the backend model file (e.g. Python class)typescript-file(tsf): Path to the TypeScript interface/type file
Basic Usage
The CLI provides a simple interface to check TypeScript types against backend models:
# Show help and available commands:
ts-backend-check --help
# Check a TypeScript type against a backend model:
ts-backend-check -bmf <backend-model-file> -tsf <typescript-file>
# Example command:
ts-backend-check -bmf src/models/user.py -tsf src/types/user.ts
Contributing ⇧
activist uses Matrix for internal communication. You're more than welcome to join us in our public chat rooms to share ideas, ask questions or just say hi to the team :)
Please see the contribution guidelines if you are interested in contributing. Work that is in progress or could be implemented is tracked in the issues and projects.
[!NOTE] Just because an issue is assigned on GitHub doesn't mean the team isn't open to your contribution! Feel free to write in the issues and we can potentially reassign it to you.
Also check the -next release- and -priority- labels in the issues for those that are most important, as well as those marked good first issue that are tailored for first-time contributors. For those new to coding or our tech stack, we've collected links to helpful documentation pages in the contribution guidelines.
We would be happy to discuss granting you further rights as a contributor after your first pull requests, with a maintainer role then being possible after continued interest in the project. activist seeks to be an inclusive, diverse and supportive organization. We'd love to have you on the team!
How you can help ⇧
- Reporting bugs as they're found 🐞
- Working with us on new features ✨
- Documentation for onboarding and project cohesion 📝
Environment setup ⇧
- First and foremost, please see the suggested IDE setup in the dropdown below to make sure that your editor is ready for development.
[!IMPORTANT]
Suggested IDE setup
VS Code
Install the following extensions:
- Fork the ts-backend-check repo, clone your fork, and configure the remotes:
[!NOTE]
Consider using SSH
Alternatively to using HTTPS as in the instructions below, consider SSH to interact with GitHub from the terminal. SSH allows you to connect without a user-pass authentication flow.
To run git commands with SSH, remember then to substitute the HTTPS URL,
https://github.com/..., with the SSH one,git@github.com:....
- e.g. Cloning now becomes
git clone git@github.com:<your-username>/ts-backend-check.gitGitHub also has their documentation on how to Generate a new SSH key 🔑
# Clone your fork of the repo into the current directory.
git clone https://github.com/<your-username>/ts-backend-check.git
# Navigate to the newly cloned directory.
cd ts-backend-check
# Assign the original repo to a remote called "upstream".
git remote add upstream https://github.com/activist-org/ts-backend-check.git
- Now, if you run
git remote -vyou should see two remote repositories named:origin(forked repository)upstream(ts-backend-check repository)
-
Create a virtual environment, activate it and install dependencies:
# Unix or MacOS: python3 -m venv venv source venv/bin/activate # Windows: python -m venv venv venv\Scripts\activate.bat # After activating venv: pip install --upgrade pip pip install -r requirements-dev.txt # To install the CLI for local development: pip install -e .
You're now ready to work on ts-backend-check!
[!NOTE] Feel free to contact the team in the Development room on Matrix if you're having problems getting your environment setup!
Contributors ⇧
Thanks to all our amazing contributors! ❤️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ts_backend_check-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ts_backend_check-1.1.0-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f56965ff83f356f845a0086da2555bfbf86f04132616952cb2b2ce89fa60577b
|
|
| MD5 |
c76cf4812d46f1fbc2876afa6e02547d
|
|
| BLAKE2b-256 |
e23f914d5d7225ea166eba1970da123ba0a455f1a47b1e992f4cf92f00c00acd
|