A CLI tool to download and manage TypeScript declaration files for NextGIS Web applications.
tsconfig.json
with the new declaration file.npm install @nextgis/ngw-types-loader
You can use the CLI tool directly in your project. By default, it downloads the declaration file from https://demo.nextgis.com
and updates tsconfig.json
to include the declaration file.
ngw-types-loader
This command will:
tsconfig.json
with the new declaration file.If you are using a custom NGW deployment, you can provide a custom domain:
ngw-types-loader https://custom-domain.com
demo.nextgis.com
)By default, ngw-types-loader
downloads the declaration file from https://demo.nextgis.com
. This domain always contains the most up-to-date version of the TypeScript types for NextGIS Web.
demo.nextgis.com
will fully match your instance, so you may not need to change the URL.In the case of self-hosted NGW, you should point the loader to your server's API:
ngw-types-loader https://your-ngw-server.com
Run the following command to download the declaration file:
ngw-types-loader
After downloading, the tool will prompt you to update your tsconfig.json
. If you agree, it will automatically add the declaration file to the "include"
section:
{
"include": [
"./nextgisweb.d.ts"
]
}
If you choose not to update tsconfig.json
, you will need to manually add the declaration file to the "include"
section.
This tool interacts with the NGW API to fetch TypeScript declaration files. Check out the API Documentation.
Need to fix a bug or add a feature to @nextgis/ngw-types-loader
? We provide custom development and support for this software. Contact us to discuss options!
This version explains the default use of demo.nextgis.com
and when it’s appropriate to use your own NGW server for type declarations. Let me know if you need further adjustments!