woocommerce/plugins/woocommerce-blocks/assets/js/data/cart
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 Decode fees name so special characters are rendered correctly (https://github.com/woocommerce/woocommerce-blocks/pull/3721) 2021-02-04 18:05:47 +01:00
action-types.ts Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) 2021-02-23 20:36:24 -05:00
actions.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
constants.ts Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) 2021-02-23 20:36:24 -05:00
index.ts Add types to hooks (https://github.com/woocommerce/woocommerce-blocks/pull/3913) 2021-03-10 15:03:26 +00:00
reducers.ts Followups and improvements on TS implementation in the Cart data store. (https://github.com/woocommerce/woocommerce-blocks/pull/3893) 2021-03-01 12:47:22 -05:00
resolvers.ts Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) 2021-02-23 20:36:24 -05:00
selectors.ts Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) 2021-02-23 20:36:24 -05:00