Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
A tool that helps porting as3 codebase to typescript
This fork has major improvements parsing and emitting code. It has also a "bridge" feature that allows implementing custom node visitors.
This project is a fork of simonbuchan/as3-to-typescript, which is a fork of the original as3-to-typescript implementation.
Option 1: via npm::
npm install -g as3-to-ts
Option 2: building the source:
Make sure you have Node v6+ installed.
npm link
You should have as3-to-ts
now globaly available in your commandline.
as3-to-ts <sourceDir> <outputDir> [--commonjs] [--bridge createjs] [--interactive] [--overwrite]
Options:
--commonjs
: export .ts files using CommonJS's import style.--bridge [name]
: use custom visitor. implemented under src/bridge/[name]
--overwrite
: force overwrite of previously-converted files.--interactive
: if you've manually changed a generated .ts
file, you'll be
asked if you want to overwrite it or not.super
calls on constructor need to be moved as the first call after conversion.extends
statement causes infinite loop parsint the .as
file.break
without a semicolon results in infinite loop parsing the .as
file.Error: invalid consume
.
(usually this is result of bad copy & paste without renaming the class constructor)var i = (/*comment*/true)
)enum
, class
, etc. (not
an issue if transpiled using --commonjs
)public var velocityX:Number, velocityY:Number;
)This tool will not magicly transform your as3 codebase into perfect typescript, the goal is to transform the sources into syntacticly correct typescript, and even this goal is not perfectly respected. It also won't try to provide javascript implementation for flash libraries.
However unlike most attempts that I have seen this tool is based on a true actionscript parser, and so should be able to handle most of as3 constructs and greatly ease the pain of porting a large code base written in as3 to typescript.
FAQs
Tool to help porting ActionScript 3.0 code to TypeScript.
The npm package as3-to-ts receives a total of 4 weekly downloads. As such, as3-to-ts popularity was classified as not popular.
We found that as3-to-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.