woocommerce/plugins/woocommerce-blocks/assets/js/base/utils
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
..
test Move Total components to checkout package (https://github.com/woocommerce/woocommerce-blocks/pull/3671) 2021-01-20 21:35:53 +01:00
address.js Fix Address Validation in the Store API and client (https://github.com/woocommerce/woocommerce-blocks/pull/3552) 2020-12-17 14:52:44 +00:00
derive-selected-shipping-rates.js Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
errors.js Fix Address Validation in the Store API and client (https://github.com/woocommerce/woocommerce-blocks/pull/3552) 2020-12-17 14:52:44 +00:00
from-entries-polyfill.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
get-intersection-observer.js Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
get-valid-block-attributes.js Introduce Atomic Add to Cart Block (https://github.com/woocommerce/woocommerce-blocks/pull/2705) 2020-06-17 10:52:03 +01:00
index.js Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
legacy-events.js Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
product-data.js Add inspector notice for unsupported product types (https://github.com/woocommerce/woocommerce-blocks/pull/2944) 2020-08-06 10:28:20 -04:00
render-frontend.js remove suspense polyfill (https://github.com/woocommerce/woocommerce-blocks/pull/3015) 2020-08-18 12:32:40 +01:00
shipping-rates.js Add @woocommerce/eslint-plugin dependency (https://github.com/woocommerce/woocommerce-blocks/pull/3115) 2020-09-07 13:31:10 -04:00