TypeScript definition file

Stimulsoft Reports.JS discussion
Post Reply
ysantosa
Posts: 15
Joined: Wed Sep 11, 2019 12:22 am

TypeScript definition file

Post by ysantosa »

Hi,

I'm currently evaluating your product, and writing a node service (in TypeScript).

I'm installing through npm - latest version (2019.3.5-b as of writing)

I'm having a problem trying to reference the .d.ts file.

And vscode kept on complaining about it:
typescript.png
typescript.png (12.36 KiB) Viewed 3303 times
The error I'm getting is:
Could not find a declaration file for module 'stimulsoft-reports-js'. node_modules/stimulsoft-reports-js/index.js' implicitly has an 'any' type.
Try `npm install @types/stimulsoft-reports-js` if it exists or add a new declaration (.d.ts) file containing `declare module 'stimulsoft-reports-js';`ts(7016)
As far as I know - there's no npm for @types/stimulsoft-reports-js

What's the best way to reference it ?

Much appreciated for your time !
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: TypeScript definition file

Post by HighAley »

Hello.

Sorry, there is no npm for @types/stimulsoft-reports-js.
You could download the package from our site.
The stimulsoft.reports.d.ts is included there.

Thank you.
ysantosa
Posts: 15
Joined: Wed Sep 11, 2019 12:22 am

Re: TypeScript definition file

Post by ysantosa »

HighAley wrote: Wed Sep 11, 2019 8:17 pm The stimulsoft.reports.d.ts is included there.
I can find the file under the node_modules\stimulsoft-reports-js\Scripts

But how do I refer to it ?
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: TypeScript definition file

Post by Lech Kulikowski »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Please check samples:
https://github.com/stimulsoft/Samples-JS

Thank you.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: TypeScript definition file

Post by HighAley »

Hello.

This file is not available in the npm package.
We don't have plans to add it there.

Thank you.
ysantosa
Posts: 15
Joined: Wed Sep 11, 2019 12:22 am

Re: TypeScript definition file

Post by ysantosa »

HighAley wrote: Sun Sep 22, 2019 9:16 am Hello.

This file is not available in the npm package.
We don't have plans to add it there.

Thank you.
Hi HighAley - it's definitely there in the npm package, at least in version 2019.3.5-b

Code: Select all

Directory of E:\develop\test-node-postgres\node_modules\stimulsoft-reports-js\Scripts

23/09/2019  09:48 AM    <DIR>          .
23/09/2019  09:48 AM    <DIR>          ..
26/10/1985  06:15 PM         5,271,273 stimulsoft.designer.js
26/10/1985  06:15 PM         2,591,696 stimulsoft.designer.pack.js
26/10/1985  06:15 PM         2,835,916 stimulsoft.reports.d.ts
26/10/1985  06:15 PM         8,903,331 stimulsoft.reports.js
26/10/1985  06:15 PM         3,133,602 stimulsoft.reports.maps.js
26/10/1985  06:15 PM         3,151,044 stimulsoft.reports.maps.pack.js
26/10/1985  06:15 PM         2,701,550 stimulsoft.reports.pack.js
26/10/1985  06:15 PM         1,078,621 stimulsoft.viewer.js
26/10/1985  06:15 PM           462,414 stimulsoft.viewer.pack.js
               9 File(s)     30,129,447 bytes
See there's stimulsoft.reports.d.ts in there (3rd file)
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: TypeScript definition file

Post by HighAley »

Hello.

Sorry, our developers can't help you with it.

Thank you.
Post Reply