NathanaelA / fluentreports

:page_facing_up: Fluent Reports - Data Driven Reporting Engine for Node.js and Browsers :page_facing_up:
https://fluentreports.com
MIT License
375 stars 84 forks source link

How to implement Typescript support? #270

Open DiegoVega19 opened 1 year ago

DiegoVega19 commented 1 year ago

I wanted to know how can I implement Typescript? Regards Awesome package!

NathanaelA commented 1 year ago

Not quite sure the question you are asking...

  1. If you are wanting to use this in TypeScript, any JS code works as-is, you just don't get as good of auto-detection of issues/and knowledge of the types. So when you do let rpt = new Report it doesn't know rpt is actually a Report group object...

  2. If you are asking how to actually create a Typings file for FluentReports [would love someone to do so, or pay me to do so], then you have to create a .d.ts file with the class types so that your editor. You might even be able to start with the JSDoc info and have it parsed into a .d.ts file.