Premium support for our pure JavaScript UI components


Post by jit@flowit.dk »

Hi.

I'm struggling a bit with the TypeScript type definitions for "Native Gantt".
We have installed @bryntum/gantt@5.1.2 which ships with a type definition file which seems to declare a lot of properties and functions as simply Object or Function, which kind of defeats the purpose of having types. Is there a better type definition file available in another package or perhaps a developer build which offers better support for TypeScript?

Due to strict linting rules I'm not allowed to cast properties of type Object to any which would normally allow me to access sub properties. So I constantly have to explicitly declare type information like below when it has not been defined in Gantt's type definitions.

type subGridType = {locked: { width: number }};
(ganttInstance.subGrids as subGridType).locked.width = 200;

None of the types or their properties have inline documentation either, so I constantly have to look them up in the online documentation as well.

Please let me know if there is something that can be done to improve our developer experience. We'd also be interested in any information you might have in regards to planned improvements to type definitions in the near future.

-- Thanks :-)

Best regards
Jimmy Thomsen


Post by sergey.maltsev »

Hi!

Currently we have not fully typed file for the package. Unfortunately, that's true.
Code is written in pure JS so typings are not part of it and typings are developed separately.

We are improving them constantly but for now we have no better type definitions file to offer.

I've created this issue for improving typings
https://github.com/bryntum/support/issues/5176


Post by jit@flowit.dk »

Thanks Sergey. I appreciate your continued effort in improving the developer experience.

Best regards
Jimmy Thomsen


Post by afgrundsvisioner »

Hello, everyone. Our team experiences similar troubles with absence of proper type definitions.
Considering complexity of Bryntum internals having good TypeScript support would improve the DX of using Bryntum dramatically.
Feature requesting that.
And thanks for the effort by doing your product. :)


Post by marcio »

Thanks for the comment afgrundsvisioner, added a note to the ticket.

Best regards,
Márcio


Post Reply