woocommerce/plugins/woocommerce-blocks/assets/js/base/context
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
..
add-to-cart-form Add billing data to payment method registration, convert cart/checkout context provider to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/3922) 2021-03-09 10:50:51 +00:00
cart-checkout Add billing data to payment method registration, convert cart/checkout context provider to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/3922) 2021-03-09 10:50:51 +00:00
editor Add billing data to payment method registration, convert cart/checkout context provider to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/3922) 2021-03-09 10:50:51 +00:00
shared Add billing data to payment method registration, convert cart/checkout context provider to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/3922) 2021-03-09 10:50:51 +00:00
test Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
container-width-context.js Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
index.js Add to cart context provider (https://github.com/woocommerce/woocommerce-blocks/pull/2903) 2020-07-30 11:57:22 +01:00
query-state-context.js Update NPM dependencies and script dependency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1337) 2019-12-10 12:17:46 -05:00
store-notices-context.js Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
tsconfig.json Add billing data to payment method registration, convert cart/checkout context provider to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/3922) 2021-03-09 10:50:51 +00:00
utils.js Add context value validation for context apis that receive an object. (https://github.com/woocommerce/woocommerce-blocks/pull/1174) 2019-11-14 09:51:32 -05:00