Skip to content

kaar/js-to-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JS -> TS

Experimental tool to convert code between javascript and typescript.

This is not intended to be a working tool for code conversation but rather an experiment to see how useful such a tool can be with minimal effort.

Install

Requires pipx

git clone https://github.com/kaar/js-to-ts
pipx install .

Usage

# stdin input
cat examples/App.js | python ts_to_js/main.py > examples/App.ts
# File input
python ts_to_js/main.py examples/App.js > examples/App-2.ts

Possible improvements

  • More descriptive instructions
  • Add example messages that does js -> ts conversion the "right way"
  • Send multiple files in the same request
  • Surround the js script data with
const javascrpt_code = 42
  • Send the folder structure of the app
tree .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages