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

Emit delegates in definitions #17

Open andry-tino opened 7 years ago

andry-tino commented 7 years ago

Ability to emit delegates in definition files. Simple delegates like:

public delegate int ExampleEventHandler(object sender, PersonalEventArgs eventArgs);

Suggestions

Simplification: emit them as empty classes:

declare|export class ExampleEventHandler { }

Evaluate later the possibility of rendering them as proper functions:

declare|export ExampleEventHandler: (object, PersonalEventArgs) => number;

Proper implementation

Allow the ability to specify an external C# file when generating definitions. Normal input files will be converted into definitions and the passed file will be as well. The final definitions will be emitted together in the bundle.

To be considered Evaluate the possibility to have this feature available only when specifying the bundle option.