Thank you
Hey @v1ack , big fan of your package. It works much better than any other alternative. I am in love with the "pageMode", it works amazing and so practical. This repo deserves more github stars. Very developer friendly, very customizable and easy to use. Thanks for your work.
The original problem
The let:data on the default slot is showing the wrong type as "any[]" (Array), instead of "any".
And it's coming from here (VirtualScroll.d.ts)
Explanation of the changes
Simply renamed the "data" variable in the "each" loop to "dataItem" to avoid producing incorrect typescript definition on the default slot's property "data". As "data" is declared also at the top as the main component's property, with a type of Array, the slot's "data" property was also producing the same type as Array, where it should just be "any" as it's a single data item.
As a work-around, I renamed the local loop variable to "dataItem" so Sveld treats it as a different variable from the "data" at the top, and produces the correct type definition.
It is a bug from Sveld, but for now this workaround works.
Thank you Hey @v1ack , big fan of your package. It works much better than any other alternative. I am in love with the "pageMode", it works amazing and so practical. This repo deserves more github stars. Very developer friendly, very customizable and easy to use. Thanks for your work.
The original problem The let:data on the default slot is showing the wrong type as "any[]" (Array), instead of "any".
And it's coming from here (VirtualScroll.d.ts)
Explanation of the changes Simply renamed the "data" variable in the "each" loop to "dataItem" to avoid producing incorrect typescript definition on the default slot's property "data". As "data" is declared also at the top as the main component's property, with a type of Array, the slot's "data" property was also producing the same type as Array, where it should just be "any" as it's a single data item.
As a work-around, I renamed the local loop variable to "dataItem" so Sveld treats it as a different variable from the "data" at the top, and produces the correct type definition.
It is a bug from Sveld, but for now this workaround works.