contributte / datagrid

:muscle: DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc
https://contributte.org/packages/contributte/datagrid/
MIT License
285 stars 189 forks source link

Fix timeout vs. number utils.ts #1091

Closed MartinKokesCz closed 10 months ago

MartinKokesCz commented 11 months ago

Fix for this error during the build [tsl] ERROR in /node_modules/ublaboo-datagrid/assets/utils.ts(130,3) TS2322: Type 'Timeout' is not assignable to type 'number'.

radimvaculik commented 10 months ago

@lilianalillyy Could you check it, please?

lilianalillyy commented 10 months ago

lgtm, this is due to the node.js environment having a different return value for setTimeout than the browser environment, which at runtime doesn't matter (in this case at least) but typescript will scream depending on the build environment setup; this is a good fix for that, thank you!

radimvaculik commented 10 months ago

@MartinKokesCz Thanks for contributing. @lilianalillyy Thanks for code review 💪