swagen-typescript-language
TypeScript icon, indicating that this package has built-in type declarations

1.1.0-beta.3 • Public • Published

swagen-typescript-language

swagen-typescript-language are Typescript language helpers for Swagen generators that generate Typescript code.

Installation

In your swagen generator package:

npm install --save swagen-typescript-language

Usage

swagen-typescript-language provides several helper functions. You can view the API reference for more details.

const ts = require('swagen-typescript-language');

const headers = ts.buildHeader(profile, definition);
const methodSignature = ts.getMethodSignature('myOperation', operation, {
    voidType: 'any',
    returnTypeTransformer: returnType => `Observable<${returnType}>`
});

Package Sidebar

Install

npm i swagen-typescript-language

Weekly Downloads

4

Version

1.1.0-beta.3

License

Apache-2.0

Unpacked Size

22.2 kB

Total Files

5

Last publish

Collaborators

  • swagen