Page 1 of 1

Typescript declaration file displays errors in valid react components

Posted: Tue Oct 09, 2018 7:51 pm
by grbspltt
Using Stimulsoft.Reports.JS
Version: 2018.2.3
Build date: 2018.07.05

When I include the stimulsoft.report.d.ts type declaration file in my project it creates the error below for all valid react html elements returning from render functions.

I have to remove the file whenever I need to test the app.

Code: Select all

Type '{}' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>'.
  Type '{}' is not assignable to type 'HTMLAttributes<HTMLSpanElement>'.
    Types of property 'is' are incompatible.
      Type '(type: any) => boolean' is not assignable to type 'string'.

Re: Typescript declaration file displays errors in valid react components

Posted: Wed Oct 10, 2018 10:28 pm
by Lech Kulikowski
Hello,

Please send us a sample project which reproduces the issue for analysis on support@stimulsoft.com

Thank you.

Re: Typescript declaration file displays errors in valid react components

Posted: Wed Oct 17, 2018 5:13 pm
by grbspltt
See attached.

Re: Typescript declaration file displays errors in valid react components

Posted: Sat Oct 20, 2018 9:40 am
by HighAley
Hello.

We need some time for analysis of your issue.
We will keep in touch with any news.

Thank you.

Ticket reference: #7216

Re: Typescript declaration file displays errors in valid react components

Posted: Tue Oct 30, 2018 7:54 pm
by HighAley
Hello,

We have made an improvement.
Please, check our next build.

Also, you should load the stimulsoft.reports script first.

Thank you.

Re: Typescript declaration file displays errors in valid react components

Posted: Thu Nov 08, 2018 5:42 pm
by grbspltt
Thanks for the response, I downloaded the latest and loaded into the project, same exact error. See attached project. There is also a type error in the d.ts file on line 3142: Class 'Type' incorrectly implements interface 'Function'.   Property 'name' is missing in type 'Type'. Property '[Symbol.hasInstance]' is missing in type 'Type'.

Adding the bottom two lines appeared to fix the error.
class Type implements Function {
apply(thisArg: any, argArray?: any): any;
call(thisArg: any, ...argArray: any[]): any;
bind(thisArg: any, ...argArray: any[]): any;
prototype: any;
length: number;
arguments: any;
caller: Function;
readonly name: string;
[Symbol.hasInstance](value: any): boolean;
}

Re: Typescript declaration file displays errors in valid react components

Posted: Sat Nov 10, 2018 11:47 am
by Lech Kulikowski
Hello,

We need some time to investigate the issue.

Thank you.

Re: Typescript declaration file displays errors in valid react components

Posted: Tue Apr 23, 2019 12:18 pm
by HighAley
Hello.

We have made an improvement.
Please, check our next build when it will be available.

Thank you.