programming-linguist
A library to facilitate generation of TypeScript code from TypeScript/Javascript
applications.
Quick Start
Installation
Add the library to your dependencies using your package manager of choice:
npm install programming-linguist
yarn add programming-linguist
Usage
Start by creating a new Project
, then add SourceFile
s to it with statements
in those, and finally synthesize the Project
:
import * as linguist from 'programming-linguist';
const project = new linguist.Project();
const sourceFile = new linguist.SourceFile(project, 'index');
new linguist.Interface(sourceFile, 'FooInterface', {
documentation: 'This is an example interface',
exported: true,
name: 'FooInterface',
});
project.synthesize('/target/directory');