@ui5/dts-generator
TypeScript icon, indicating that this package has built-in type declarations

2.3.2 • Public • Published

npm (scoped)

@ui5/DTS-Generator

This npm package contains the logic for generating TypeScript signatures from SAP UI5 api.json files.

It is used by the @sapui5/ts-types package to generate the TypeScript signatures For UI5.

Status

This project is in an experimental Beta State. Significant changes are likely to occur, including potential breaking changes

Installation

For the latest version:

  • npm install @ui5/dts-generator --save-dev

Usage

Please see the TypeScript API for additional details for each argument.

const { jsonToDTS } = require("@ui5/dts-generator");

// Directives help the DTS Generator handle typos and other inconsistencies in api.json files.
const directives = {};

const dtsText = jsonToDTS(libJsonData, {
  directives,
  dependencies: [
    /* Array of api.json dependencies as plain JavaScript objects */
  ],
  topLevelNamespaceSymbol: "sap", //The first part of the namespace to analyze defaults to 'sap'
});

// Normally one would output the `dtsText` to a file.
console.log(dtsText);

Support

Please open issues on github.

Contributing

See CONTRIBUTING.md.

Readme

Keywords

none

Package Sidebar

Install

npm i @ui5/dts-generator

Weekly Downloads

7

Version

2.3.2

License

Apache-2.0

Unpacked Size

75.3 kB

Total Files

14

Last publish

Collaborators

  • ui5-ts-bot