/nss_libs_types

Type definitions for nss_libs javascript components.

nss_libs_types

This is a collection of types for the nss_libs libraries, e.g. for code completion in your IDE.

Setup in other scripts

  1. Create a folder, e.g. nss_libs_types in the html root of your script.
  2. Copy and paste all files from the types folder of this script into your new nss_libs_types folder of the target script.

Alternatively you can check out this repository as a git submodule into your nss_libs_types folder.

Setup and compilation

This section is only for the maintainer of this repository.

The following steps are taken from documentation Creating .d.ts Files from .js files .

  1. Install node/npm to ubuntu 22.04

    See NodeSource Node.js Binary Distributions for more details.

    This package still includes npm.

curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
  1. Point to the root of this project and install typescript locally.
npm install typescript --save-dev
  1. Generate definition files

    See tsconfig.json for more details and set up the correct paths to the source files of nss_libs.

npx tsc