Socket
Socket
Sign inDemoInstall

programming-linguist

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    programming-linguist

A Construct-based model to generate source code


Version published
Weekly downloads
1
Maintainers
1
Install size
51.9 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 13 Jul 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc