Skip to content

Instantly share code, notes, and snippets.

@ryancat
Last active October 22, 2018 06:41
Show Gist options
  • Select an option

  • Save ryancat/f1e220c26a240c3577826a25b6f55752 to your computer and use it in GitHub Desktop.

Select an option

Save ryancat/f1e220c26a240c3577826a25b6f55752 to your computer and use it in GitHub Desktop.
typescript migration demo
var ModuleC = require('./ModuleC.js');
var ModuleA = function (config) {
this.config = config;
};
ModuleA.prototype = {
log: function (message) {
console.log('[ModuleA]', message);
},
run: function () {
var moduleC = new ModuleC(this.config);
return 'ModuleA' + '-' + moduleC.run();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment