Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save ryancat/280b83b50d37d02c1ebd2855f0660dfc to your computer and use it in GitHub Desktop.
typescript migration demo
var ModuleC = require('./ModuleC.js');
module.exports = {
initModuleA: function (config) {
this.config = config;
},
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