woocommerce/plugins/woocommerce-blocks/assets/js/base
Seghir Nadir dff4772d82 Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913)
* type hooks

* type useStoreCart

* type the rest

* Remove old typedefs

* Specify that the return value from useDispatch is a Promise< void >

* Change return type of removeItem

* If ref.current is undefined then return value without checking shallowEq

* Revert "Specify that the return value from useDispatch is a Promise< void >"

This reverts commit 97863bd584d38024398913a79ce63fa6b964846a.

* Remove type parameter from removeItem and changeCartItemQuantity

* Change action return type to cater for generator functions

* Remove type parameter from addItemToCart

* Add mapped types file to help with actions that are generator functions

* Include addItemToCart in return types of cart actions

* Use custom DispatchFromMap

* Add todos for why we've redefined functionality that exists in Calypso

* update types

* remove fromEntries and use polyfill

* address review

* ignore ts no shadow

* fix test errors

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2021-03-10 15:03:26 +00:00
..
components Update/typescript checkout shipping (https://github.com/woocommerce/woocommerce-blocks/pull/3925) 2021-03-09 10:55:24 +00:00
context Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
hocs Switch to Fragment Short Syntax (`<>`) (https://github.com/woocommerce/woocommerce-blocks/pull/3536) 2020-12-14 11:54:34 +00:00
hooks Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
utils Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00