#thrift-ts
thrift-ts
is a typescript compiler that compile *.thrift files to *.d.ts files.
It should works with thrift --gen js:node
commands.
##Installation
$ npm install -g thrift-ts
##How to use ###CLI
thrift-ts Model.thrift
###Node
import thriftTs from 'thriftTs';
import fs = require('fs');
const filename = './Model.thrift';
const files = thriftTs({
filename,
content: fs.readFileSync(filename),
});
console.log(files);
// [{ filename: 'Model_types.d.ts', content: '...'}]