TypeScript compiler based on in-memory file system.
Install it just like any other npm package:
npm install @comsemrel/typescript-vfs-compiler [--save-dev]
This package exports compiler, which can be used only inside JS code:
const compiler = require( '@comsemrel/typescript-vfs-compiler' ).default;
compiler( {
'index.ts': 'console.log( 42 )'
} );
The first parameter is a "virtual filesystem" (what a fancy name!):
{
'someFile.ts': 'file content',
'otherFile.ts': 'another file content'
}
The second parameter is an object containg compiler options.
See LICENSE file for details.