Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chayleaf/ts2py
A TypeScript to Python converter
https://github.com/chayleaf/ts2py
ast javascript js python ts typescript
Last synced: 5 days ago
JSON representation
A TypeScript to Python converter
- Host: GitHub
- URL: https://github.com/chayleaf/ts2py
- Owner: chayleaf
- License: mit
- Created: 2024-05-22T18:40:46.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-10T06:10:27.000Z (5 months ago)
- Last Synced: 2024-06-10T07:34:10.468Z (5 months ago)
- Topics: ast, javascript, js, python, ts, typescript
- Language: Rust
- Homepage:
- Size: 108 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts2py
A basic JavaScript/TypeScript to Python converter. This won't produce
working code because I obviously don't plan to port all of node.js to
Python, but it will translate the JS/TS AST to Python AST and serialize
it using [Ruff](https://github.com/astral-sh/ruff).## Usage
The program will look at the directory `./a`, convert all .js/.ts
files into .py files and put them to the `./b` directory. Some stuff
will inevitably break as there are `todo!()`s littered all over the
code, but you're smart, you'll figure this out, right?