neutralinojs / neutralino.js

JavaScript API for Neutralinojs
https://neutralino.js.org/docs/api/overview
MIT License
237 stars 47 forks source link

neutralino.d.ts is unusable in v5+ #116

Closed CosmoMyzrailGorynych closed 1 month ago

CosmoMyzrailGorynych commented 2 months ago

With v5, neutralino.d.ts file contains exports, which makes it a declaration for a global-modifying module, when neutralino.js file is not (it is a global library). This makes it impossible to use in TypeScript projects.

Steps to reproduce:

  1. neu create test && cd ./test
  2. Open in VSCode or any other editor that supports TypeScript
  3. Create an index.ts file
  4. Write console.log(Neutralino) — get an error.

Removing all exports resolves the issue.