Our blazing fast Grid component built with pure JavaScript

Post by striker »

I need to type (<Store><any>this.grid.store).add ...

problem8.png (11.05 KiB) Viewed 102 times

Post by sergey.maltsev »


grid.store might have few types Store|object|Partial<StoreConfig>
To use Store please update code to the following

(grid.store as Store).add(args.tasks);


 const store = grid.store as Store;

Post by striker »

This is not same issue like here?

Post by johan.isaksson »

It is the same issue. We have made progress on this in our documentation, which now specifies that it accepts multiple options but always outputs a Store.

But we do not yet have a way of representing it in TypeScript. Unfortunately doing so requires TypeScript 4.3, which is still pretty "new" (https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/#separate-write-types).

Ticket to track (repurposed from the thread linked to above): https://github.com/bryntum/support/issues/3360

Best regards,
Johan Isaksson

Post by striker »

I understand. Thanks for reply!

Post Reply