GithubHelp home page GithubHelp logo

nshen / as2ts Goto Github PK

View Code? Open in Web Editor NEW
43.0 4.0 19.0 253 KB

Convert ActionScript 3 to TypeScript on web

Home Page: http://github.nshen.net/as2ts/

ActionScript 11.48% JavaScript 44.39% TypeScript 44.13%

as2ts's Introduction

AS2TS

Convert ActionScript 3 to TypeScript using pure HTML5.

Try it:

http://www.nshen.net/as2ts/

Conversion:

  • Boolean to boolean
  • uint / int / Number to number
  • String to string
  • :* to :any
  • package to module
  • comment out import statements ?
  • public class to export class
  • public final class to export class
  • public interface to export interface
  • public function class_name(...):void to constructor(...)
  • internal to public
  • static (public|private|protected) to (public|private|protected) static
  • (private|public|protected) var to (private|public|protected)
  • (private|public|protected) const to (private|public|protected)
  • (override) (private|public|protected) function to (private|public|protected)
  • (private|public|protected) static var to (private|public|protected) static
  • (private|public|protected) static const to (private|public|protected) static
  • (private|public|protected) static function to (private|public|protected) static
  • local const to var
  • A as B to <B> A
  • :Array to :any[]
  • :Vector.<type> = to type[] =
  • :Vector.<type>; to type[];
  • : Vector.<type> { to type[] {
  • new Vector.<type>(7,true) to []
  • new <type>[1,2,3] to [1,2,3]
  • Vector.<type>([1, 2, 3]) to [1, 2, 3]
  • trace to console.log

Contact me:

nshen121[at]gmail.com

as2ts's People

Contributors

nshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

as2ts's Issues

as2?

would be nice to convert As2 too thanks

todo

使用实例变量和方法时前边要加this.
这句要注释掉 [SWF(width = "600", height = "400", frameRate = "60", backgroundColor = "#000000")]

这句需要处理
[Embed (source = "art/leaf.png")]
private var myTextureBitmap1:Class;

setter后边的 : void 要删掉
catch (e :Error) catch中不能有类型,:Error要删掉

bug:
new Vector.<Number>(); 会转换为 [](); 应该为 []
Number(data) 会转换为number(data) ,应该为 Number(data)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.