You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

programming-linguist

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

programming-linguist

A Construct-based model to generate source code

0.0.0
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

programming-linguist

Main Maintainability Test Coverage

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 SourceFiles to it with statements in those, and finally synthesize the Project:

import * as linguist from 'programming-linguist';

// Creating a root TypeScript Project
const project = new linguist.Project();

// Creating a new SourceFile in the project
const sourceFile = new linguist.SourceFile(project, 'index');

// Adding a new Interface declaration
new linguist.Interface(sourceFile, 'FooInterface', {
  documentation: 'This is an example interface',
  exported: true,
  name: 'FooInterface',
});

// Synthesizing the project into `/target/directory`:
project.synthesize('/target/directory');

Keywords

constructs

FAQs

Package last updated on 13 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts