A CLI tool that downloads TypeScript declarations from NextGIS Web and installs them as resolvable packages.
npm install @nextgis/ngw-types-loader
Run the loader without installing it:
npx @nextgis/ngw-types-loader
For a custom NextGIS Web deployment:
npx @nextgis/ngw-types-loader https://your-ngw-server.com
If the loader is installed in the project, you can use its executable directly.
By default, the loader downloads declarations from https://demo.nextgis.com:
ngw-types-loader
For a custom NextGIS Web deployment, pass its URL:
ngw-types-loader https://your-ngw-server.com
The declarations are installed under node_modules/@nextgisweb. Imports such as
@nextgisweb/resource/type/api are resolved by TypeScript without adding a generated
file to tsconfig.json.
Run the loader from postinstall when the declarations should be regenerated after
installing dependencies:
{
"scripts": {
"postinstall": "ngw-types-loader"
}
}
Use the URL of your own server when its installed components or version differ from NextGIS Cloud.
See the NextGIS Web API documentation.
Need help with @nextgis/ngw-types-loader? Contact NextGIS.