This is a collection of types for the nss_libs libraries, e.g. for code completion in your IDE.
- Create a folder, e.g.
nss_libs_types
in the html root of your script. - Copy and paste all files from the
types
folder of this script into your newnss_libs_types
folder of the target script.
Alternatively you can check out this repository as a git submodule into your nss_libs_types
folder.
This section is only for the maintainer of this repository.
The following steps are taken from documentation Creating .d.ts Files from .js files .
-
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
- Point to the root of this project and install typescript locally.
npm install typescript --save-dev
-
Generate definition files
See tsconfig.json for more details and set up the correct paths to the source files of nss_libs.
npx tsc