woocommerce/plugins/woocommerce-blocks/assets/js/base/hooks
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
..
cart Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
checkout Fix circular dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/3704) 2021-01-19 10:55:44 -05:00
customer Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
payment-methods add price package (https://github.com/woocommerce/woocommerce-blocks/pull/3790) 2021-02-04 15:30:28 +00:00
shipping Update/typescript checkout shipping (https://github.com/woocommerce/woocommerce-blocks/pull/3925) 2021-03-09 10:55:24 +00:00
test Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
index.js Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
tsconfig.json Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
use-collection-data.js Fix circular dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/3704) 2021-01-19 10:55:44 -05:00
use-collection-header.js Active filters block (https://github.com/woocommerce/woocommerce-blocks/pull/1168) 2019-11-15 14:41:23 +00:00
use-collection.js Fix circular dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/3704) 2021-01-19 10:55:44 -05:00
use-container-queries.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
use-position-relative-to-viewport.js Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
use-previous.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
use-query-state.js Fix circular dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/3704) 2021-01-19 10:55:44 -05:00
use-shallow-equal.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
use-store-add-to-cart.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
use-store-notices.js Add useStoreNotices tests (https://github.com/woocommerce/woocommerce-blocks/pull/3162) 2020-09-18 14:50:45 -04:00
use-store-products.js Add API fetch error handling (https://github.com/woocommerce/woocommerce-blocks/pull/1687) 2020-01-31 13:01:34 +00:00
use-throw-error.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
use-trigger-fragment-refresh.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00