I use Strongloop's Loopback as a REST framework and ORM. I want to use TypeScript for my business logic. However, Loopback requires some form of JavaScript to support their framework. For example:
module.exports = function(Person){ Person.greet = function(msg, cb) { cb(null, 'Greetings... ' + msg); } Person.remoteMethod( 'greet', { accepts: {arg: 'msg', type: 'string'}, returns: {arg: 'greeting', type: 'string'} } ); };
What is TypeScript code that will generate the above JavaScript code?
javascript rest typescript loopbackjs strongloop
ASA2
source share