andry-tino / Rosetta

Toolset for migrating your codebase from C# to TypeScript
http://antino-enlad.cloudapp.net:8080/job/Rosetta/
GNU General Public License v3.0
24 stars 9 forks source link

Type mappings #20

Closed andry-tino closed 7 years ago

andry-tino commented 7 years ago

Implement type mappings.

Scenario

In ScriptSharp, some JavaScript types might be mapped into classes like arrays for example:

[Imported]
// This is used to map JavaScriptarrays inside C#
public class ArrayList { ... }

When converting, we should detect that ArrayList is to be converted into [] in TypeScript.

Implementation

Implement a separate component responsible for handling the mapping. The component should act at AST Walking level (preferably, in factories) or in Helpers.