TypeScript question

Our blazing fast Grid component built with pure JavaScript
Post Reply
User avatar
Posts: 3
Joined: Sun Nov 25, 2018 11:10 pm

TypeScript question

Post by Les » Wed Dec 19, 2018 11:57 pm

I'm not a TS expert. Why do you include the grid.d.ts file if TS checking can be done via JSDoc?


>>> Full TypeScript typings included as build/grid.d.ts. Typings define module bryntum-grid to avoid possible name collisions, so we had to also rename import in the angular demo.

See: "You can avoid TypeScript syntax altogether and use only JSDoc comments in your .js files to get the same type safety as if you were writing canonically TS."


User avatar
Core Developer
Core Developer
Posts: 280
Joined: Tue Apr 12, 2016 9:50 pm

Re: TypeScript question

Post by johan.isaksson » Thu Dec 20, 2018 9:01 am

Official typings is a common request, but using it is optional. You can remove them if you do not want typings.

Regarding using JSDoc for TS types, we are using some custom tags and custom processing and are not 100% compliant with the standard. Using our typings will probably be the safer bet. Also https://github.com/Microsoft/TypeScript ... JavaScript states that for example @property is not supported, a tag we use a lot.

But if you try using JSDoc instead of typings, it would be great if you would report the result!
Best regards,
Johan Isaksson

Post Reply